Skip to content

Commit

Permalink
igl | vulkan | Cap the API version at VK_API_VERSION_1_3
Browse files Browse the repository at this point in the history
Reviewed By: maliarov, AmesingFlank

Differential Revision: D69136710

fbshipit-source-id: a8e8fb4f9c3d4b5b90ff5107a624ce7a904b469c
  • Loading branch information
corporateshark authored and facebook-github-bot committed Feb 5, 2025
1 parent 23185aa commit b3f4972
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/igl/vulkan/VulkanContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,14 +830,15 @@ igl::Result VulkanContext::initContext(const HWDeviceDesc& desc,

// Create Vulkan Memory Allocator
if (IGL_VULKAN_USE_VMA) {
VK_ASSERT_RETURN(ivkVmaCreateAllocator(&vf_,
vkPhysicalDevice_,
device_->getVkDevice(),
vkInstance_,
apiVersion,
config_.enableBufferDeviceAddress,
(VkDeviceSize)config_.vmaPreferredLargeHeapBlockSize,
&pimpl_->vma_));
VK_ASSERT_RETURN(
ivkVmaCreateAllocator(&vf_,
vkPhysicalDevice_,
device_->getVkDevice(),
vkInstance_,
apiVersion > VK_API_VERSION_1_3 ? VK_API_VERSION_1_3 : apiVersion,
config_.enableBufferDeviceAddress,
(VkDeviceSize)config_.vmaPreferredLargeHeapBlockSize,
&pimpl_->vma_));
}

// The staging device will use VMA to allocate a buffer, so this needs
Expand Down

0 comments on commit b3f4972

Please sign in to comment.