From: Eric Anholt Date: Thu, 23 Jun 2011 00:01:03 +0000 (-0700) Subject: i965: Dump the binding table using state_batch_list[]. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6bbaa7c0e58cd477deb970cd52d281bb9f87486c;p=mesa.git i965: Dump the binding table using state_batch_list[]. Reviewed-by: Kenneth Graunke --- 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));