zink: flag ssbo buffer resources as having pending writes per stage
I meant to squash this down but didn't get around to it
Fixes: e79d905f5a
("zink: flag ssbo buffer resources as having pending writes on batch")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628>
This commit is contained in:
parent
db1c9b36b4
commit
bceb47d57b
|
@ -600,8 +600,8 @@ zink_set_shader_buffers(struct pipe_context *pctx,
|
|||
struct zink_context *ctx = zink_context(pctx);
|
||||
|
||||
unsigned modified_bits = u_bit_consecutive(start_slot, count);
|
||||
ctx->writable_ssbos &= ~modified_bits;
|
||||
ctx->writable_ssbos |= writable_bitmask << start_slot;
|
||||
ctx->writable_ssbos[p_stage] &= ~modified_bits;
|
||||
ctx->writable_ssbos[p_stage] |= writable_bitmask << start_slot;
|
||||
|
||||
for (unsigned i = 0; i < count; i++) {
|
||||
struct pipe_shader_buffer *ssbo = &ctx->ssbos[p_stage][start_slot + i];
|
||||
|
|
|
@ -107,7 +107,7 @@ struct zink_context {
|
|||
|
||||
struct pipe_constant_buffer ubos[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS];
|
||||
struct pipe_shader_buffer ssbos[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_BUFFERS];
|
||||
uint32_t writable_ssbos;
|
||||
uint32_t writable_ssbos[PIPE_SHADER_TYPES];
|
||||
struct zink_image_view image_views[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_IMAGES];
|
||||
struct pipe_framebuffer_state fb_state;
|
||||
|
||||
|
|
|
@ -370,7 +370,7 @@ zink_draw_vbo(struct pipe_context *pctx,
|
|||
assert(ctx->ssbos[i][index].buffer_size <= screen->info.props.limits.maxStorageBufferRange);
|
||||
assert(ctx->ssbos[i][index].buffer);
|
||||
struct zink_resource *res = zink_resource(ctx->ssbos[i][index].buffer);
|
||||
if (ctx->writable_ssbos & (1 << index))
|
||||
if (ctx->writable_ssbos[i] & (1 << index))
|
||||
write_desc_resources[num_wds] = res;
|
||||
else
|
||||
read_desc_resources[num_wds] = res;
|
||||
|
|
Loading…
Reference in New Issue