diff options
author | Keith Whitwell <[email protected]> | 2007-12-11 17:07:31 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2007-12-11 17:10:48 +0000 |
commit | b247ab036327d66b8b9b1aff2dbcf4520ed0284f (patch) | |
tree | 6512cfd4452795539115f22f7fc240002db5de9d | |
parent | ecb5e14e8688e31446fdcbdea59d25ea628fb211 (diff) |
965: remove duplicate brw_draw functions, make init a bit cleaner
-rw-r--r-- | src/mesa/pipe/i965simple/brw_context.c | 53 | ||||
-rw-r--r-- | src/mesa/pipe/i965simple/brw_draw.c | 5 | ||||
-rw-r--r-- | src/mesa/pipe/i965simple/brw_draw.h | 3 |
3 files changed, 7 insertions, 54 deletions
diff --git a/src/mesa/pipe/i965simple/brw_context.c b/src/mesa/pipe/i965simple/brw_context.c index dc1987cec80..13bed97ff2c 100644 --- a/src/mesa/pipe/i965simple/brw_context.c +++ b/src/mesa/pipe/i965simple/brw_context.c @@ -195,36 +195,7 @@ brw_is_format_supported( struct pipe_context *pipe, #endif } -static void -brw_begin_query(struct pipe_context *pipe, struct pipe_query_object *q) -{ - /* should never be called */ - assert(0); -} - - -static void -brw_end_query(struct pipe_context *pipe, struct pipe_query_object *q) -{ - /* should never be called */ - assert(0); -} - - -static boolean -brw_draw_elements(struct pipe_context *pipe, - struct pipe_buffer_handle *indexBuffer, - unsigned indexSize, - unsigned prim, unsigned start, unsigned count) -{ - return FALSE; -} -static boolean brw_draw_arrays(struct pipe_context *pipe, - unsigned prim, unsigned start, unsigned count) -{ - return brw_draw_elements(pipe, NULL, 0, prim, start, count); -} struct pipe_context *brw_create(struct pipe_winsys *pipe_winsys, @@ -248,40 +219,26 @@ struct pipe_context *brw_create(struct pipe_winsys *pipe_winsys, brw->pipe.is_format_supported = brw_is_format_supported; brw->pipe.get_param = brw_get_param; brw->pipe.get_paramf = brw_get_paramf; - brw->pipe.clear = brw_clear; - - brw->pipe.begin_query = brw_begin_query; - brw->pipe.end_query = brw_end_query; - - brw->pipe.draw_arrays = brw_draw_arrays; - brw->pipe.draw_elements = brw_draw_elements; + brw->pipe.texture_create = brw_texture_create; + brw->pipe.texture_release = brw_texture_release; brw_init_surface_functions(brw); brw_init_state_functions(brw); brw_init_flush_functions(brw); brw_init_string_functions(brw); + brw_init_draw_functions( brw ); - brw->pci_id = pci_id; - brw->pipe.texture_create = brw_texture_create; - brw->pipe.texture_release = brw_texture_release; + brw_init_state( brw ); + brw->pci_id = pci_id; brw->dirty = ~0; brw->hardware_dirty = ~0; - - /* Batch stream debugging is a bit hacked up at the moment: - */ brw->batch_start = NULL; - - brw_init_state( brw ); - memset(&brw->wm.bind, ~0, sizeof(brw->wm.bind)); - brw_draw_init( brw ); - - return &brw->pipe; } diff --git a/src/mesa/pipe/i965simple/brw_draw.c b/src/mesa/pipe/i965simple/brw_draw.c index 8b92f112806..f443f41c6fb 100644 --- a/src/mesa/pipe/i965simple/brw_draw.c +++ b/src/mesa/pipe/i965simple/brw_draw.c @@ -226,13 +226,10 @@ static boolean brw_draw_arrays( struct pipe_context *pipe, -void brw_draw_init( struct brw_context *brw ) +void brw_init_draw_functions( struct brw_context *brw ) { brw->pipe.draw_arrays = brw_draw_arrays; brw->pipe.draw_elements = brw_draw_elements; } -void brw_draw_destroy( struct brw_context *brw ) -{ -} diff --git a/src/mesa/pipe/i965simple/brw_draw.h b/src/mesa/pipe/i965simple/brw_draw.h index ebac8365c80..053f2efb9df 100644 --- a/src/mesa/pipe/i965simple/brw_draw.h +++ b/src/mesa/pipe/i965simple/brw_draw.h @@ -34,8 +34,7 @@ struct brw_context; -void brw_draw_init( struct brw_context *brw ); -void brw_draw_destroy( struct brw_context *brw ); +void brw_init_draw_functions( struct brw_context *brw ); boolean brw_upload_vertices( struct brw_context *brw, |