Merge branch 'mesa_7_6_branch'
[mesa.git] / src / gallium / drivers / i965simple / brw_wm_surface_state.c
index 1a326f99186c93a5097006dedc88f5952b9030b5..b5b9e0e7026bc57f9d4ed4b7b34cde8b57a85101 100644 (file)
@@ -193,6 +193,7 @@ static void upload_wm_surfaces(struct brw_context *brw )
       /* BRW_NEW_FRAMEBUFFER
        */
       struct pipe_surface *pipe_surface = brw->attribs.FrameBuffer.cbufs[0];/*fixme*/
+      struct brw_texture *tex = (struct brw_texture *)pipe_surface->texture;
 
       memset(&surf, 0, sizeof(surf));
 
@@ -204,7 +205,7 @@ static void upload_wm_surfaces(struct brw_context *brw )
 
         surf.ss0.surface_type = BRW_SURFACE_2D;
 
-        surf.ss1.base_addr = brw_buffer_offset( brw, pipe_surface->buffer );
+        surf.ss1.base_addr = brw_buffer_offset( brw, tex->buffer );
 
         surf.ss2.width = pipe_surface->width - 1;
         surf.ss2.height = pipe_surface->height - 1;
@@ -241,7 +242,7 @@ static void upload_wm_surfaces(struct brw_context *brw )
       const struct brw_texture *texUnit = brw->attribs.Texture[i];
 
       if (texUnit &&
-         texUnit->base.refcount/*(texUnit->refcount > 0) == really used */) {
+         texUnit->base.reference.count/*(texUnit->reference.count > 0) == really used */) {
 
         brw_update_texture_surface(brw, i);