From: Brian Paul Date: Wed, 26 Aug 2009 16:58:06 +0000 (-0600) Subject: mesa: var renaming, new assertion X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f05344fcea329c6dee04356a71323f0b7ac71566;p=mesa.git mesa: var renaming, new assertion --- 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); } } }