summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-02-23 14:21:06 +0100
committerEmil Velikov <[email protected]>2018-03-20 16:57:24 +0000
commitc03f382fff4a485189bf80f8f3847dfdb36c9b98 (patch)
treeb0c02432b803fd2012e51814753844229cdfffa0 /src
parent987ed51ec184c2509ba0ac270e827281e93cda56 (diff)
ac/nir: use ordered float comparisons except for not equal
Original patch from Timothy Arceri, I have just fixed the not equal case locally. This fixes one important rendering issue in Wolfenstein 2 (the cutscene transition issue). RadeonSI uses the same ordered comparisons, so I guess that what we should do as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104302 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104905 Cc: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Connor Abbott <[email protected]> (cherry picked from commit e05507a427b79e481eb8e45d7aa3c9b4b78376bf)
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 00359f6f0e1..3e0ab1f84da 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1823,16 +1823,16 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
result = emit_int_cmp(&ctx->ac, LLVMIntUGE, src[0], src[1]);
break;
case nir_op_feq:
- result = emit_float_cmp(&ctx->ac, LLVMRealUEQ, src[0], src[1]);
+ result = emit_float_cmp(&ctx->ac, LLVMRealOEQ, src[0], src[1]);
break;
case nir_op_fne:
result = emit_float_cmp(&ctx->ac, LLVMRealUNE, src[0], src[1]);
break;
case nir_op_flt:
- result = emit_float_cmp(&ctx->ac, LLVMRealULT, src[0], src[1]);
+ result = emit_float_cmp(&ctx->ac, LLVMRealOLT, src[0], src[1]);
break;
case nir_op_fge:
- result = emit_float_cmp(&ctx->ac, LLVMRealUGE, src[0], src[1]);
+ result = emit_float_cmp(&ctx->ac, LLVMRealOGE, src[0], src[1]);
break;
case nir_op_fabs:
result = emit_intrin_1f_param(&ctx->ac, "llvm.fabs",