Mesa (master): bifrost: Emit "d3d" variant of comparison instructions

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 27 17:09:32 UTC 2020


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

Author: Chris Forbes <chrisforbes at google.com>
Date:   Sun Jul 26 10:31:13 2020 -0700

bifrost: Emit "d3d" variant of comparison instructions

The "d3d" variant uses ~0 as the true value. This is consistent
with NIR's nir_lower_bool_to_int32 pass.

Signed-off-by: Chris Forbes <chrisforbes at google.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6079>

---

 src/panfrost/bifrost/bi_pack.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c
index 96a155dc6a6..13d3808ceda 100644
--- a/src/panfrost/bifrost/bi_pack.c
+++ b/src/panfrost/bifrost/bi_pack.c
@@ -1022,7 +1022,7 @@ bi_pack_fma_cmp(bi_instruction *ins, bi_registers *regs)
                         .src_expand = 0,
                         .unk1 = 0,
                         .cond = cond,
-                        .op = BIFROST_FMA_OP_FCMP_GL
+                        .op = BIFROST_FMA_OP_FCMP_D3D
                 };
 
                 RETURN_PACKED(pack);
@@ -1042,7 +1042,7 @@ bi_pack_fma_cmp(bi_instruction *ins, bi_registers *regs)
                         .abs1 = l,
                         .unk = 0,
                         .cond = cond,
-                        .op = BIFROST_FMA_OP_FCMP_GL_16,
+                        .op = BIFROST_FMA_OP_FCMP_D3D_16,
                 };
 
                 RETURN_PACKED(pack);
@@ -1552,7 +1552,7 @@ bi_pack_add_icmp32(bi_instruction *ins, bi_registers *regs, bool flip,
                 .src1 = bi_get_src(ins, regs, flip ? 0 : 1),
                 .cond = cond,
                 .sz = 1,
-                .d3d = false,
+                .d3d = true,
                 .op = BIFROST_ADD_OP_ICMP_32
         };
 
@@ -1569,7 +1569,7 @@ bi_pack_add_icmp16(bi_instruction *ins, bi_registers *regs, bool flip,
                 .src0_swizzle = bi_swiz16(ins, flip ? 1 : 0),
                 .src1_swizzle = bi_swiz16(ins, flip ? 0 : 1),
                 .cond = cond,
-                .d3d = false,
+                .d3d = true,
                 .op = BIFROST_ADD_OP_ICMP_16
         };
 



More information about the mesa-commit mailing list