llvmpipe: fix undefined shift 1 << 31.
authorDave Airlie <airlied@redhat.com>
Thu, 11 Apr 2019 10:37:43 +0000 (20:37 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 11 Apr 2019 22:54:02 +0000 (08:54 +1000)
Pointed out by coverity.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/llvmpipe/lp_setup_point.c

index 2192789bd4c347ae81159dc3dccf69fa06337cd1..fc1d5ef6e36fa7489b018d4fe38613406158b71e 100644 (file)
@@ -251,7 +251,7 @@ setup_point_coefficients( struct lp_setup_context *setup,
              * PIPE_MAX_SHADER_OUTPUTS bits.
              */
             if (semantic_index < PIPE_MAX_SHADER_OUTPUTS &&
-                (setup->sprite_coord_enable & (1 << semantic_index))) {
+                (setup->sprite_coord_enable & (1u << semantic_index))) {
                for (i = 0; i < NUM_CHANNELS; i++) {
                   if (usage_mask & (1 << i)) {
                      texcoord_coef(setup, info, slot + 1, i,