diff options
author | Samuel Pitoiset <[email protected]> | 2018-01-15 14:51:45 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-01-16 21:39:57 +0100 |
commit | 05f73b96721518314729e49b7cadfb2d915a9ff5 (patch) | |
tree | 6accd3c81734512bc91c5c6ca26d707df440b798 /src/amd/common | |
parent | 4f5318df2cba4f4a455cf3a5aaa020908806987d (diff) |
ac: set no-signed-zeros-fp-math when RADV_DEBUG="unsafemath" is used
This is an optimisation that is recommended by Matt Arsenault,
and used by RadeonSI, but it's not compatible with Vulkan.
Note that AC_FLOAT_MODE_UNSAFE_FP_MATH includes the no signed
zeros flag in LLVM.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 635a74d2430..5a8ddf13d7b 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -352,6 +352,9 @@ create_llvm_function(LLVMContextRef ctx, LLVMModuleRef module, LLVMAddTargetDependentFunctionAttr(main_function, "unsafe-fp-math", "true"); + LLVMAddTargetDependentFunctionAttr(main_function, + "no-signed-zeros-fp-math", + "true"); } return main_function; } |