freedreno: Fix tracking of enabled SSBOs

Clearing all of the modified bits an relying on OR'ing the needed bits
back in the loop below doesn't quite work out, Because of early continue
if the SSBO has not changed.

Fixes: 0ed053f03d ("freedreno: simplify fd_set_shader_buffers(..)")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20575>
(cherry picked from commit e41d19a711)
This commit is contained in:
Rob Clark 2023-01-03 14:23:28 -08:00 committed by Dylan Baker
parent 1c6b8b8ad6
commit aeb5a36003
2 changed files with 3 additions and 2 deletions

View file

@ -706,7 +706,7 @@
"description": "freedreno: Fix tracking of enabled SSBOs",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0ed053f03d936d301091dd68e96ced8dbedc83b2"
},

View file

@ -164,7 +164,6 @@ fd_set_shader_buffers(struct pipe_context *pctx, enum pipe_shader_type shader,
struct fd_shaderbuf_stateobj *so = &ctx->shaderbuf[shader];
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;
@ -194,6 +193,8 @@ fd_set_shader_buffers(struct pipe_context *pctx, enum pipe_shader_type shader,
}
} else {
pipe_resource_reference(&buf->buffer, NULL);
so->enabled_mask &= ~BIT(n);
}
}