summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe
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/gallium/drivers/softpipe
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/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_quad_stipple.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_quad_stipple.c b/src/gallium/drivers/softpipe/sp_quad_stipple.c
index a0527a596a6..4b29c2eb221 100644
--- a/src/gallium/drivers/softpipe/sp_quad_stipple.c
+++ b/src/gallium/drivers/softpipe/sp_quad_stipple.c
@@ -16,8 +16,8 @@
static void
stipple_quad(struct quad_stage *qs, struct quad_header *quads[], unsigned nr)
{
- static const uint bit31 = 1 << 31;
- static const uint bit30 = 1 << 30;
+ static const uint bit31 = 1u << 31;
+ static const uint bit30 = 1u << 30;
unsigned pass = nr;
struct softpipe_context *softpipe = qs->softpipe;