[Mesa-dev] [PATCH 23/27] i965/vec4: add support for packing tcs outputs

Timothy Arceri timothy.arceri at collabora.com
Fri Jun 24 03:52:58 UTC 2016


---
 src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp b/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp
index 8c76e81..0a33a39 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp
@@ -406,6 +406,13 @@ vec4_tcs_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
          }
       }
 
+      unsigned first_component = nir_intrinsic_component(instr);
+      if (first_component) {
+         assert(swiz == BRW_SWIZZLE_XYZW);
+         swiz = BRW_SWZ_COMP_LEFT(first_component);
+         mask = mask << first_component;
+      }
+
       emit_urb_write(swizzle(value, swiz), mask,
                      imm_offset, indirect_offset);
       break;
-- 
2.5.5



More information about the mesa-dev mailing list