Mesa (main): mesa: don't reset SamplersValidated if nothing changed

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 3 09:56:10 UTC 2021


Module: Mesa
Branch: main
Commit: e3a51a408fbe6dae7d9a6d15944de2833742462e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3a51a408fbe6dae7d9a6d15944de2833742462e

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Tue Oct 19 20:50:02 2021 +0200

mesa: don't reset SamplersValidated if nothing changed

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 <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13416>

---

 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



More information about the mesa-commit mailing list