From 982134d22ec51da1c34eba7d7a3ce33a3501c906 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 29 Jul 2019 16:56:03 -0700 Subject: [PATCH] pan/midgard: Compose original texture swizzle in RA Used for lowering derivatives. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_ra.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c index dfce0445b3c..60dadae945a 100644 --- a/src/panfrost/midgard/midgard_ra.c +++ b/src/panfrost/midgard/midgard_ra.c @@ -833,8 +833,10 @@ install_registers_instr( ins->texture.out_full = 1; ins->texture.out_upper = 0; ins->texture.out_reg_select = dest.reg - 28; - ins->texture.swizzle = dest.swizzle; - ins->texture.mask = dest.mask; + ins->texture.swizzle = + compose_swizzle(ins->texture.swizzle, dest.mask, dest, dest); + ins->mask = + compose_writemask(ins->mask, dest); /* If there is a register LOD/bias, use it */ if (args.src1 > -1) { -- 2.30.2