diff --git a/src/dawn/native/vulkan/BackendVk.cpp b/src/dawn/native/vulkan/BackendVk.cpp index fc3e0e9944..ca4a5ddd06 100644 --- a/src/dawn/native/vulkan/BackendVk.cpp +++ b/src/dawn/native/vulkan/BackendVk.cpp @@ -329,7 +329,7 @@ ResultOrError VulkanInstance::CreateVkInstance(const Instance appInfo.applicationVersion = 0; appInfo.pEngineName = nullptr; appInfo.engineVersion = 0; - appInfo.apiVersion = std::min(mGlobalInfo.apiVersion, VK_MAKE_VERSION(1, 3, 0)); + appInfo.apiVersion = std::min(mGlobalInfo.apiVersion, VK_API_VERSION_1_3); VkInstanceCreateInfo createInfo; createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; diff --git a/src/dawn/native/vulkan/VulkanExtensions.cpp b/src/dawn/native/vulkan/VulkanExtensions.cpp index b9e176ae66..439e95d129 100644 --- a/src/dawn/native/vulkan/VulkanExtensions.cpp +++ b/src/dawn/native/vulkan/VulkanExtensions.cpp @@ -22,9 +22,9 @@ namespace dawn::native::vulkan { -static constexpr uint32_t VulkanVersion_1_1 = VK_MAKE_VERSION(1, 1, 0); -static constexpr uint32_t VulkanVersion_1_2 = VK_MAKE_VERSION(1, 2, 0); -static constexpr uint32_t VulkanVersion_1_3 = VK_MAKE_VERSION(1, 3, 0); +static constexpr uint32_t VulkanVersion_1_1 = VK_API_VERSION_1_1; +static constexpr uint32_t VulkanVersion_1_2 = VK_API_VERSION_1_2; +static constexpr uint32_t VulkanVersion_1_3 = VK_API_VERSION_1_3; static constexpr uint32_t NeverPromoted = std::numeric_limits::max(); // A static array for InstanceExtInfo that can be indexed with InstanceExts. diff --git a/src/dawn/native/vulkan/VulkanExtensions.h b/src/dawn/native/vulkan/VulkanExtensions.h index c7c361a7b5..6912528404 100644 --- a/src/dawn/native/vulkan/VulkanExtensions.h +++ b/src/dawn/native/vulkan/VulkanExtensions.h @@ -54,7 +54,7 @@ using InstanceExtSet = ityp::bitset(InstanceE struct InstanceExtInfo { InstanceExt index; const char* name; - // The version in which this extension was promoted as built with VK_MAKE_VERSION, + // The version in which this extension was promoted as built with VK_API_VERSION_1_x, // or NeverPromoted if it was never promoted. uint32_t versionPromoted; }; @@ -117,7 +117,7 @@ using DeviceExtSet = ityp::bitset(DeviceExt::En struct DeviceExtInfo { DeviceExt index; const char* name; - // The version in which this extension was promoted as built with VK_MAKE_VERSION, + // The version in which this extension was promoted as built with VK_API_VERSION_1_x, // or NeverPromoted if it was never promoted. uint32_t versionPromoted; }; diff --git a/src/dawn/native/vulkan/VulkanFunctions.cpp b/src/dawn/native/vulkan/VulkanFunctions.cpp index a173403855..3734daceae 100644 --- a/src/dawn/native/vulkan/VulkanFunctions.cpp +++ b/src/dawn/native/vulkan/VulkanFunctions.cpp @@ -138,19 +138,19 @@ MaybeError VulkanFunctions::LoadInstanceProcs(VkInstance instance, // Vulkan 1.1 is not required to report promoted extensions from 1.0 and is not required to // support the vendor entrypoint in GetProcAddress. - if (globalInfo.apiVersion >= VK_MAKE_VERSION(1, 1, 0)) { + if (globalInfo.apiVersion >= VK_API_VERSION_1_1) { GET_INSTANCE_PROC(GetPhysicalDeviceExternalBufferProperties); } else if (globalInfo.HasExt(InstanceExt::ExternalMemoryCapabilities)) { GET_INSTANCE_PROC_VENDOR(GetPhysicalDeviceExternalBufferProperties, KHR); } - if (globalInfo.apiVersion >= VK_MAKE_VERSION(1, 1, 0)) { + if (globalInfo.apiVersion >= VK_API_VERSION_1_1) { GET_INSTANCE_PROC(GetPhysicalDeviceExternalSemaphoreProperties); } else if (globalInfo.HasExt(InstanceExt::ExternalSemaphoreCapabilities)) { GET_INSTANCE_PROC_VENDOR(GetPhysicalDeviceExternalSemaphoreProperties, KHR); } - if (globalInfo.apiVersion >= VK_MAKE_VERSION(1, 1, 0)) { + if (globalInfo.apiVersion >= VK_API_VERSION_1_1) { GET_INSTANCE_PROC(GetPhysicalDeviceFeatures2); GET_INSTANCE_PROC(GetPhysicalDeviceProperties2); GET_INSTANCE_PROC(GetPhysicalDeviceFormatProperties2); diff --git a/src/dawn/native/vulkan/VulkanInfo.cpp b/src/dawn/native/vulkan/VulkanInfo.cpp index 4d5ddeeb56..116fd7222d 100644 --- a/src/dawn/native/vulkan/VulkanInfo.cpp +++ b/src/dawn/native/vulkan/VulkanInfo.cpp @@ -68,7 +68,7 @@ ResultOrError GatherGlobalInfo(const VulkanFunctions& vkFuncti VulkanGlobalInfo info = {}; // Gather info on available API version { - info.apiVersion = VK_MAKE_VERSION(1, 0, 0); + info.apiVersion = VK_API_VERSION_1_0; if (vkFunctions.EnumerateInstanceVersion != nullptr) { DAWN_TRY(CheckVkSuccess(vkFunctions.EnumerateInstanceVersion(&info.apiVersion), "vkEnumerateInstanceVersion"));