diff options
author | Eric Anholt <eric@anholt.net> | 2011-07-08 13:35:42 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2011-07-11 09:27:27 -0700 |
commit | a1226bcd20a582146f1848cc0af8145c53b0ecbc (patch) | |
tree | f9a5aac0132a24db5a5bc3367bc60eaeae9e6596 /src/mesa/drivers/dri/i965/brw_state_dump.c | |
parent | 6e17a01e427bb621f606b4237fae58c446de9a70 (diff) |
i965/gen6: Add state dumping for the VS constants.
This is quite a bit of spam, but I think it's useful to have in a full
INTEL_DEBUG=batch dump. And a lot of this spam on glxgears is just
because we're awful at handling our constants :/
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_state_dump.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_dump.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c index e78e48f9ee9..0758cb51a6a 100644 --- a/src/mesa/drivers/dri/i965/brw_state_dump.c +++ b/src/mesa/drivers/dri/i965/brw_state_dump.c @@ -367,6 +367,23 @@ dump_scissor(struct brw_context *brw, uint32_t offset) scissor->xmax, scissor->ymax); } +static void +dump_vs_constants(struct brw_context *brw, uint32_t offset, uint32_t size) +{ + const char *name = "VS_CONST"; + struct intel_context *intel = &brw->intel; + uint32_t *as_uint = intel->batch.bo->virtual + offset; + float *as_float = intel->batch.bo->virtual + offset; + int i; + + for (i = 0; i < size / 4; i += 4) { + batch_out(brw, name, offset, i, "%3d: (% f % f % f % f) (0x%08x 0x%08x 0x%08x 0x%08x)\n", + i / 4, + as_float[i], as_float[i + 1], as_float[i + 2], as_float[i + 3], + as_uint[i], as_uint[i + 1], as_uint[i + 2], as_uint[i + 3]); + } +} + static void dump_binding_table(struct brw_context *brw, uint32_t offset, uint32_t size) { @@ -493,6 +510,9 @@ dump_state_batch(struct brw_context *brw) case AUB_TRACE_SCISSOR_STATE: dump_scissor(brw, offset); break; + case AUB_TRACE_VS_CONSTANTS: + dump_vs_constants(brw, offset, size); + break; default: break; } |