Relocate intrinsic modules to src/video/

This commit is contained in:
Isaac Aronson
2023-09-05 23:48:52 -05:00
committed by Sam Lantinga
parent f68a7edcf8
commit 735cf5a6f9
10 changed files with 33 additions and 26 deletions

View File

@@ -498,7 +498,6 @@ sdl_glob_sources(
"${SDL3_SOURCE_DIR}/src/thread/*.c"
"${SDL3_SOURCE_DIR}/src/time/*.c"
"${SDL3_SOURCE_DIR}/src/timer/*.c"
"${SDL3_SOURCE_DIR}/src/video/*.c"
"${SDL3_SOURCE_DIR}/src/video/yuv2rgb/*.c"
)
if(MSVC AND TARGET SDL3-shared)
@@ -514,6 +513,12 @@ if(MSVC AND TARGET SDL3-shared)
endif()
endif()
# Exclude intrinsinc modules from general builds
file(GLOB video_sources "${SDL3_SOURCE_DIR}/src/video/*.c")
list(FILTER video_sources EXCLUDE REGEX "SDL_blit_A_avx2.c$")
list(FILTER video_sources EXCLUDE REGEX "SDL_blit_A_sse4_1.c$")
sdl_glob_sources(${video_sources})
if(USE_INTELCC)
# warning #39: division by zero
# warning #239: floating point underflow
@@ -739,7 +744,7 @@ if(SDL_ASSEMBLY)
cmake_pop_check_state()
if(COMPILER_SUPPORTS_SSE4_1)
set(HAVE_SSE4_1 TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/intrin/SDL_blit_A_sse4_1.c")
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/SDL_blit_A_sse4_1.c")
endif()
endif()
if(SDL_SSE4_2)
@@ -803,7 +808,7 @@ if(SDL_ASSEMBLY)
return 0;
}" COMPILER_SUPPORTS_AVX2)
cmake_pop_check_state()
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/intrin/SDL_blit_A_*.c")
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/SDL_blit_A_*.c")
if(COMPILER_SUPPORTS_AVX2)
set(HAVE_AVX2 TRUE)
endif()