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

Commit 628c41ac authored by Trevor David Black's avatar Trevor David Black
Browse files

Change Vulkan API to 1.3

The commit changes the platform code to support Vulkan 1.3.

Bug: 191881132
Test: build
Change-Id: I75ed8a0737ef20ff95e4a27ce39cc855d8a1deeb
parent b700ae8c
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_2;
    *pApiVersion = VK_API_VERSION_1_3;
    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_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);
+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_2;
    *pApiVersion = VK_API_VERSION_1_3;
    return VK_SUCCESS;
}

+4 −0
Original line number Diff line number Diff line
@@ -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 <typename Visitor>
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;