i965: Fix surface state dumping with INTEL_DEBUG=batch.
authorEric Anholt <eric@anholt.net>
Sun, 13 Jun 2010 07:41:01 +0000 (00:41 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 14 Jun 2010 21:03:56 +0000 (14:03 -0700)
I broke this with the state streaming changes.

src/mesa/drivers/dri/i965/brw_state_dump.c

index cb66806..d410861 100644 (file)
@@ -111,8 +111,8 @@ static void dump_wm_surface_state(struct brw_context *brw)
         continue;
       }
       drm_intel_bo_map(surf_bo, GL_FALSE);
-      surfoff = surf_bo->offset;
-      surf = (struct brw_surface_state *)(surf_bo->virtual);
+      surfoff = surf_bo->offset + brw->wm.surf_offset[i];
+      surf = (struct brw_surface_state *)(surf_bo->virtual + brw->wm.surf_offset[i]);
 
       sprintf(name, "WM SS%d", i);
       state_out(name, surf, surfoff, 0, "%s %s\n",