From e3a51a408fbe6dae7d9a6d15944de2833742462e Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 19 Oct 2021 20:50:02 +0200 Subject: [PATCH] mesa: don't reset SamplersValidated if nothing changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This could prevent error detection, if a uniform change sets SamplersValidated to true without calling _mesa_update_shader_textures_used. Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/uniform_query.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index b2a79f01321..858b08cebb2 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -1355,6 +1355,7 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values, */ bool flushed = false; bool any_changed = false; + bool samplers_validated = shProg->SamplersValidated; shProg->SamplersValidated = GL_TRUE; @@ -1409,6 +1410,8 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values, if (any_changed) _mesa_update_valid_to_render_state(ctx); + else + shProg->SamplersValidated = samplers_validated; } /* If the uniform is an image, update the mapping from image