Mesa (main): v3dv: Use vk_instance_get_proc_addr_unchecked for WSI
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Oct 29 23:37:09 UTC 2021
Module: Mesa
Branch: main
Commit: 5ccba1576da2b2a32444c8328bc9b3a0427bb0b1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ccba1576da2b2a32444c8328bc9b3a0427bb0b1
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Fri Oct 1 17:25:40 2021 -0500
v3dv: Use vk_instance_get_proc_addr_unchecked for WSI
It exists precisely to handle this case without the driver looking up
trampolines itself. This is nearly identical to what ANV does.
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
---
src/broadcom/vulkan/v3dv_wsi.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/src/broadcom/vulkan/v3dv_wsi.c b/src/broadcom/vulkan/v3dv_wsi.c
index 154adf3a7da..6157c32d69c 100644
--- a/src/broadcom/vulkan/v3dv_wsi.c
+++ b/src/broadcom/vulkan/v3dv_wsi.c
@@ -34,17 +34,7 @@ static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
v3dv_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName)
{
V3DV_FROM_HANDLE(v3dv_physical_device, pdevice, physicalDevice);
- PFN_vkVoidFunction func;
-
- func = vk_instance_dispatch_table_get(&pdevice->vk.instance->dispatch_table, pName);
- if (func != NULL)
- return func;
-
- func = vk_physical_device_dispatch_table_get(&pdevice->vk.dispatch_table, pName);
- if (func != NULL)
- return func;
-
- return vk_device_dispatch_table_get(&vk_device_trampolines, pName);
+ return vk_instance_get_proc_addr_unchecked(pdevice->vk.instance, pName);
}
static bool
More information about the mesa-commit
mailing list