Skip to content

Commit

Permalink
igl | vulkan | Disable VK_KHR_get_memory_requirements2
Browse files Browse the repository at this point in the history
Summary:
Fixed a Vulkan validation warning.

`VK_KHR_get_memory_requirements2` has been promoted to `VK_VERSION_1_1`.

Reviewed By: mmaurer

Differential Revision: D52349969

fbshipit-source-id: b062a65cd4cb42d0bb92a1c6be74d79f2cfbbf99
  • Loading branch information
corporateshark authored and facebook-github-bot committed Dec 21, 2023
1 parent 81e51de commit 98377f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/igl/vulkan/VulkanExtensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ void VulkanExtensions::enableCommonExtensions(ExtensionType extensionType,
#if defined(IGL_WITH_TRACY_GPU) && defined(VK_EXT_calibrated_timestamps)
enable(VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME, ExtensionType::Device);
#endif
enable(VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, ExtensionType::Device);
} else {
IGL_ASSERT_MSG(false, "Unrecognized extension type when enabling commong extensions.");
}
Expand Down
6 changes: 3 additions & 3 deletions src/igl/vulkan/VulkanImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ VulkanImage::VulkanImage(const VulkanContext& ctx,
VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, nullptr, vkImage_};

VkMemoryRequirements2 memoryRequirements = {VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2};
ctx_.vf_.vkGetImageMemoryRequirements2KHR(device_, &memoryRequirementInfo, &memoryRequirements);
ctx_.vf_.vkGetImageMemoryRequirements2(device_, &memoryRequirementInfo, &memoryRequirements);

// TODO_VULKAN: Verify the following from the spec:
// the memory from which fd was exported must have been created on the same physical device
Expand Down Expand Up @@ -374,7 +374,7 @@ VulkanImage::VulkanImage(const VulkanContext& ctx,
VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, nullptr, vkImage_};

VkMemoryRequirements2 memoryRequirements = {VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2};
ctx_.vf_.vkGetImageMemoryRequirements2KHR(device_, &memoryRequirementInfo, &memoryRequirements);
ctx_.vf_.vkGetImageMemoryRequirements2(device_, &memoryRequirementInfo, &memoryRequirements);

const VkImportMemoryWin32HandleInfoKHR handleInfo = {
VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR,
Expand Down Expand Up @@ -555,7 +555,7 @@ VulkanImage::VulkanImage(const VulkanContext& ctx,
VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, nullptr, vkImage_};

VkMemoryRequirements2 memoryRequirements = {VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2};
ctx_.vf_.vkGetImageMemoryRequirements2KHR(device_, &memoryRequirementInfo, &memoryRequirements);
ctx_.vf_.vkGetImageMemoryRequirements2(device_, &memoryRequirementInfo, &memoryRequirements);

const VkMemoryAllocateInfo memoryAllocateInfo = {
VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
Expand Down

0 comments on commit 98377f2

Please sign in to comment.