summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/link_uniforms.cpp11
-rw-r--r--src/compiler/glsl/standalone.cpp4
2 files changed, 0 insertions, 15 deletions
diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp
index 90eac5cc512..caee147aa1d 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -1299,17 +1299,6 @@ link_assign_uniform_locations(struct gl_shader_program *prog,
if (sh == NULL)
continue;
- /* Uniforms that lack an initializer in the shader code have an initial
- * value of zero. This includes sampler uniforms.
- *
- * Page 24 (page 30 of the PDF) of the GLSL 1.20 spec says:
- *
- * "The link time initial value is either the value of the variable's
- * initializer, if present, or 0 if no initializer is present. Sampler
- * types cannot have initializers."
- */
- memset(sh->SamplerUnits, 0, sizeof(sh->SamplerUnits));
-
link_update_uniform_buffer_variables(sh, i);
/* Reset various per-shader target counts.
diff --git a/src/compiler/glsl/standalone.cpp b/src/compiler/glsl/standalone.cpp
index e93e9afcbfa..9a8d75d2863 100644
--- a/src/compiler/glsl/standalone.cpp
+++ b/src/compiler/glsl/standalone.cpp
@@ -107,10 +107,6 @@ init_gl_program(struct gl_program *prog, GLenum target, bool is_arb_asm)
prog->RefCount = 1;
prog->Format = GL_PROGRAM_FORMAT_ASCII_ARB;
prog->is_arb_asm = is_arb_asm;
-
- /* default mapping from samplers to texture units */
- for (int i = 0; i < MAX_SAMPLERS; i++)
- prog->SamplerUnits[i] = i;
}
struct gl_program *