[Mesa-dev] [PATCH v2 091/103] i965/vec4/tes: consider register offsets during attribute setup

Iago Toral Quiroga itoral at igalia.com
Tue Oct 11 09:02:35 UTC 2016


---
 src/mesa/drivers/dri/i965/brw_vec4_tes.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_tes.cpp b/src/mesa/drivers/dri/i965/brw_vec4_tes.cpp
index c8fa2ca..a1aa672 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_tes.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_tes.cpp
@@ -84,8 +84,8 @@ vec4_tes_visitor::setup_payload()
 
          bool is_64bit = type_sz(inst->src[i].type) == 8;
 
-         struct brw_reg grf =
-            brw_vec4_grf(reg + inst->src[i].nr / 2, 4 * (inst->src[i].nr % 2));
+         unsigned slot = inst->src[i].nr + inst->src[i].offset / 16;
+         struct brw_reg grf = brw_vec4_grf(reg + slot / 2, 4 * (slot % 2));
          grf = stride(grf, 0, is_64bit ? 2 : 4, 1);
          grf.swizzle = inst->src[i].swizzle;
          grf.type = inst->src[i].type;
-- 
2.7.4



More information about the mesa-dev mailing list