Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jbakker>2022-10-31 18:01:02 +0300
committerJeroen Bakker <jeroen@blender.org>2022-10-31 18:01:15 +0300
commit0e6f2d9fe0f49de658414bf16a9babab61f1895a (patch)
tree47a30bcda15392e7472b556b742200aff18aae93 /CMakeLists.txt
parentc2e36c09b993fc0678eaf6a65b2cbd8ea9132cdb (diff)
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c5fa8a63f6..7e89943714a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -569,6 +569,12 @@ mark_as_advanced(
WITH_GPU_BUILDTIME_SHADER_BUILDER
)
+# Vulkan
+option(WITH_VULKAN_BACKEND "Enable Vulkan as graphics backend (only for development)" OFF)
+mark_as_advanced(
+ WITH_VULKAN_BACKEND
+)
+
# Metal
if(APPLE)
@@ -1223,6 +1229,13 @@ endif()
# -----------------------------------------------------------------------------
+# Configure Vulkan.
+
+if(WITH_VULKAN_BACKEND)
+ add_definitions(-DWITH_VULKAN_BACKEND)
+endif()
+
+# -----------------------------------------------------------------------------
# Configure Metal
if(WITH_METAL_BACKEND)