From 62b7958cd0ec03ff1e15144f0104728458621d1d Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Fri, 29 Apr 2016 21:56:25 -0500 Subject: gallium: fix various undefined left shifts into sign bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Funnily enough, some of these were turned into a compile-time error by gcc with -fsanitize=undefined ("initializer is not a constant"). Reviewed-by: Brian Paul Reviewed-by: Michel Dänzer Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/state_tracker/st_program.c') diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 32ada9f7b8a..444e5aac7bd 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -1121,7 +1121,7 @@ st_translate_program_common(struct st_context *st, /* Also add patch inputs. */ for (attr = 0; attr < 32; attr++) { - if (prog->PatchInputsRead & (1 << attr)) { + if (prog->PatchInputsRead & (1u << attr)) { GLuint slot = num_inputs++; GLuint patch_attr = VARYING_SLOT_PATCH0 + attr; @@ -1240,7 +1240,7 @@ st_translate_program_common(struct st_context *st, /* Also add patch outputs. */ for (attr = 0; attr < 32; attr++) { - if (prog->PatchOutputsWritten & (1 << attr)) { + if (prog->PatchOutputsWritten & (1u << attr)) { GLuint slot = num_outputs++; GLuint patch_attr = VARYING_SLOT_PATCH0 + attr; -- cgit v1.2.3