summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-03-16 21:18:10 -0700
committerDave Airlie <[email protected]>2017-03-20 14:08:19 +1000
commitfcca6a83cddfdd7b82b9a7e0412c060d0830e3c3 (patch)
tree8e5bf8ecb6ca72d78e203a8a8200ac84bafb41ff /src
parente0208949d1eaa7d688b5230581ed353889be5246 (diff)
spirv: Implement IsInf using an integer comparison
Since we already do fabs on the one source, we're guaranteed to get positive infinity if we get any infinity at all. Since +inf only has one IEEE 754 representation, we can use an integer comparison and avoid all of the ordered/unordered issues. Cc: Dave Airlie <[email protected]> Reviewed-by: Elie Tournier <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/spirv/vtn_alu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c
index 0738fe0cf99..9e4beedf926 100644
--- a/src/compiler/spirv/vtn_alu.c
+++ b/src/compiler/spirv/vtn_alu.c
@@ -447,7 +447,7 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
break;
case SpvOpIsInf:
- val->ssa->def = nir_feq(&b->nb, nir_fabs(&b->nb, src[0]),
+ val->ssa->def = nir_ieq(&b->nb, nir_fabs(&b->nb, src[0]),
nir_imm_float(&b->nb, INFINITY));
break;