mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 19:00:14 -05:00
renderer_vulkan/wrapper: Add vkEnumerateInstanceExtensionProperties wrapper
This commit is contained in:
parent
27dd542c60
commit
f22f6b72c3
2 changed files with 17 additions and 0 deletions
|
@ -733,4 +733,18 @@ VkPhysicalDeviceMemoryProperties PhysicalDevice::GetMemoryProperties() const noe
|
|||
return properties;
|
||||
}
|
||||
|
||||
std::optional<std::vector<VkExtensionProperties>> EnumerateInstanceExtensionProperties(
|
||||
const InstanceDispatch& dld) {
|
||||
u32 num;
|
||||
if (dld.vkEnumerateInstanceExtensionProperties(nullptr, &num, nullptr) != VK_SUCCESS) {
|
||||
return std::nullopt;
|
||||
}
|
||||
std::vector<VkExtensionProperties> properties(num);
|
||||
if (dld.vkEnumerateInstanceExtensionProperties(nullptr, &num, properties.data()) !=
|
||||
VK_SUCCESS) {
|
||||
return std::nullopt;
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
} // namespace Vulkan::vk
|
||||
|
|
|
@ -981,4 +981,7 @@ private:
|
|||
const DeviceDispatch* dld;
|
||||
};
|
||||
|
||||
std::optional<std::vector<VkExtensionProperties>> EnumerateInstanceExtensionProperties(
|
||||
const InstanceDispatch& dld);
|
||||
|
||||
} // namespace Vulkan::vk
|
||||
|
|
Loading…
Reference in a new issue