[Mesa-dev] [PATCH 10/12] i965: Fix a warning in the release build.

Eric Anholt eric at anholt.net
Thu Apr 11 11:06:37 PDT 2013


This was copy and pasted from can_reswizzle_dst(), and we can just fold it
in instead to avoid the warning.
---
 src/mesa/drivers/dri/i965/brw_vec4.cpp |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 67dd17a..5e80318 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -805,7 +805,6 @@ vec4_instruction::reswizzle_dst(int dst_writemask, int swizzle)
       break;
    default:
       for (int c = 0; c < 4; c++) {
-         int bit = 1 << BRW_GET_SWZ(swizzle, c);
          /* Skip components of the swizzle not used by the dst. */
          if (!(dst_writemask & (1 << c)))
             continue;
@@ -813,7 +812,7 @@ vec4_instruction::reswizzle_dst(int dst_writemask, int swizzle)
          /* We don't do the reswizzling yet, so just sanity check that we
           * don't have to.
           */
-         assert(bit == (1 << c));
+         assert((1 << BRW_GET_SWZ(swizzle, c)) == (1 << c));
       }
       break;
    }
-- 
1.7.10.4



More information about the mesa-dev mailing list