Vulkan: Render and compositor tests
This PR does some changes to the render and compositor tests - Compositor test will now test all GPU backends that are compiled - EEVEE/Workbench render tests will move the GPU backend to the front of the test name (eevee_next_opengl_bsdf) - Blacklist EEVEE render tests that fail on Vulkan. Pull Request: https://projects.blender.org/blender/blender/pulls/133981
This commit is contained in:
@@ -677,10 +677,10 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
if(WITH_OPENGL_BACKEND)
|
||||
foreach(render_test ${gpu_render_tests})
|
||||
add_render_test(
|
||||
eevee_next_${render_test}_opengl
|
||||
eevee_next_opengl_${render_test}
|
||||
${CMAKE_CURRENT_LIST_DIR}/eevee_next_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/render/${render_test}"
|
||||
--outdir "${TEST_OUT_DIR}/eevee_next"
|
||||
--outdir "${TEST_OUT_DIR}/eevee_next_opengl"
|
||||
--gpu-backend opengl
|
||||
${_gpu_render_tests_arguments}
|
||||
)
|
||||
@@ -690,10 +690,10 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
if(WITH_METAL_BACKEND)
|
||||
foreach(render_test ${gpu_render_tests})
|
||||
add_render_test(
|
||||
eevee_next_${render_test}_metal
|
||||
eevee_next_metal_${render_test}
|
||||
${CMAKE_CURRENT_LIST_DIR}/eevee_next_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/render/${render_test}"
|
||||
--outdir "${TEST_OUT_DIR}/eevee_next"
|
||||
--outdir "${TEST_OUT_DIR}/eevee_next_metal"
|
||||
--gpu-backend metal
|
||||
${_gpu_render_tests_arguments}
|
||||
)
|
||||
@@ -703,10 +703,10 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
if(WITH_VULKAN_BACKEND AND WITH_GPU_RENDER_TESTS_VULKAN)
|
||||
foreach(render_test ${gpu_render_tests})
|
||||
add_render_test(
|
||||
eevee_next_${render_test}_vulkan
|
||||
eevee_next_vulkan_${render_test}
|
||||
${CMAKE_CURRENT_LIST_DIR}/eevee_next_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/render/${render_test}"
|
||||
--outdir "${TEST_OUT_DIR}/eevee_next"
|
||||
--outdir "${TEST_OUT_DIR}/eevee_next_vulkan"
|
||||
--gpu-backend vulkan
|
||||
${_gpu_render_tests_arguments}
|
||||
)
|
||||
@@ -717,10 +717,10 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
if(WITH_OPENGL_BACKEND)
|
||||
foreach(render_test ${gpu_render_tests})
|
||||
add_render_test(
|
||||
workbench_${render_test}_opengl
|
||||
workbench_opengl_${render_test}
|
||||
${CMAKE_CURRENT_LIST_DIR}/workbench_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/render/${render_test}"
|
||||
--outdir "${TEST_OUT_DIR}/workbench"
|
||||
--outdir "${TEST_OUT_DIR}/workbench_opengl"
|
||||
--gpu-backend opengl
|
||||
${_gpu_render_tests_arguments}
|
||||
)
|
||||
@@ -730,10 +730,10 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
if(WITH_METAL_BACKEND)
|
||||
foreach(render_test ${gpu_render_tests})
|
||||
add_render_test(
|
||||
workbench_${render_test}_metal
|
||||
workbench_metal_${render_test}
|
||||
${CMAKE_CURRENT_LIST_DIR}/workbench_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/render/${render_test}"
|
||||
--outdir "${TEST_OUT_DIR}/workbench"
|
||||
--outdir "${TEST_OUT_DIR}/workbench_metal"
|
||||
--gpu-backend metal
|
||||
${_gpu_render_tests_arguments}
|
||||
)
|
||||
@@ -743,10 +743,10 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
if(WITH_VULKAN_BACKEND AND WITH_GPU_RENDER_TESTS_VULKAN)
|
||||
foreach(render_test ${gpu_render_tests})
|
||||
add_render_test(
|
||||
workbench_${render_test}_vulkan
|
||||
workbench_vulkan_${render_test}
|
||||
${CMAKE_CURRENT_LIST_DIR}/workbench_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/render/${render_test}"
|
||||
--outdir "${TEST_OUT_DIR}/workbench"
|
||||
--outdir "${TEST_OUT_DIR}/workbench/vulkan"
|
||||
--gpu-backend vulkan
|
||||
${_gpu_render_tests_arguments}
|
||||
)
|
||||
@@ -830,15 +830,42 @@ if(WITH_GPU_COMPOSITOR_TESTS)
|
||||
list(APPEND compositor_tests distort matte)
|
||||
endif()
|
||||
|
||||
foreach(comp_test ${compositor_tests})
|
||||
add_render_test(
|
||||
compositor_gpu_${comp_test}
|
||||
${CMAKE_CURRENT_LIST_DIR}/compositor_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/compositor/${comp_test}"
|
||||
--outdir "${TEST_OUT_DIR}/compositor_gpu"
|
||||
--gpu
|
||||
)
|
||||
endforeach()
|
||||
if(WITH_OPENGL_BACKEND)
|
||||
foreach(comp_test ${compositor_tests})
|
||||
add_render_test(
|
||||
compositor_opengl_${comp_test}
|
||||
${CMAKE_CURRENT_LIST_DIR}/compositor_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/compositor/${comp_test}"
|
||||
--outdir "${TEST_OUT_DIR}/compositor_opengl"
|
||||
--gpu
|
||||
--gpu-backend opengl
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
if(WITH_METAL_BACKEND)
|
||||
foreach(comp_test ${compositor_tests})
|
||||
add_render_test(
|
||||
compositor_metal_${comp_test}
|
||||
${CMAKE_CURRENT_LIST_DIR}/compositor_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/compositor/${comp_test}"
|
||||
--outdir "${TEST_OUT_DIR}/compositor_metal"
|
||||
--gpu
|
||||
--gpu-backend metal
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
foreach(comp_test ${compositor_tests})
|
||||
add_render_test(
|
||||
compositor_vulkan_${comp_test}
|
||||
${CMAKE_CURRENT_LIST_DIR}/compositor_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/compositor/${comp_test}"
|
||||
--outdir "${TEST_OUT_DIR}/compositor_vulkan"
|
||||
--gpu
|
||||
--gpu-backend vulkan
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -21,18 +21,25 @@ def get_compositor_device_setter_script(execution_device):
|
||||
|
||||
|
||||
def get_arguments(filepath, output_filepath, execution_device):
|
||||
return [
|
||||
arguments = [
|
||||
"--background",
|
||||
"--factory-startup",
|
||||
"--enable-autoexec",
|
||||
"--debug-memory",
|
||||
"--debug-exit-on-error",
|
||||
"--debug-exit-on-error"]
|
||||
|
||||
if execution_device != 'CPU':
|
||||
arguments.extend(["--gpu-backend", execution_device])
|
||||
|
||||
arguments.extend([
|
||||
filepath,
|
||||
"-P", os.path.realpath(__file__),
|
||||
"--python-expr", get_compositor_device_setter_script(execution_device),
|
||||
"--python-expr", get_compositor_device_setter_script(
|
||||
execution_device if execution_device == 'CPU' else 'GPU'),
|
||||
"-o", output_filepath,
|
||||
"-F", "PNG",
|
||||
"-f", "1"]
|
||||
"-f", "1"])
|
||||
return arguments
|
||||
|
||||
|
||||
def create_argparse():
|
||||
@@ -45,6 +52,7 @@ def create_argparse():
|
||||
parser.add_argument("--oiiotool", required=True)
|
||||
parser.add_argument("--gpu", default=False, action='store_true')
|
||||
parser.add_argument('--batch', default=False, action='store_true')
|
||||
parser.add_argument('--gpu-backend')
|
||||
return parser
|
||||
|
||||
|
||||
@@ -53,7 +61,7 @@ def main():
|
||||
args = parser.parse_args()
|
||||
|
||||
from modules import render_report
|
||||
execution_device = "GPU" if args.gpu else "CPU"
|
||||
execution_device = args.gpu_backend if args.gpu else "CPU"
|
||||
report_title = f"Compositor {execution_device}"
|
||||
report = render_report.Report(report_title, args.outdir, args.oiiotool)
|
||||
report.set_pixelated(True)
|
||||
|
||||
@@ -52,6 +52,13 @@ BLOCKLIST_METAL = [
|
||||
"principled_bsdf_interior.blend",
|
||||
]
|
||||
|
||||
BLOCKLIST_VULKAN = [
|
||||
# Blocked due to difference in screen space tracing (to be fixed).
|
||||
"sss_reflection_clamp.blend",
|
||||
# Blocked due to difference in screen space tracing (to be investigated).
|
||||
"image.blend"
|
||||
]
|
||||
|
||||
|
||||
def setup():
|
||||
import bpy
|
||||
@@ -228,6 +235,8 @@ def main():
|
||||
blocklist = BLOCKLIST
|
||||
if args.gpu_backend == "metal":
|
||||
blocklist += BLOCKLIST_METAL
|
||||
elif args.gpu_backend == "vulkan":
|
||||
blocklist += BLOCKLIST_VULKAN
|
||||
|
||||
report = EEVEEReport("Eevee Next", args.outdir, args.oiiotool, variation=args.gpu_backend, blocklist=blocklist)
|
||||
if args.gpu_backend == "vulkan":
|
||||
|
||||
Reference in New Issue
Block a user