diff options
author | Kenneth Graunke <[email protected]> | 2014-07-26 20:43:40 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-08-02 05:16:40 -0700 |
commit | 6b5b78b518c2b55bffec25f794de043a408976e0 (patch) | |
tree | cbc069fd6f17c92f6637096b4ad5e32451aea0f9 | |
parent | 3f3e0be666339b7b2377123db1d6f09463c64bbd (diff) |
i965: Delete redundant sampler state dumping code.
Although the Gen4-6 and Gen7+ variants used different structure types,
they didn't use any of the fields - only the size, which is identical.
So both decoders did exactly the same thing.
Someday we should implement useful decoders for SAMPLER_STATE.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_dump.c | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c index 9d838591cde..611998f1296 100644 --- a/src/mesa/drivers/dri/i965/brw_state_dump.c +++ b/src/mesa/drivers/dri/i965/brw_state_dump.c @@ -255,33 +255,9 @@ static void dump_sampler_state(struct brw_context *brw, uint32_t offset, uint32_t size) { int i; - struct brw_sampler_state *samp = brw->batch.bo->virtual + offset; + uint32_t *samp = brw->batch.bo->virtual + offset; - assert(brw->gen < 7); - - for (i = 0; i < size / sizeof(*samp); i++) { - char name[20]; - - sprintf(name, "WM SAMP%d", i); - batch_out(brw, name, offset, 0, "filtering\n"); - batch_out(brw, name, offset, 1, "wrapping, lod\n"); - batch_out(brw, name, offset, 2, "default color pointer\n"); - batch_out(brw, name, offset, 3, "chroma key, aniso\n"); - - samp++; - offset += sizeof(*samp); - } -} - -static void dump_gen7_sampler_state(struct brw_context *brw, - uint32_t offset, uint32_t size) -{ - struct gen7_sampler_state *samp = brw->batch.bo->virtual + offset; - int i; - - assert(brw->gen >= 7); - - for (i = 0; i < size / sizeof(*samp); i++) { + for (i = 0; i < size / 16; i++) { char name[20]; sprintf(name, "WM SAMP%d", i); @@ -290,12 +266,11 @@ static void dump_gen7_sampler_state(struct brw_context *brw, batch_out(brw, name, offset, 2, "default color pointer\n"); batch_out(brw, name, offset, 3, "chroma key, aniso\n"); - samp++; - offset += sizeof(*samp); + samp += 4; + offset += 4 * sizeof(uint32_t); } } - static void dump_sf_viewport_state(struct brw_context *brw, uint32_t offset) { @@ -590,11 +565,7 @@ dump_state_batch(struct brw_context *brw) } break; case AUB_TRACE_SAMPLER_STATE: - if (brw->gen < 7) { - dump_sampler_state(brw, offset, size); - } else { - dump_gen7_sampler_state(brw, offset, size); - } + dump_sampler_state(brw, offset, size); break; case AUB_TRACE_SAMPLER_DEFAULT_COLOR: dump_sdc(brw, offset); |