summaryrefslogtreecommitdiffstats
path: root/src/broadcom/compiler
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-02-13 12:21:01 -0800
committerEric Anholt <[email protected]>2019-02-18 18:09:07 -0800
commit07d5b5a97273a9ffb192b80657d2082e94cbbf4c (patch)
tree2ca5bad7fb9d00e0e0f439bd4cb50098d2792c29 /src/broadcom/compiler
parent3022b4bd82c1f142aa0bfbe754e771f0fa0f26e6 (diff)
v3d: Fix f2b32 behavior.
Now that we don't have the vir_PF() magic, it's obvious that we were doing the wrong thing for f2b32 by allowing -0.0 to produce true instead of false.
Diffstat (limited to 'src/broadcom/compiler')
-rw-r--r--src/broadcom/compiler/nir_to_vir.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c
index 8dee69e90de..86f4a3a12c1 100644
--- a/src/broadcom/compiler/nir_to_vir.c
+++ b/src/broadcom/compiler/nir_to_vir.c
@@ -876,12 +876,17 @@ ntq_emit_alu(struct v3d_compile *c, nir_alu_instr *instr)
result = vir_AND(c, src[0], vir_uniform_ui(c, 1));
break;
case nir_op_i2b32:
- case nir_op_f2b32:
vir_set_pf(vir_MOV_dest(c, vir_nop_reg(), src[0]),
V3D_QPU_PF_PUSHZ);
result = vir_MOV(c, vir_SEL(c, V3D_QPU_COND_IFNA,
vir_uniform_ui(c, ~0),
vir_uniform_ui(c, 0)));
+ case nir_op_f2b32:
+ vir_set_pf(vir_FMOV_dest(c, vir_nop_reg(), src[0]),
+ V3D_QPU_PF_PUSHZ);
+ result = vir_MOV(c, vir_SEL(c, V3D_QPU_COND_IFNA,
+ vir_uniform_ui(c, ~0),
+ vir_uniform_ui(c, 0)));
break;
case nir_op_iadd: