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

Commit b60beccd authored by Courtney Goeltzenleuchter's avatar Courtney Goeltzenleuchter Committed by android-build-merger
Browse files

loader: Implement new layer initialization

am: a90ce61c

* commit 'a90ce61c':
  loader: Implement new layer initialization
parents a0f5906b a90ce61c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -560,6 +560,7 @@ bool LoadDriverDispatchTable(VkInstance instance,
       objects */}}
  {{else if eq $.Name "vkGetDeviceQueue"}}true
  {{else if eq $.Name "vkAllocateCommandBuffers"}}true
  {{else if eq $.Name "vkCreateDevice"}}true

  {{/* vkDestroy for dispatchable objects needs to handle VK_NULL_HANDLE;
       trying to dispatch through that would crash. */}}
+2 −1
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ const NameProc kLoaderGlobalProcs[] = {
const NameProc kLoaderTopProcs[] = {
    // clang-format off
    {"vkAllocateCommandBuffers", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkAllocateCommandBuffers>(AllocateCommandBuffers_Top))},
    {"vkCreateDevice", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkCreateDevice>(CreateDevice_Top))},
    {"vkCreateInstance", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkCreateInstance>(CreateInstance_Top))},
    {"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkDestroyDevice>(DestroyDevice_Top))},
    {"vkDestroyInstance", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkDestroyInstance>(DestroyInstance_Top))},
@@ -1401,7 +1402,7 @@ VKAPI_ATTR VkResult vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice ph

__attribute__((visibility("default")))
VKAPI_ATTR VkResult vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) {
    return GetDispatchTable(physicalDevice).CreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice);
    return CreateDevice_Top(physicalDevice, pCreateInfo, pAllocator, pDevice);
}

__attribute__((visibility("default")))
+269 −173

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ VKAPI_ATTR void DestroyInstance_Top(VkInstance instance, const VkAllocationCallb
VKAPI_ATTR PFN_vkVoidFunction GetDeviceProcAddr_Top(VkDevice drv_device, const char* name);
VKAPI_ATTR void GetDeviceQueue_Top(VkDevice drv_device, uint32_t family, uint32_t index, VkQueue* out_queue);
VKAPI_ATTR VkResult AllocateCommandBuffers_Top(VkDevice device, const VkCommandBufferAllocateInfo* alloc_info, VkCommandBuffer* cmdbufs);
VKAPI_ATTR VkResult CreateDevice_Top(VkPhysicalDevice pdev, const VkDeviceCreateInfo* create_info, const VkAllocationCallbacks* allocator, VkDevice* device_out);
VKAPI_ATTR void DestroyDevice_Top(VkDevice drv_device, const VkAllocationCallbacks* allocator);

VKAPI_ATTR VkResult CreateInstance_Bottom(const VkInstanceCreateInfo* create_info, const VkAllocationCallbacks* allocator, VkInstance* vkinstance);