---
 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 ad7e8b7..37cc8d4 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -1277,8 +1277,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
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to