summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-04-29 21:56:25 -0500
committerNicolai Hähnle <[email protected]>2016-05-07 16:46:59 -0500
commit62b7958cd0ec03ff1e15144f0104728458621d1d (patch)
treed330bc5025886e1cfdd7bccd252e45fe2b98a6d7 /src/mesa/state_tracker/st_program.c
parent945c6887ab43a98a6e042841b2fb547aaef250e2 (diff)
gallium: fix various undefined left shifts into sign bit
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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c4
1 files changed, 2 insertions, 2 deletions
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;