i965/vec4: add support for packing inputs
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 22 Jun 2016 23:37:03 +0000 (09:37 +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_nir.cpp

index 4f3cc3d3e3efd756214fc79e9dd6351087059fea..f786f5839a28174a715edb9b9e2ed3e9902cc4e5 100644 (file)
@@ -397,6 +397,8 @@ vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
 
       src = src_reg(ATTR, instr->const_index[0] + const_offset->u32[0],
                     glsl_type::uvec4_type);
+      /* Swizzle source based on component layout qualifier */
+      src.swizzle = BRW_SWZ_COMP_INPUT(nir_intrinsic_component(instr));
 
       dest = get_nir_dest(instr->dest, src.type);
       dest.writemask = brw_writemask_for_size(instr->num_components);