i965g: remove redundant screen pointer in brw context struct
authorKeith Whitwell <keithw@vmware.com>
Wed, 4 Nov 2009 23:30:52 +0000 (23:30 +0000)
committerKeith Whitwell <keithw@vmware.com>
Wed, 4 Nov 2009 23:30:52 +0000 (23:30 +0000)
src/gallium/drivers/i965/brw_context.h
src/gallium/drivers/i965/brw_curbe.c
src/gallium/drivers/i965/brw_draw.c
src/gallium/drivers/i965/brw_pipe_flush.c

index d033cb0f9102ddd743f325603651e960e27cad18..0c1dcf8a1472717bbf7a6452963db14e32e7722f 100644 (file)
@@ -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;
index 5763173bca631884416bf0555a8978b1ed4aed20..f62b0b0d5e23933460cd90a5b2baf3edd8389f16 100644 (file)
@@ -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,
index a2bed6256b7593465f776a2410c3d6577caac88b..6d6b1c7c5c3ef94a22ab108e15eebfd9282b1207 100644 (file)
@@ -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 );
index 9dff2beeb1da8b412d6009ddf7b0aae7f292fca8..fdc4814b2219cd3bd2d577ccafec0ec4bc58067f 100644 (file)
@@ -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 );
 }