Cycles: Disable -fassociative-math on Linux to avoid GGX issues

This is the safer fix for now, we can revisit this later.
This commit is contained in:
Lukas Stockner
2024-11-25 02:04:21 +01:00
parent 328a6aa506
commit 0fc58f0aba

View File

@@ -163,7 +163,8 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
# Let the compiler replace x/y with x*(1/y)
list(APPEND CYCLES_MATH_FLAGS "-freciprocal-math")
# Let the compiler reorder terms to save operations
list(APPEND CYCLES_MATH_FLAGS "-fassociative-math")
# NOTE: Disabled for now due to problems with bsdf_D for GGX on Linux (#130389)
# list(APPEND CYCLES_MATH_FLAGS "-fassociative-math")
# Don't enable `-ffinite-math-only` since the BVH code relies on NaNs.
# Otherwise, we could just use `-ffast-math`.