pan/midgard: Compose original texture swizzle in RA
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 29 Jul 2019 23:56:03 +0000 (16:56 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 30 Jul 2019 17:01:19 +0000 (10:01 -0700)
Used for lowering derivatives.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/midgard_ra.c

index dfce0445b3c95a6c3ac1181de8400dfcdffdcefe..60dadae945ab45be00a2d65f0d47ccdb6c5fc979 100644 (file)
@@ -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) {