Fixed EnumerateInstaceVersion using the wrong variable

This commit is contained in:
Charles Giessen 2020-03-22 13:47:05 -06:00
parent c467c6c228
commit a727a05635

View File

@ -295,7 +295,7 @@ detail::Expected<Instance, detail::Error<InstanceError>> InstanceBuilder::build
uint32_t queried_api_version = VK_MAKE_VERSION (1, 0, 0); uint32_t queried_api_version = VK_MAKE_VERSION (1, 0, 0);
if (pfn_vkEnumerateInstanceVersion != nullptr) { if (pfn_vkEnumerateInstanceVersion != nullptr) {
VkResult res = pfn_vkEnumerateInstanceVersion (&api_version); VkResult res = pfn_vkEnumerateInstanceVersion (&queried_api_version);
// Should always return VK_SUCCESS // Should always return VK_SUCCESS
if (res != VK_SUCCESS && info.required_api_version > 0) if (res != VK_SUCCESS && info.required_api_version > 0)
return detail::Error<InstanceError>{ InstanceError::vulkan_version_unavailable }; return detail::Error<InstanceError>{ InstanceError::vulkan_version_unavailable };