diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2021-10-19 20:50:02 +0200 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2021-11-03 10:22:41 +0100 |
commit | e3a51a408fbe6dae7d9a6d15944de2833742462e (patch) | |
tree | 567a38a1ed45b1e415d4a41c32e1f743d7b2672a /src/mesa/main | |
parent | e15e3a8e8636c38def3e8a4fb93cfed90b8faf1b (diff) |
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@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13416>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/uniform_query.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 |