Fix T51051: Incorrect render on 32bit Linux
The issue was apparently caused by -fno-finite-math-only added to kernel.cpp CFLAGS. For now just removed this flag from the kernel (we don't really want it there at this point, and we don't have it for SSE/AVX optimized kernels). But surely more investigation is needed here.
This commit is contained in:
parent
9b1564a862
commit
ced8fff5de
Notes:
blender-bot
2023-02-14 19:45:25 +01:00
Referenced by issue #51154, Decline in performance, an increase of over 209% in the rendering Referenced by issue #51051, Cycles renders missing/semitransparent faces on Tails OS
|
@ -22,6 +22,7 @@ if(WITH_CYCLES_NATIVE_ONLY)
|
|||
-DWITH_KERNEL_NATIVE
|
||||
)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
||||
set(CYCLES_KERNEL_FLAGS "-march=native")
|
||||
elseif(NOT WITH_CPU_SSE)
|
||||
set(CXX_HAS_SSE FALSE)
|
||||
set(CXX_HAS_AVX FALSE)
|
||||
|
@ -59,10 +60,13 @@ elseif(WIN32 AND MSVC)
|
|||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Ox")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /Ox")
|
||||
|
||||
set(CYCLES_KERNEL_FLAGS "/fp:fast -D_CRT_SECURE_NO_WARNINGS /GS-")
|
||||
elseif(CMAKE_COMPILER_IS_GNUCC)
|
||||
check_cxx_compiler_flag(-msse CXX_HAS_SSE)
|
||||
check_cxx_compiler_flag(-mavx CXX_HAS_AVX)
|
||||
check_cxx_compiler_flag(-mavx2 CXX_HAS_AVX2)
|
||||
set(CYCLES_KERNEL_FLAGS "-ffast-math")
|
||||
if(CXX_HAS_SSE)
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "-ffast-math -msse -msse2 -mfpmath=sse")
|
||||
set(CYCLES_SSE3_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3 -mssse3 -mfpmath=sse")
|
||||
|
@ -79,6 +83,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||
check_cxx_compiler_flag(-msse CXX_HAS_SSE)
|
||||
check_cxx_compiler_flag(-mavx CXX_HAS_AVX)
|
||||
check_cxx_compiler_flag(-mavx2 CXX_HAS_AVX2)
|
||||
set(CYCLES_KERNEL_FLAGS "-ffast-math")
|
||||
if(CXX_HAS_SSE)
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "-ffast-math -msse -msse2")
|
||||
set(CYCLES_SSE3_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3 -mssse3")
|
||||
|
|
|
@ -347,6 +347,9 @@ endif()
|
|||
include_directories(${INC})
|
||||
include_directories(SYSTEM ${INC_SYS})
|
||||
|
||||
set_source_files_properties(kernels/cpu/kernel.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
set_source_files_properties(kernels/cpu/kernel_split.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
|
||||
if(CXX_HAS_SSE)
|
||||
list(APPEND SRC
|
||||
kernels/cpu/kernel_sse2.cpp
|
||||
|
|
Loading…
Reference in New Issue