Module: Mesa
Branch: master
Commit: a52e69821902f1eeac1f330113fab61da932dd2a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a52e69821902f1eeac1f330113fab61da932dd2a

Author: Rob Clark <robdcl...@gmail.com>
Date:   Thu Apr 26 14:52:09 2018 -0400

freedreno/ir3: propagate HALF flag across fanout

If we have a fanout (split) meta instruction to split the result of a
vector instruction, propagate the HALF flag back to the original
instruction.  Otherwise result ends up in a full precision register
while instruction(s) that use the result look in a half-precision
register.

Signed-off-by: Rob Clark <robdcl...@gmail.com>

---

 src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c 
b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
index 3feb1ce0a5..186171960e 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
@@ -495,7 +495,10 @@ put_dst(struct ir3_context *ctx, nir_dest *dst)
 
        if (bit_size < 32) {
                for (unsigned i = 0; i < ctx->last_dst_n; i++) {
-                       ctx->last_dst[i]->regs[0]->flags |= IR3_REG_HALF;
+                       struct ir3_instruction *dst = ctx->last_dst[i];
+                       dst->regs[0]->flags |= IR3_REG_HALF;
+                       if (ctx->last_dst[i]->opc == OPC_META_FO)
+                               dst->regs[1]->instr->regs[0]->flags |= 
IR3_REG_HALF;
                }
        }
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to