From: Pierre-Eric Pelloux-Prayer Date: Fri, 16 Jul 2021 16:43:32 +0000 (+0200) Subject: mesa: fix bindless uniform samplers update X-Git-Tag: upstream/22.3.5~20083 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8be61e8a9e49190593e0c90077a8ce100b5743de;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Timothy Arceri Part-of: --- diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index b5b5f1a..206f6a8 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