From fa7af492359030e28391e1a13d7b9749057d3603 Mon Sep 17 00:00:00 2001 From: Ian Elliott Date: Tue, 20 Jul 2021 17:40:24 -0600 Subject: Change Vulkan API to 1.2 The commit changes the platform code to support Vulkan 1.2. Bug: 191881132 Test: build Change-Id: I6e71a84b85874a71031734004b8e44ee0ea7446f --- vulkan/libvulkan/api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vulkan/libvulkan/api.cpp') diff --git a/vulkan/libvulkan/api.cpp b/vulkan/libvulkan/api.cpp index fa3b2601a4..9ecc5687cc 100644 --- a/vulkan/libvulkan/api.cpp +++ b/vulkan/libvulkan/api.cpp @@ -1473,7 +1473,7 @@ VkResult EnumerateInstanceVersion(uint32_t* pApiVersion) { if (!EnsureInitialized()) return VK_ERROR_OUT_OF_HOST_MEMORY; - *pApiVersion = VK_API_VERSION_1_1; + *pApiVersion = VK_API_VERSION_1_2; return VK_SUCCESS; } -- cgit v1.2.3-59-g8ed1b From 628c41ac1d788cac4310bd62e52323de98b392c9 Mon Sep 17 00:00:00 2001 From: Trevor David Black Date: Mon, 27 Sep 2021 05:07:22 +0000 Subject: Change Vulkan API to 1.3 The commit changes the platform code to support Vulkan 1.3. Bug: 191881132 Test: build Change-Id: I75ed8a0737ef20ff95e4a27ce39cc855d8a1deeb --- vulkan/libvulkan/api.cpp | 2 +- vulkan/libvulkan/driver.cpp | 8 ++++++-- vulkan/nulldrv/null_driver.cpp | 2 +- vulkan/vkjson/vkjson.cc | 4 ++++ 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'vulkan/libvulkan/api.cpp') diff --git a/vulkan/libvulkan/api.cpp b/vulkan/libvulkan/api.cpp index 9ecc5687cc..c335e2a952 100644 --- a/vulkan/libvulkan/api.cpp +++ b/vulkan/libvulkan/api.cpp @@ -1473,7 +1473,7 @@ VkResult EnumerateInstanceVersion(uint32_t* pApiVersion) { if (!EnsureInitialized()) return VK_ERROR_OUT_OF_HOST_MEMORY; - *pApiVersion = VK_API_VERSION_1_2; + *pApiVersion = VK_API_VERSION_1_3; return VK_SUCCESS; } diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp index 238429f957..92250621ed 100644 --- a/vulkan/libvulkan/driver.cpp +++ b/vulkan/libvulkan/driver.cpp @@ -365,7 +365,7 @@ CreateInfoWrapper::CreateInfoWrapper(const VkInstanceCreateInfo& create_info, const VkAllocationCallbacks& allocator) : is_instance_(true), allocator_(allocator), - loader_api_version_(VK_API_VERSION_1_2), + loader_api_version_(VK_API_VERSION_1_3), icd_api_version_(icd_api_version), physical_dev_(VK_NULL_HANDLE), instance_info_(create_info), @@ -377,7 +377,7 @@ CreateInfoWrapper::CreateInfoWrapper(VkPhysicalDevice physical_dev, const VkAllocationCallbacks& allocator) : is_instance_(false), allocator_(allocator), - loader_api_version_(VK_API_VERSION_1_2), + loader_api_version_(VK_API_VERSION_1_3), icd_api_version_(icd_api_version), physical_dev_(physical_dev), dev_info_(create_info), @@ -519,6 +519,10 @@ VkResult CreateInfoWrapper::SanitizeExtensions() { is_instance_ ? loader_api_version_ : std::min(icd_api_version_, loader_api_version_); switch (api_version) { + case VK_API_VERSION_1_3: + hook_extensions_.set(ProcHook::EXTENSION_CORE_1_3); + hal_extensions_.set(ProcHook::EXTENSION_CORE_1_3); + [[clang::fallthrough]]; case VK_API_VERSION_1_2: hook_extensions_.set(ProcHook::EXTENSION_CORE_1_2); hal_extensions_.set(ProcHook::EXTENSION_CORE_1_2); diff --git a/vulkan/nulldrv/null_driver.cpp b/vulkan/nulldrv/null_driver.cpp index a9f37e56cf..eea0ec92e7 100644 --- a/vulkan/nulldrv/null_driver.cpp +++ b/vulkan/nulldrv/null_driver.cpp @@ -260,7 +260,7 @@ namespace null_driver { VKAPI_ATTR VkResult EnumerateInstanceVersion(uint32_t* pApiVersion) { - *pApiVersion = VK_API_VERSION_1_2; + *pApiVersion = VK_API_VERSION_1_3; return VK_SUCCESS; } diff --git a/vulkan/vkjson/vkjson.cc b/vulkan/vkjson/vkjson.cc index 90cf42c7f7..798fd4a5ab 100644 --- a/vulkan/vkjson/vkjson.cc +++ b/vulkan/vkjson/vkjson.cc @@ -973,6 +973,8 @@ inline bool Iterate(Visitor* visitor, VkJsonDevice* device) { bool ret = true; switch (device->properties.apiVersion ^ VK_API_VERSION_PATCH(device->properties.apiVersion)) { + case VK_API_VERSION_1_3: + FALLTHROUGH_INTENDED; case VK_API_VERSION_1_2: ret &= visitor->Visit("core12", &device->core12); FALLTHROUGH_INTENDED; @@ -1030,6 +1032,8 @@ template inline bool Iterate(Visitor* visitor, VkJsonInstance* instance) { bool ret = true; switch (instance->api_version ^ VK_API_VERSION_PATCH(instance->api_version)) { + case VK_API_VERSION_1_3: + FALLTHROUGH_INTENDED; case VK_API_VERSION_1_2: ret &= visitor->Visit("apiVersion", &instance->api_version); FALLTHROUGH_INTENDED; -- cgit v1.2.3-59-g8ed1b