diff options
author | Rob Clark <[email protected]> | 2018-06-11 14:05:19 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-06-19 13:02:28 -0400 |
commit | ced14f1c7a821dbb3fdb3c76b50a256c6568c714 (patch) | |
tree | 539d78fbdee9d77501d00a7b42a2e4709648d9c2 /src/gallium/drivers/freedreno/a2xx | |
parent | 570844059789cf497123a85ed19eac9274f11139 (diff) |
freedreno: remove per-stateobj dirty_mask's
These never got updated in fd_context_all_dirty() so actually trying to
rely on them (in the case of fd5_emit_images()) ends up in some cases
where state is not emitted but should be. Best to just rip this out.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c index a787b71e379..d749eb0324a 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c @@ -58,10 +58,6 @@ emit_constants(struct fd_ringbuffer *ring, uint32_t base, uint32_t start_base = base; unsigned i; - // XXX TODO only emit dirty consts.. but we need to keep track if - // they are clobbered by a clear, gmem2mem, or mem2gmem.. - constbuf->dirty_mask = enabled_mask; - /* emit user constants: */ while (enabled_mask) { unsigned index = ffs(enabled_mask) - 1; @@ -79,25 +75,21 @@ emit_constants(struct fd_ringbuffer *ring, uint32_t base, if (shader && ((base - start_base) >= (shader->first_immediate * 4))) break; - if (constbuf->dirty_mask & (1 << index)) { - const uint32_t *dwords; - - if (cb->user_buffer) { - dwords = cb->user_buffer; - } else { - struct fd_resource *rsc = fd_resource(cb->buffer); - dwords = fd_bo_map(rsc->bo); - } + const uint32_t *dwords; - dwords = (uint32_t *)(((uint8_t *)dwords) + cb->buffer_offset); + if (cb->user_buffer) { + dwords = cb->user_buffer; + } else { + struct fd_resource *rsc = fd_resource(cb->buffer); + dwords = fd_bo_map(rsc->bo); + } - OUT_PKT3(ring, CP_SET_CONSTANT, size + 1); - OUT_RING(ring, base); - for (i = 0; i < size; i++) - OUT_RING(ring, *(dwords++)); + dwords = (uint32_t *)(((uint8_t *)dwords) + cb->buffer_offset); - constbuf->dirty_mask &= ~(1 << index); - } + OUT_PKT3(ring, CP_SET_CONSTANT, size + 1); + OUT_RING(ring, base); + for (i = 0; i < size; i++) + OUT_RING(ring, *(dwords++)); base += size; enabled_mask &= ~(1 << index); |