diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/shader_api.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index b52be128c3b..1b604f0713c 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -1553,10 +1553,11 @@ _mesa_update_shader_textures_used(struct gl_program *prog) for (s = 0; s < MAX_SAMPLERS; s++) { if (prog->SamplersUsed & (1 << s)) { - GLuint u = prog->SamplerUnits[s]; - GLuint t = prog->SamplerTargets[s]; - assert(u < MAX_TEXTURE_IMAGE_UNITS); - prog->TexturesUsed[u] |= (1 << t); + GLuint unit = prog->SamplerUnits[s]; + GLuint tgt = prog->SamplerTargets[s]; + assert(unit < MAX_TEXTURE_IMAGE_UNITS); + assert(tgt < NUM_TEXTURE_TARGETS); + prog->TexturesUsed[unit] |= (1 << tgt); } } } |