[Mesa-dev] [PATCH 51/95] i965/vec4: add a sanity check for force_vstride0

Iago Toral Quiroga itoral at igalia.com
Tue Jul 19 10:40:48 UTC 2016


We only set this to true when fixing up 64bit regions and for one
specific purpose only, so check that nothing else sets this to true.
This helped me find a bug where the field was incorrectly initialized
to true in some cases.
---
 src/mesa/drivers/dri/i965/brw_vec4.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index fd0cafd..2bb6a8a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -2183,6 +2183,9 @@ vec4_visitor::expand_64bit_swizzle_to_32bit()
          continue;
 
       for (int arg = 0; arg < 3; arg++) {
+         /* Sanity check: we only set force_vstride0 here */
+         assert(!inst->src[arg].force_vstride0);
+
          if (inst->src[arg].file == BAD_FILE)
             continue;
 
-- 
2.7.4



More information about the mesa-dev mailing list