GPU: Add command line option for skipping GPU backend support checks

A new command line option `--debug-gpu-backend-no-fallback` is added
that skips the GPU backend support checks. This is primarily useful for
the GPU tests that should not fall back to another backend. This has the
useful side effect of skipping `vk_instance_create_for_platform_checks`,
which would otherwise create its own Vulkan instance. `vkCreateInstance`
can be an expensive function call depending on the used GPU driver (see
https://projects.blender.org/infrastructure/meta/issues/231).

Pull Request: https://projects.blender.org/blender/blender/pulls/163203
This commit is contained in:
Christoph Neuhauser 2026-08-28 12:35:23 +02:00
parent aa30bd4cd4
commit b40da1310b
10 changed files with 40 additions and 7 deletions

View file

@ -32,7 +32,7 @@ def get_arguments(filepath, output_filepath, backend):
execution_device = "CPU"
if backend != "CPU":
execution_device = "GPU"
arguments.extend(["--gpu-backend", backend])
arguments.extend(["--gpu-backend", backend, "--debug-gpu-backend-no-fallback"])
arguments.extend([
filepath,

View file

@ -316,7 +316,7 @@ def get_arguments(filepath, output_filepath, gpu_backend):
"--debug-exit-on-error"]
if gpu_backend:
arguments.extend(["--gpu-backend", gpu_backend])
arguments.extend(["--gpu-backend", gpu_backend, "--debug-gpu-backend-no-fallback"])
arguments.extend([
filepath,

View file

@ -38,7 +38,7 @@ def get_arguments(filepath, output_filepath, gpu_backend):
"--debug-exit-on-error"]
if gpu_backend:
arguments.extend(["--gpu-backend", gpu_backend])
arguments.extend(["--gpu-backend", gpu_backend, "--debug-gpu-backend-no-fallback"])
# Windows separators get messed up when passing them inside the python expression
output_filepath = output_filepath.replace("\\", "/")

View file

@ -36,7 +36,7 @@ def get_arguments(filepath, output_filepath, backend):
execution_device = "CPU"
if backend != "CPU":
execution_device = "GPU"
args.extend(["--gpu-backend", backend])
args.extend(["--gpu-backend", backend, "--debug-gpu-backend-no-fallback"])
args.extend([
filepath,

View file

@ -214,7 +214,7 @@ def get_arguments(filepath, output_filepath, gpu_backend):
"--debug-exit-on-error"]
if gpu_backend:
arguments.extend(["--gpu-backend", gpu_backend])
arguments.extend(["--gpu-backend", gpu_backend, "--debug-gpu-backend-no-fallback"])
arguments.extend([
filepath,

View file

@ -85,7 +85,7 @@ def get_arguments(filepath, output_filepath, gpu_backend):
"--debug-exit-on-error"]
if gpu_backend:
arguments.extend(["--gpu-backend", gpu_backend])
arguments.extend(["--gpu-backend", gpu_backend, "--debug-gpu-backend-no-fallback"])
arguments.extend([
filepath,