[Mesa-dev] [PATCH 4/6] panfrost/midgard: Set minimal swizzle on texture input

Alyssa Rosenzweig alyssa.rosenzweig at collabora.com
Tue Jun 11 17:53:26 UTC 2019


Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
 src/gallium/drivers/panfrost/midgard/midgard_compile.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index c328d2d69f9..5d21ae2f844 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -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)
 
@@ -1407,7 +1408,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 */
-- 
2.20.1



More information about the mesa-dev mailing list