brw_context.c File Reference

Include dependency graph for brw_context.c:

Go to the source code of this file.

Functions

static void brw_destroy (struct pipe_context *pipe)
static void brw_clear (struct pipe_context *pipe, struct pipe_surface *ps, unsigned clearValue)
struct pipe_contextbrw_create (struct pipe_screen *screen, struct brw_winsys *brw_winsys, unsigned pci_id)

Variables

int BRW_DEBUG = (0)


Function Documentation

static void brw_clear ( struct pipe_context pipe,
struct pipe_surface ps,
unsigned  clearValue 
) [static]

Definition at line 62 of file brw_context.c.

References pipe_surface::height, pipe_context::surface_fill, and pipe_surface::width.

00064 {
00065    int x, y, w, h;
00066    /* FIXME: corny... */
00067 
00068    x = 0;
00069    y = 0;
00070    w = ps->width;
00071    h = ps->height;
00072 
00073    pipe->surface_fill(pipe, ps, x, y, w, h, clearValue);
00074 }

struct pipe_context* brw_create ( struct pipe_screen screen,
struct brw_winsys brw_winsys,
unsigned  pci_id 
) [read]

Definition at line 77 of file brw_context.c.

References brw_context::bind, brw_clear(), brw_destroy(), brw_init_draw_functions(), brw_init_flush_functions(), brw_init_state(), brw_init_state_functions(), brw_init_surface_functions(), brw_init_texture_functions(), CALLOC_STRUCT, pipe_context::clear, debug_printf(), pipe_context::destroy, brw_context::dirty, brw_context::hardware_dirty, brw_context::pci_id, brw_context::pipe, pipe_context::screen, pipe_screen::winsys, pipe_context::winsys, brw_context::winsys, and brw_context::wm.

00080 {
00081    struct brw_context *brw;
00082 
00083    debug_printf("%s: creating brw_context with pci id 0x%x\n",
00084                 __FUNCTION__, pci_id);
00085 
00086    brw = CALLOC_STRUCT(brw_context);
00087    if (brw == NULL)
00088       return NULL;
00089 
00090    brw->winsys = brw_winsys;
00091    brw->pipe.winsys = screen->winsys;
00092    brw->pipe.screen = screen;
00093 
00094    brw->pipe.destroy = brw_destroy;
00095    brw->pipe.clear = brw_clear;
00096 
00097    brw_init_surface_functions(brw);
00098    brw_init_texture_functions(brw);
00099    brw_init_state_functions(brw);
00100    brw_init_flush_functions(brw);
00101    brw_init_draw_functions( brw );
00102 
00103 
00104    brw_init_state( brw );
00105 
00106    brw->pci_id = pci_id;
00107    brw->dirty = ~0;
00108    brw->hardware_dirty = ~0;
00109 
00110    memset(&brw->wm.bind, ~0, sizeof(brw->wm.bind));
00111 
00112    return &brw->pipe;
00113 }

static void brw_destroy ( struct pipe_context pipe  )  [static]

Definition at line 51 of file brw_context.c.

References brw_context(), brw_winsys::destroy, FREE, and brw_context::winsys.

00052 {
00053    struct brw_context *brw = brw_context(pipe);
00054 
00055    if(brw->winsys->destroy)
00056       brw->winsys->destroy(brw->winsys);
00057    
00058    FREE(brw);
00059 }


Variable Documentation

int BRW_DEBUG = (0)

Definition at line 47 of file brw_context.c.


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