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

Commit d980a028 authored by Chia-I Wu's avatar Chia-I Wu Committed by android-build-merger
Browse files

Merge "vulkan: fix crash when only non-global layers are enabled" into nyc-dev...

Merge "vulkan: fix crash when only non-global layers are enabled" into nyc-dev am: a101f6a4 am: 95e76d6b
am: dc2ed7ed

* commit 'dc2ed7ed':
  vulkan: fix crash when only non-global layers are enabled

Change-Id: I5c3fd83734a9472654b4112149fb52d9bafed5be
parents 6fcbd1dd dc2ed7ed
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -602,6 +602,13 @@ VkResult LayerChain::ActivateLayers(VkPhysicalDevice physical_dev,
        new (&layers_[layer_count_++]) ActiveLayer{GetLayerRef(l), {}};
    }

    // this may happen when all layers are non-global ones
    if (!layer_count_) {
        get_instance_proc_addr_ = driver::GetInstanceProcAddr;
        get_device_proc_addr_ = driver::GetDeviceProcAddr;
        return VK_SUCCESS;
    }

    SetupLayerLinks();

    return VK_SUCCESS;