[Bf-blender-cvs] [6078fe34f9a] temp-vulkan-descriptor-sets: Fix vulkan validation error.

Jeroen Bakker noreply at git.blender.org
Mon Feb 6 15:11:45 CET 2023


Commit: 6078fe34f9ae44bf93302c31ca40840b06a23e96
Author: Jeroen Bakker
Date:   Mon Feb 6 15:11:34 2023 +0100
Branches: temp-vulkan-descriptor-sets
https://developer.blender.org/rB6078fe34f9ae44bf93302c31ca40840b06a23e96

Fix vulkan validation error.

===================================================================

M	intern/ghost/intern/GHOST_ContextVK.cpp
M	source/blender/gpu/vulkan/vk_context.cc

===================================================================

diff --git a/intern/ghost/intern/GHOST_ContextVK.cpp b/intern/ghost/intern/GHOST_ContextVK.cpp
index 10662f20d90..b14ae40df2e 100644
--- a/intern/ghost/intern/GHOST_ContextVK.cpp
+++ b/intern/ghost/intern/GHOST_ContextVK.cpp
@@ -842,6 +842,7 @@ GHOST_TSuccess GHOST_ContextVK::initializeDrawingContext()
     extensions_device.push_back(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
   }
   extensions_device.push_back("VK_KHR_dedicated_allocation");
+  extensions_device.push_back("VK_KHR_get_memory_requirements2");
   /* Enable MoltenVK required instance extensions.*/
 #ifdef VK_MVK_MOLTENVK_EXTENSION_NAME
   requireExtension(
@@ -909,12 +910,14 @@ GHOST_TSuccess GHOST_ContextVK::initializeDrawingContext()
     return GHOST_kFailure;
   }
 
+#ifdef VK_MVK_MOLTENVK_EXTENSION_NAME
   /* According to the Vulkan specs, when `VK_KHR_portability_subset` is available it should be
    * enabled. See
    * https://vulkan.lunarg.com/doc/view/1.2.198.1/mac/1.2-extensions/vkspec.html#VUID-VkDeviceCreateInfo-pProperties-04451*/
   if (device_extensions_support(m_physical_device, {VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME})) {
     extensions_device.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME);
   }
+#endif
 
   vector<VkDeviceQueueCreateInfo> queue_create_infos;
 
diff --git a/source/blender/gpu/vulkan/vk_context.cc b/source/blender/gpu/vulkan/vk_context.cc
index 7d9fa356a65..a8142bc71bc 100644
--- a/source/blender/gpu/vulkan/vk_context.cc
+++ b/source/blender/gpu/vulkan/vk_context.cc
@@ -29,7 +29,7 @@ VKContext::VKContext(void *ghost_window, void *ghost_context)
   /* Initialize the memory allocator. */
   VmaAllocatorCreateInfo info = {};
   /* Should use same vulkan version as GHOST, but set to 1.0 for now. Raising it to 1.2 requires
-   * correct extensions and funtions to be found, which doesn't out-of-the-box. We should fix this,
+   * correct extensions and functions to be found, which doesn't out-of-the-box. We should fix this,
    * but to continue the development at hand we lower the API to 1.0.*/
   info.vulkanApiVersion = VK_API_VERSION_1_0;
   info.physicalDevice = physical_device_;



More information about the Bf-blender-cvs mailing list