mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-08 03:29:57 +00: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