Module: Mesa Branch: i965g-restart Commit: 7a49bd6d15d7778db637340d695095dafb43a7fe URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7a49bd6d15d7778db637340d695095dafb43a7fe
Author: Keith Whitwell <kei...@vmware.com> Date: Wed Nov 4 23:30:52 2009 +0000 i965g: remove redundant screen pointer in brw context struct --- src/gallium/drivers/i965/brw_context.h | 1 - src/gallium/drivers/i965/brw_curbe.c | 2 +- src/gallium/drivers/i965/brw_draw.c | 4 ++-- src/gallium/drivers/i965/brw_pipe_flush.c | 6 ++++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/i965/brw_context.h b/src/gallium/drivers/i965/brw_context.h index d033cb0..0c1dcf8 100644 --- a/src/gallium/drivers/i965/brw_context.h +++ b/src/gallium/drivers/i965/brw_context.h @@ -483,7 +483,6 @@ struct brw_context struct pipe_context base; struct brw_chipset chipset; - struct brw_screen *brw_screen; struct brw_winsys_screen *sws; struct brw_batchbuffer *batch; diff --git a/src/gallium/drivers/i965/brw_curbe.c b/src/gallium/drivers/i965/brw_curbe.c index 5763173..f62b0b0 100644 --- a/src/gallium/drivers/i965/brw_curbe.c +++ b/src/gallium/drivers/i965/brw_curbe.c @@ -224,7 +224,7 @@ static int prepare_curbe_buffer(struct brw_context *brw) if (brw->curbe.vs_size) { GLuint offset = brw->curbe.vs_start * 16; GLuint nr = brw->curr.vertex_shader->info.file_max[TGSI_FILE_CONSTANT]; - struct pipe_screen *screen = &brw->brw_screen->base; + struct pipe_screen *screen = brw->base.screen; const GLfloat *value = screen->buffer_map( screen, brw->curr.vertex_constants, diff --git a/src/gallium/drivers/i965/brw_draw.c b/src/gallium/drivers/i965/brw_draw.c index a2bed62..6d6b1c7 100644 --- a/src/gallium/drivers/i965/brw_draw.c +++ b/src/gallium/drivers/i965/brw_draw.c @@ -258,14 +258,14 @@ boolean brw_draw_init( struct brw_context *brw ) /* Create helpers for uploading data in user buffers: */ - brw->vb.upload_vertex = u_upload_create( &brw->brw_screen->base, + brw->vb.upload_vertex = u_upload_create( brw->base.screen, 128 * 1024, 64, PIPE_BUFFER_USAGE_VERTEX ); if (brw->vb.upload_vertex == NULL) return FALSE; - brw->vb.upload_index = u_upload_create( &brw->brw_screen->base, + brw->vb.upload_index = u_upload_create( brw->base.screen, 128 * 1024, 64, PIPE_BUFFER_USAGE_INDEX ); diff --git a/src/gallium/drivers/i965/brw_pipe_flush.c b/src/gallium/drivers/i965/brw_pipe_flush.c index 9dff2be..fdc4814 100644 --- a/src/gallium/drivers/i965/brw_pipe_flush.c +++ b/src/gallium/drivers/i965/brw_pipe_flush.c @@ -50,8 +50,9 @@ static unsigned brw_is_buffer_referenced(struct pipe_context *pipe, struct pipe_buffer *buffer) { struct brw_context *brw = brw_context(pipe); + struct brw_screen *bscreen = brw_screen(brw->base.screen); - return brw_is_buffer_referenced_by_bo( brw->brw_screen, + return brw_is_buffer_referenced_by_bo( bscreen, buffer, brw->batch->buf ); } @@ -62,8 +63,9 @@ static unsigned brw_is_texture_referenced(struct pipe_context *pipe, unsigned level) { struct brw_context *brw = brw_context(pipe); + struct brw_screen *bscreen = brw_screen(brw->base.screen); - return brw_is_texture_referenced_by_bo( brw->brw_screen, + return brw_is_texture_referenced_by_bo( bscreen, texture, face, level, brw->batch->buf ); } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit