mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
ac/llvm: flush denorms for nir_op_fmed3 on GFX8 and older gens
The hardware doesn't flush denorms, exactly like fmin/fmax, so we have to do it manually. This doesn't fix anything known. Fixes:d6a07732c9("ac: use llvm.amdgcn.fmed3 intrinsic for nir_op_fmed3") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3962> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3962> (cherry picked from commit9e5d2a73c5)
This commit is contained in:
parent
710388f006
commit
9fc39b9c67
2 changed files with 6 additions and 1 deletions
|
|
@ -1048,7 +1048,7 @@
|
|||
"description": "ac/llvm: flush denorms for nir_op_fmed3 on GFX8 and older gens",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "d6a07732c9c155c73f7d2cddc10faa7eab768df9"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2759,6 +2759,11 @@ LLVMValueRef ac_build_fmed3(struct ac_llvm_context *ctx, LLVMValueRef src0,
|
|||
AC_FUNC_ATTR_READNONE);
|
||||
}
|
||||
|
||||
if (ctx->chip_class < GFX9 && bitsize == 32) {
|
||||
/* Only pre-GFX9 chips do not flush denorms. */
|
||||
result = ac_build_canonicalize(ctx, result, bitsize);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue