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>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user