diff options
author | Christian Gmeiner <[email protected]> | 2019-09-13 08:24:33 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-25 20:49:32 +0000 |
commit | 061b262a0c2482e10286c4ecc96a81b47546100a (patch) | |
tree | 05fa61988f4cc3e0212c7795d6bbd794abcdcb81 | |
parent | 0ed053f03d936d301091dd68e96ced8dbedc83b2 (diff) |
freedreno: ssbo: keep track if a buffer gets written
Signed-off-by: Christian Gmeiner <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963>
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_context.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_state.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index f92790c0ecf..30deddd21b3 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -66,6 +66,7 @@ struct fd_constbuf_stateobj { struct fd_shaderbuf_stateobj { struct pipe_shader_buffer sb[PIPE_MAX_SHADER_BUFFERS]; uint32_t enabled_mask; + uint32_t writable_mask; }; struct fd_shaderimg_stateobj { diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c index dd42ef4c6e9..a748bfec82c 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.c +++ b/src/gallium/drivers/freedreno/freedreno_state.c @@ -129,6 +129,8 @@ fd_set_shader_buffers(struct pipe_context *pctx, const unsigned modified_bits = u_bit_consecutive(start, count); so->enabled_mask &= ~modified_bits; + so->writable_mask &= ~modified_bits; + so->writable_mask |= writable_bitmask << start; for (unsigned i = 0; i < count; i++) { unsigned n = i + start; |