i965/vec4: add component packing for gs
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 23 Jun 2016 03:03:47 +0000 (13:03 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 21 Jul 2016 02:06:11 +0000 (12:06 +1000)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp

index 9ebfb27ed2ab1d9aff3b7e78ff3003ae4fa20284..16d2410b0d53d0858999ea5e4d9bc3228c7fa9bb 100644 (file)
@@ -72,6 +72,8 @@ vec4_gs_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
       src = src_reg(ATTR, BRW_VARYING_SLOT_COUNT * vertex->u32[0] +
                           instr->const_index[0] + offset->u32[0],
                     type);
+      src.swizzle = BRW_SWZ_COMP_INPUT(nir_intrinsic_component(instr));
+
       /* gl_PointSize is passed in the .w component of the VUE header */
       if (instr->const_index[0] == VARYING_SLOT_PSIZ)
          src.swizzle = BRW_SWIZZLE_WWWW;