mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 07:22:12 -05:00
GPU: Split GPU backend and Draw manager unit tests
Both the draw manager and gpu backend used the same compilation directive for enablement. This PR seperates them into `WITH_GPU_DRAW_TESTS` for draw manager related tests and `WITH_GPU_BACKEND_TESTS` for gpu backend related tests. Pull Request: https://projects.blender.org/blender/blender/pulls/132018
This commit is contained in:
parent
36d69e8491
commit
28ea90f127
5 changed files with 12 additions and 8 deletions
|
@ -829,8 +829,12 @@ Run GPU render tests silently (finished tests will pass). \
|
|||
Generated report will show failing tests"
|
||||
ON
|
||||
)
|
||||
option(WITH_GPU_BACKEND_TESTS "\
|
||||
Enable GPU backend related unit testing"
|
||||
OFF
|
||||
)
|
||||
option(WITH_GPU_DRAW_TESTS "\
|
||||
Enable GPU drawing related unit testing (GPU backends and draw manager)"
|
||||
Enable GPU drawing related unit testing (draw manager)"
|
||||
OFF
|
||||
)
|
||||
option(WITH_COMPOSITOR_REALTIME_TESTS "Enable regression testing for realtime compositor" OFF)
|
||||
|
|
|
@ -18,7 +18,7 @@ if NOT "%1" == "" (
|
|||
) else if "%1" == "with_tests" (
|
||||
set TESTS_CMAKE_ARGS=%TESTS_CMAKE_ARGS% -DWITH_GTESTS=On
|
||||
) else if "%1" == "with_gpu_tests" (
|
||||
set TESTS_CMAKE_ARGS=%TESTS_CMAKE_ARGS% -DWITH_GPU_DRAW_TESTS=On -DWITH_GPU_RENDER_TESTS=On -DWITH_GPU_RENDER_TESTS_SILENT=Off
|
||||
set TESTS_CMAKE_ARGS=%TESTS_CMAKE_ARGS% -DWITH_GPU_BACKEND_TESTS=On -DWITH_GPU_DRAW_TESTS=On -DWITH_GPU_RENDER_TESTS=On -DWITH_GPU_RENDER_TESTS_SILENT=Off
|
||||
) else if "%1" == "full" (
|
||||
set TARGET=Full
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
||||
|
|
|
@ -685,7 +685,7 @@ set(MSL_SRC
|
|||
)
|
||||
|
||||
if(WITH_GTESTS)
|
||||
if(WITH_GPU_DRAW_TESTS)
|
||||
if(WITH_GPU_BACKEND_TESTS)
|
||||
list(APPEND GLSL_SRC ${GLSL_SRC_TEST})
|
||||
endif()
|
||||
endif()
|
||||
|
@ -736,8 +736,8 @@ if(WITH_OPENCOLORIO)
|
|||
add_definitions(-DWITH_OCIO)
|
||||
endif()
|
||||
|
||||
if(WITH_GPU_DRAW_TESTS)
|
||||
add_definitions(-DWITH_GPU_DRAW_TESTS)
|
||||
if(WITH_GPU_BACKEND_TESTS)
|
||||
add_definitions(-DWITH_GPU_BACKEND_TESTS)
|
||||
endif()
|
||||
|
||||
if(WITH_GTESTS)
|
||||
|
@ -778,7 +778,7 @@ if(WITH_GTESTS)
|
|||
bf_windowmanager
|
||||
)
|
||||
|
||||
if(WITH_GPU_DRAW_TESTS)
|
||||
if(WITH_GPU_BACKEND_TESTS)
|
||||
list(APPEND TEST_SRC
|
||||
tests/buffer_texture_test.cc
|
||||
tests/compute_test.cc
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "gpu_srgb_to_framebuffer_space_info.hh"
|
||||
|
||||
#ifdef WITH_GTESTS
|
||||
# ifdef WITH_GPU_DRAW_TESTS
|
||||
# ifdef WITH_GPU_BACKEND_TESTS
|
||||
# include "gpu_shader_test_info.hh"
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -988,7 +988,7 @@ else()
|
|||
endif()
|
||||
|
||||
|
||||
if(WITH_GPU_DRAW_TESTS)
|
||||
if(WITH_GPU_RENDER_TESTS)
|
||||
if(NOT OPENIMAGEIO_TOOL)
|
||||
message(STATUS "Disabling OpenGL draw tests because OIIO oiiotool does not exist")
|
||||
elseif(NOT EXISTS "${TEST_SRC_DIR}/opengl")
|
||||
|
|
Loading…
Reference in a new issue