panfrost/midgard: Set minimal swizzle on texture input
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 11 Jun 2019 16:54:22 +0000 (09:54 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 12 Jun 2019 21:32:01 +0000 (14:32 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/midgard/midgard_compile.c

index 1e1da1db0607745a021f8d6226c869080364754a..4bddea40fdb1328b2deaf9e45a3b22b556f38efe 100644 (file)
@@ -83,6 +83,7 @@ midgard_block_add_successor(midgard_block *block, midgard_block *successor)
 
 #define EMIT(op, ...) emit_mir_instruction(ctx, v_##op(__VA_ARGS__));
 #define SWIZZLE_XYZW SWIZZLE(COMPONENT_X, COMPONENT_Y, COMPONENT_Z, COMPONENT_W)
+#define SWIZZLE_XYXX SWIZZLE(COMPONENT_X, COMPONENT_Y, COMPONENT_X, COMPONENT_X)
 #define SWIZZLE_XXXX SWIZZLE(COMPONENT_X, COMPONENT_X, COMPONENT_X, COMPONENT_X)
 #define SWIZZLE_WWWW SWIZZLE(COMPONENT_W, COMPONENT_W, COMPONENT_W, COMPONENT_W)
 
@@ -1416,7 +1417,7 @@ emit_tex(compiler_context *ctx, nir_tex_instr *instr)
 
                         /* TODO: half */
                         .in_reg_full = 1,
-                        .in_reg_swizzle = SWIZZLE_XYZW,
+                        .in_reg_swizzle = SWIZZLE_XYXX,
                         .out_full = 1,
 
                         /* Always 1 */