---
src/compiler/glsl/link_uniforms.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/compiler/glsl/link_uniforms.cpp
b/src/compiler/glsl/link_uniforms.cpp
index 799bcb2..a79bb33 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -1040,8 +1040,10 @@ link_assign_uniform_locations(struct gl_shader_program
*prog,
* initializer, if present, or 0 if no initializer is present.
Sampler
* types cannot have initializers."
*/
- memset(sh->SamplerUnits, 0, sizeof(sh->SamplerUnits));
- memset(sh->ImageUnits, 0, sizeof(sh->ImageUnits));
+ if (!is_cache_fallback) {
+ memset(sh->SamplerUnits, 0, sizeof(sh->SamplerUnits));
+ memset(sh->ImageUnits, 0, sizeof(sh->ImageUnits));
+ }
link_update_uniform_buffer_variables(sh);
--
2.7.4
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev