mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
zink: only reset zink_resource::so_valid on buffer rebind
otherwise this is going to randomly modify some image properties 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
dabe477b4f
commit
1a68f2eb8f
1 changed files with 5 additions and 4 deletions
|
|
@ -3919,12 +3919,13 @@ rebind_image(struct zink_context *ctx, struct zink_resource *res)
|
|||
bool
|
||||
zink_resource_rebind(struct zink_context *ctx, struct zink_resource *res)
|
||||
{
|
||||
/* force counter buffer reset */
|
||||
res->so_valid = false;
|
||||
if (!zink_resource_has_binds(res))
|
||||
return true;
|
||||
if (res->base.b.target == PIPE_BUFFER)
|
||||
return 0;
|
||||
if (res->base.b.target == PIPE_BUFFER) {
|
||||
/* force counter buffer reset */
|
||||
res->so_valid = false;
|
||||
return rebind_buffer(ctx, res, 0, 0) == res->bind_count[0] + res->bind_count[1];
|
||||
}
|
||||
rebind_image(ctx, res);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue