mesa: fix bindless uniform samplers update

According to the comment below some extra magic is needed
for bindless samplers, so don't do an early return in this
case.

Fixes: 736f1f70ab ("mesa: skip redundant uniform updates for glUniform")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4806
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11930>
(cherry picked from commit 8be61e8a9e)
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2021-07-16 18:43:32 +02:00 committed by Eric Engestrom
parent c41e33f519
commit 74e17ceebc
2 changed files with 5 additions and 2 deletions

View file

@ -868,7 +868,7 @@
"description": "mesa: fix bindless uniform samplers update",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "736f1f70ab8a7995041a707d28d0e1a5f2940f4c"
},

View file

@ -1340,7 +1340,10 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values,
ctx_flushed = true;
}
}
if (!ctx_flushed)
/* Return early if possible. Bindless samplers need to be processed
* because of the !sampler->bound codepath below.
*/
if (!ctx_flushed && !(uni->type->is_sampler() && uni->is_bindless))
return; /* no change in uniform values */
/* If the uniform is a sampler, do the extra magic necessary to propagate