Mesa (main): mesa: fix bindless uniform samplers update
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 20 08:49:56 UTC 2021
Module: Mesa
Branch: main
Commit: 8be61e8a9e49190593e0c90077a8ce100b5743de
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8be61e8a9e49190593e0c90077a8ce100b5743de
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Fri Jul 16 18:43:32 2021 +0200
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 at amd.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11930>
---
src/mesa/main/uniform_query.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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
More information about the mesa-commit
mailing list