From 0e6f2d9fe0f49de658414bf16a9babab61f1895a Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 31 Oct 2022 16:01:02 +0100 Subject: GPU: Add placeholder for Vulkan backend. This patch adds a placeholder for the vulkan backend. When activated (`WITH_VULKAN_BACKEND=On` and `--gpu-backend vulkan`) it might open a blender screen, but nothing should be visible as none of the functions are implemented or otherwise crash on a nullptr. This is expected as this is just a placeholder. The goal is to add shader compilation +validation to this backend as one of the next steps so we can validate changes to existing shaders on OpenGL, Metal and Vulkan at the same time. Reviewed By: fclem Differential Revision: https://developer.blender.org/D16338 --- source/creator/creator_args.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index 4144603555b..ba905f91f97 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -1116,6 +1116,9 @@ static int arg_handle_debug_gpu_set(int UNUSED(argc), static const char arg_handle_gpu_backend_set_doc[] = "\n" "\tForce to use a specific GPU backend. Valid options: " +# ifdef WITH_VULKAN_BACKEND + "'vulkan', " +# endif # ifdef WITH_METAL_BACKEND "'metal', " # endif @@ -1132,6 +1135,11 @@ static int arg_handle_gpu_backend_set(int argc, const char **argv, void *UNUSED( if (STREQ(argv[1], "opengl")) { gpu_backend = GPU_BACKEND_OPENGL; } +# ifdef WITH_VULKAN_BACKEND + else if (STREQ(argv[1], "vulkan")) { + gpu_backend = GPU_BACKEND_VULKAN; + } +# endif # ifdef WITH_METAL_BACKEND else if (STREQ(argv[1], "metal")) { gpu_backend = GPU_BACKEND_METAL; -- cgit v1.2.3