Skip to content

Commit

Permalink
Always use lower API version in case the actual device cannot handle …
Browse files Browse the repository at this point in the history
…what the application requested.
  • Loading branch information
kondrak committed May 18, 2020
1 parent b3af75e commit 8758cd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ref_vk/vk_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,8 @@ qboolean QVk_Init()
.pVulkanFunctions = NULL,
.pRecordSettings = NULL,
.instance = vk_instance,
.vulkanApiVersion = vk_device.properties.apiVersion
// VMA ignores version patch, so compare version minors (assuming major is always 1) and choose the lower (safer) one
.vulkanApiVersion = VK_VERSION_MINOR(vk_device.properties.apiVersion) < VK_VERSION_MINOR(appInfo.apiVersion) ? vk_device.properties.apiVersion : appInfo.apiVersion
};

res = vmaCreateAllocator(&allocInfo, &vk_malloc);
Expand Down

0 comments on commit 8758cd8

Please sign in to comment.