diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2021-07-16 18:43:32 +0200 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-07-20 08:06:44 +0000 |
commit | 8be61e8a9e49190593e0c90077a8ce100b5743de (patch) | |
tree | a0604c4ab72a4a14f4d7430b6f22e6bfbb1f9a95 /src/mesa/main/uniform_query.cpp | |
parent | 9b1a296172df38561d650abf98ee2e1c77ac6fc2 (diff) |
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: 736f1f70ab8 ("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>
Diffstat (limited to 'src/mesa/main/uniform_query.cpp')
-rw-r--r-- | src/mesa/main/uniform_query.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index b5b5f1a6ec4..206f6a86450 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -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 |