i915_winsys.h File Reference

This is the interface that i915simple requires any window system hosting it to implement. More...

Include dependency graph for i915_winsys.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  i915_winsys
 Additional winsys interface for i915simple. More...

Defines

#define I915_BUFFER_ACCESS_WRITE   0x1
#define I915_BUFFER_ACCESS_READ   0x2
#define I915_BUFFER_USAGE_LIT_VERTEX   (PIPE_BUFFER_USAGE_CUSTOM << 0)

Functions

struct pipe_contexti915_create_context (struct pipe_screen *, struct pipe_winsys *, struct i915_winsys *)


Detailed Description

This is the interface that i915simple requires any window system hosting it to implement.

This is the only include file in i915simple which is public.

Definition in file i915_winsys.h.


Define Documentation

#define I915_BUFFER_ACCESS_READ   0x2

Definition at line 108 of file i915_winsys.h.

#define I915_BUFFER_ACCESS_WRITE   0x1

Definition at line 107 of file i915_winsys.h.

#define I915_BUFFER_USAGE_LIT_VERTEX   (PIPE_BUFFER_USAGE_CUSTOM << 0)

Definition at line 110 of file i915_winsys.h.


Function Documentation

struct pipe_context* i915_create_context ( struct pipe_screen ,
struct pipe_winsys ,
struct i915_winsys  
) [read]

Definition at line 140 of file i915_context.c.

References assert, i915_context::batch, i915_winsys::batch_get, CALLOC_STRUCT, pipe_context::clear, debug_get_bool_option(), pipe_context::destroy, i915_context::dirty, i915_context::draw, pipe_context::draw_arrays, draw_create(), pipe_context::draw_elements, draw_install_aaline_stage(), draw_install_aapoint_stage(), pipe_context::draw_range_elements, draw_set_rasterize_stage(), FALSE, i915_context::hardware_dirty, i915_clear(), i915_destroy(), i915_draw_arrays(), i915_draw_elements(), i915_draw_range_elements(), i915_draw_render_stage(), i915_draw_vbuf_stage(), i915_init_flush_functions(), i915_init_state_functions(), i915_init_surface_functions(), i915_init_texture_functions(), i915_context::pipe, pipe_context::screen, i915_batchbuffer::winsys, pipe_context::winsys, and i915_context::winsys.

00143 {
00144    struct i915_context *i915;
00145 
00146    i915 = CALLOC_STRUCT(i915_context);
00147    if (i915 == NULL)
00148       return NULL;
00149 
00150    i915->winsys = i915_winsys;
00151    i915->pipe.winsys = pipe_winsys;
00152    i915->pipe.screen = screen;
00153 
00154    i915->pipe.destroy = i915_destroy;
00155 
00156    i915->pipe.clear = i915_clear;
00157 
00158 
00159    i915->pipe.draw_arrays = i915_draw_arrays;
00160    i915->pipe.draw_elements = i915_draw_elements;
00161    i915->pipe.draw_range_elements = i915_draw_range_elements;
00162 
00163    /*
00164     * Create drawing context and plug our rendering stage into it.
00165     */
00166    i915->draw = draw_create();
00167    assert(i915->draw);
00168    if (!debug_get_bool_option("I915_NO_VBUF", FALSE)) {
00169       draw_set_rasterize_stage(i915->draw, i915_draw_vbuf_stage(i915));
00170    }
00171    else {
00172       draw_set_rasterize_stage(i915->draw, i915_draw_render_stage(i915));
00173    }
00174 
00175    i915_init_surface_functions(i915);
00176    i915_init_state_functions(i915);
00177    i915_init_flush_functions(i915);
00178    i915_init_texture_functions(i915);
00179 
00180    draw_install_aaline_stage(i915->draw, &i915->pipe);
00181    draw_install_aapoint_stage(i915->draw, &i915->pipe);
00182 
00183    i915->dirty = ~0;
00184    i915->hardware_dirty = ~0;
00185 
00186    /* Batch stream debugging is a bit hacked up at the moment:
00187     */
00188    i915->batch = i915_winsys->batch_get(i915_winsys);
00189    i915->batch->winsys = i915_winsys;
00190 
00191    return &i915->pipe;
00192 }


Generated on Tue Sep 29 06:25:35 2009 for Gallium3D by  doxygen 1.5.4