From 8155c9bda02d991bc84a52aadcd5faeb9e0ff994 Mon Sep 17 00:00:00 2001 From: Vadim Girlin Date: Sat, 28 Apr 2012 18:14:34 +0400 Subject: [PATCH] initialize sampler uniforms with 0 --- src/glsl/link_uniforms.cpp | 2 +- src/mesa/program/program.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 2f1c9f5..48df747 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -330,7 +330,7 @@ link_assign_uniform_locations(struct gl_shader_program *prog) } for (unsigned i = 0; i < Elements(prog->SamplerUnits); i++) { - prog->SamplerUnits[i] = i; + prog->SamplerUnits[i] = 0; } /* First pass: Count the uniform resources used by the user-defined diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index 582cbcc..8e7556d 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -279,7 +279,7 @@ _mesa_init_program_struct( struct gl_context *ctx, struct gl_program *prog, /* default mapping from samplers to texture units */ for (i = 0; i < MAX_SAMPLERS; i++) - prog->SamplerUnits[i] = i; + prog->SamplerUnits[i] = 0; } return prog; -- 1.7.7.6