Mesa (master): i965: Fix surface state dumping with INTEL_DEBUG=batch.

Eric Anholt anholt at kemper.freedesktop.org
Mon Jun 14 21:04:19 UTC 2010


Module: Mesa
Branch: master
Commit: 7dcba1af9d0139ead8a0288ad272ea1116aaf3b3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7dcba1af9d0139ead8a0288ad272ea1116aaf3b3

Author: Eric Anholt <eric at anholt.net>
Date:   Sun Jun 13 00:41:01 2010 -0700

i965: Fix surface state dumping with INTEL_DEBUG=batch.

I broke this with the state streaming changes.

---

 src/mesa/drivers/dri/i965/brw_state_dump.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index cb66806..d410861 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -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",




More information about the mesa-commit mailing list