Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa7af492 authored by Ian Elliott's avatar Ian Elliott Committed by Trevor David Black
Browse files

Change Vulkan API to 1.2

The commit changes the platform code to support Vulkan 1.2.

Bug: 191881132
Test: build
Change-Id: I6e71a84b85874a71031734004b8e44ee0ea7446f
parent 9fed2ba5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}

+6 −2
Original line number Diff line number Diff line
@@ -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_1),
      loader_api_version_(VK_API_VERSION_1_2),
      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_1),
      loader_api_version_(VK_API_VERSION_1_2),
      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_2:
            hook_extensions_.set(ProcHook::EXTENSION_CORE_1_2);
            hal_extensions_.set(ProcHook::EXTENSION_CORE_1_2);
            [[clang::fallthrough]];
        case VK_API_VERSION_1_1:
            hook_extensions_.set(ProcHook::EXTENSION_CORE_1_1);
            hal_extensions_.set(ProcHook::EXTENSION_CORE_1_1);
+1 −1
Original line number Diff line number Diff line
@@ -260,7 +260,7 @@ namespace null_driver {

VKAPI_ATTR
VkResult EnumerateInstanceVersion(uint32_t* pApiVersion) {
    *pApiVersion = VK_API_VERSION_1_1;
    *pApiVersion = VK_API_VERSION_1_2;
    return VK_SUCCESS;
}