summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-06-22 17:01:03 -0700
committerEric Anholt <[email protected]>2011-07-11 09:27:26 -0700
commit6bbaa7c0e58cd477deb970cd52d281bb9f87486c (patch)
treefef8ff0dd647edf507b0428c1a394bc17595585c /src/mesa/drivers
parent13e82ece6d4761f07fb01e5a9aa57448d3bd2345 (diff)
i965: Dump the binding table using state_batch_list[].
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_dump.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index a7ead641605..3750ec6ec34 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -354,6 +354,22 @@ static void dump_blend_state(struct brw_context *brw, uint32_t offset)
batch_out(brw, name, offset, 1, "\n");
}
+static void dump_binding_table(struct brw_context *brw, uint32_t offset,
+ uint32_t size)
+{
+ char name[20];
+ int i;
+ uint32_t *data = brw->intel.batch.bo->virtual + offset;
+
+ for (i = 0; i < size / 4; i++) {
+ if (data[i] == 0)
+ continue;
+
+ sprintf(name, "BIND%d", i);
+ batch_out(brw, name, offset, i, "surface state address\n");
+ }
+}
+
static void brw_debug_prog(struct brw_context *brw,
const char *name, uint32_t prog_offset)
{
@@ -414,6 +430,9 @@ dump_state_batch(struct brw_context *brw)
case AUB_TRACE_BLEND_STATE:
dump_blend_state(brw, offset);
break;
+ case AUB_TRACE_BINDING_TABLE:
+ dump_binding_table(brw, offset, size);
+ break;
case AUB_TRACE_SURFACE_STATE:
if (intel->gen < 7) {
dump_surface_state(brw, offset);
@@ -451,11 +470,6 @@ void brw_debug_batch(struct intel_context *intel)
{
struct brw_context *brw = brw_context(&intel->ctx);
- state_struct_out("WM bind",
- brw->intel.batch.bo,
- brw->wm.bind_bo_offset,
- 4 * brw->wm.nr_surfaces);
-
if (intel->gen < 6)
state_struct_out("VS", intel->batch.bo, brw->vs.state_offset,
sizeof(struct brw_vs_unit_state));