mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
zink: don't check rebind count outside of buffer/image rebind function
zink_resource_has_binds() only checks descriptor binds, and this doesn't include streamout or fb bindings, so call these functions from the specific rebind points to ensure those cases are also checked fixes #5541 cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13490>
This commit is contained in:
parent
1a68f2eb8f
commit
0a6f5ec942
1 changed files with 3 additions and 2 deletions
|
|
@ -3768,6 +3768,9 @@ rebind_buffer(struct zink_context *ctx, struct zink_resource *res, uint32_t rebi
|
|||
unsigned num_rebinds = 0;
|
||||
bool has_write = false;
|
||||
|
||||
if (!zink_resource_has_binds(res))
|
||||
return 0;
|
||||
|
||||
assert(!res->bindless[1]); //TODO
|
||||
if ((rebind_mask & BITFIELD_BIT(TC_BINDING_STREAMOUT_BUFFER)) || (!rebind_mask && res->so_bind_count && ctx->num_so_targets)) {
|
||||
for (unsigned i = 0; i < ctx->num_so_targets; i++) {
|
||||
|
|
@ -3919,8 +3922,6 @@ rebind_image(struct zink_context *ctx, struct zink_resource *res)
|
|||
bool
|
||||
zink_resource_rebind(struct zink_context *ctx, struct zink_resource *res)
|
||||
{
|
||||
if (!zink_resource_has_binds(res))
|
||||
return 0;
|
||||
if (res->base.b.target == PIPE_BUFFER) {
|
||||
/* force counter buffer reset */
|
||||
res->so_valid = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue