Skip to content

Commit

Permalink
loader: Check apiVersion is not 0 for VUID-VkApplicationInfo-apiVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
aitor-lunarg authored and charles-lunarg committed Jan 25, 2024
1 parent e7f1b58 commit ca4c1e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion loader/trampoline.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,8 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCr
}

// Providing an apiVersion less than VK_API_VERSION_1_0 but greater than zero prevents the validation layers from starting
if (pCreateInfo->pApplicationInfo && pCreateInfo->pApplicationInfo->apiVersion < VK_API_VERSION_1_0) {
if (pCreateInfo->pApplicationInfo && pCreateInfo->pApplicationInfo->apiVersion != 0u &&
pCreateInfo->pApplicationInfo->apiVersion < VK_API_VERSION_1_0) {
loader_log(ptr_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
"VkInstanceCreateInfo::pApplicationInfo::apiVersion has value of %u which is not permitted. If apiVersion is "
"not 0, then it must be "
Expand Down

0 comments on commit ca4c1e6

Please sign in to comment.