mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 09:50:20 +01: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>
This commit is contained in:
parent
30ac733680
commit
9e5d2a73c5
1 changed files with 5 additions and 0 deletions
|
|
@ -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