[Mesa-dev] [PATCH 2/9] mesa/main: fix another undefined left shift

Nicolai Hähnle nhaehnle at gmail.com
Sat Apr 30 07:24:30 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/mesa/main/uniforms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index a9308d0..7758640 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -78,7 +78,7 @@ _mesa_update_shader_textures_used(struct gl_shader_program *shProg,
    shProg->SamplersValidated = GL_TRUE;
 
    for (s = 0; s < MAX_SAMPLERS; s++) {
-      if (prog->SamplersUsed & (1 << s)) {
+      if (prog->SamplersUsed & (1u << s)) {
          GLuint unit = shader->SamplerUnits[s];
          GLuint tgt = shader->SamplerTargets[s];
          assert(unit < ARRAY_SIZE(prog->TexturesUsed));
-- 
2.7.4



More information about the mesa-dev mailing list