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

Submitted by Iago Toral Quiroga on July 19, 2016, 10:40 a.m.

Details

Message ID 1468924892-6910-52-git-send-email-itoral@igalia.com
State New
Headers show
Series "i965 Haswell ARB_gpu_shader_fp64 / OpenGL 4.0" ( rev: 2 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Iago Toral Quiroga July 19, 2016, 10:40 a.m.
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(+)

Patch hide | download patch | download mbox

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;