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:
@@ -829,8 +829,12 @@ Run GPU render tests silently (finished tests will pass). \
|
|||||||
Generated report will show failing tests"
|
Generated report will show failing tests"
|
||||||
ON
|
ON
|
||||||
)
|
)
|
||||||
|
option(WITH_GPU_BACKEND_TESTS "\
|
||||||
|
Enable GPU backend related unit testing"
|
||||||
|
OFF
|
||||||
|
)
|
||||||
option(WITH_GPU_DRAW_TESTS "\
|
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
|
OFF
|
||||||
)
|
)
|
||||||
option(WITH_COMPOSITOR_REALTIME_TESTS "Enable regression testing for realtime compositor" 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" (
|
) else if "%1" == "with_tests" (
|
||||||
set TESTS_CMAKE_ARGS=%TESTS_CMAKE_ARGS% -DWITH_GTESTS=On
|
set TESTS_CMAKE_ARGS=%TESTS_CMAKE_ARGS% -DWITH_GTESTS=On
|
||||||
) else if "%1" == "with_gpu_tests" (
|
) 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" (
|
) else if "%1" == "full" (
|
||||||
set TARGET=Full
|
set TARGET=Full
|
||||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
||||||
|
|||||||
@@ -685,7 +685,7 @@ set(MSL_SRC
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(WITH_GTESTS)
|
if(WITH_GTESTS)
|
||||||
if(WITH_GPU_DRAW_TESTS)
|
if(WITH_GPU_BACKEND_TESTS)
|
||||||
list(APPEND GLSL_SRC ${GLSL_SRC_TEST})
|
list(APPEND GLSL_SRC ${GLSL_SRC_TEST})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -736,8 +736,8 @@ if(WITH_OPENCOLORIO)
|
|||||||
add_definitions(-DWITH_OCIO)
|
add_definitions(-DWITH_OCIO)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GPU_DRAW_TESTS)
|
if(WITH_GPU_BACKEND_TESTS)
|
||||||
add_definitions(-DWITH_GPU_DRAW_TESTS)
|
add_definitions(-DWITH_GPU_BACKEND_TESTS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GTESTS)
|
if(WITH_GTESTS)
|
||||||
@@ -778,7 +778,7 @@ if(WITH_GTESTS)
|
|||||||
bf_windowmanager
|
bf_windowmanager
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WITH_GPU_DRAW_TESTS)
|
if(WITH_GPU_BACKEND_TESTS)
|
||||||
list(APPEND TEST_SRC
|
list(APPEND TEST_SRC
|
||||||
tests/buffer_texture_test.cc
|
tests/buffer_texture_test.cc
|
||||||
tests/compute_test.cc
|
tests/compute_test.cc
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
#include "gpu_srgb_to_framebuffer_space_info.hh"
|
#include "gpu_srgb_to_framebuffer_space_info.hh"
|
||||||
|
|
||||||
#ifdef WITH_GTESTS
|
#ifdef WITH_GTESTS
|
||||||
# ifdef WITH_GPU_DRAW_TESTS
|
# ifdef WITH_GPU_BACKEND_TESTS
|
||||||
# include "gpu_shader_test_info.hh"
|
# include "gpu_shader_test_info.hh"
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -988,7 +988,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(WITH_GPU_DRAW_TESTS)
|
if(WITH_GPU_RENDER_TESTS)
|
||||||
if(NOT OPENIMAGEIO_TOOL)
|
if(NOT OPENIMAGEIO_TOOL)
|
||||||
message(STATUS "Disabling OpenGL draw tests because OIIO oiiotool does not exist")
|
message(STATUS "Disabling OpenGL draw tests because OIIO oiiotool does not exist")
|
||||||
elseif(NOT EXISTS "${TEST_SRC_DIR}/opengl")
|
elseif(NOT EXISTS "${TEST_SRC_DIR}/opengl")
|
||||||
|
|||||||
Reference in New Issue
Block a user