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/gallium/auxiliary/tgsi/tgsi_ureg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/tgsi/tgsi_ureg.c') diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 021b81f3874..43b8bb10f1c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -1735,7 +1735,7 @@ static void emit_decls( struct ureg_program *ureg ) if (ureg->processor == PIPE_SHADER_VERTEX) { for (i = 0; i < PIPE_MAX_ATTRIBS; i++) { - if (ureg->vs_inputs[i/32] & (1 << (i%32))) { + if (ureg->vs_inputs[i/32] & (1u << (i%32))) { emit_decl_range( ureg, TGSI_FILE_INPUT, i, 1 ); } } -- cgit v1.2.3