Vulkan: discover Vulkan instance versions higher than 1.2
Previously we would only discover 1.0 or 1.1, meaning that extensions promoted to core in 1.2 wouldn't be properly discovered. Bug: chromium:1269882 Change-Id: I38bc211a3358158ba5eccd6b361e4b1173e047fd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70640 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
737d092b28
commit
4c10e82cf8
src/dawn_native/vulkan
|
@ -264,7 +264,7 @@ namespace dawn_native { namespace vulkan {
|
|||
// if the instance only supports Vulkan 1.0. Otherwise we set apiVersion to Vulkan 1.2,
|
||||
// treat 1.2 as the highest API version dawn targets.
|
||||
if (mGlobalInfo.apiVersion == VK_MAKE_VERSION(1, 0, 0)) {
|
||||
appInfo.apiVersion = mGlobalInfo.apiVersion;
|
||||
appInfo.apiVersion = VK_MAKE_VERSION(1, 0, 0);
|
||||
} else {
|
||||
appInfo.apiVersion = VK_MAKE_VERSION(1, 2, 0);
|
||||
}
|
||||
|
|
|
@ -67,15 +67,11 @@ namespace dawn_native { namespace vulkan {
|
|||
|
||||
// Gather info on available API version
|
||||
{
|
||||
uint32_t supportedAPIVersion = VK_MAKE_VERSION(1, 0, 0);
|
||||
if (vkFunctions.EnumerateInstanceVersion) {
|
||||
vkFunctions.EnumerateInstanceVersion(&supportedAPIVersion);
|
||||
info.apiVersion = VK_MAKE_VERSION(1, 0, 0);
|
||||
if (vkFunctions.EnumerateInstanceVersion != nullptr) {
|
||||
DAWN_TRY(CheckVkSuccess(vkFunctions.EnumerateInstanceVersion(&info.apiVersion),
|
||||
"vkEnumerateInstanceVersion"));
|
||||
}
|
||||
|
||||
// Use Vulkan 1.1 if it's available.
|
||||
info.apiVersion = (supportedAPIVersion >= VK_MAKE_VERSION(1, 1, 0))
|
||||
? VK_MAKE_VERSION(1, 1, 0)
|
||||
: VK_MAKE_VERSION(1, 0, 0);
|
||||
}
|
||||
|
||||
// Gather the info about the instance layers
|
||||
|
|
Loading…
Reference in New Issue