summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-10-07 15:47:45 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-10-14 15:40:39 -0700
commit6d557ae4032adafc85a4cb5a76d8653bf0cf6639 (patch)
tree94c651306b699af4217b1233c7f21aa13094f790 /src/intel/vulkan/anv_device.c
parent4c9dec80edeb7f1d1774ca51faa806241c1c59cb (diff)
downloadexternal_mesa3d-6d557ae4032adafc85a4cb5a76d8653bf0cf6639.zip
external_mesa3d-6d557ae4032adafc85a4cb5a76d8653bf0cf6639.tar.gz
external_mesa3d-6d557ae4032adafc85a4cb5a76d8653bf0cf6639.tar.bz2
anv: Make entrypoint resolution take a gen_device_info
In order for things such as the ANV_CALL and the ifuncs to work, we used to have a singleton gen_device_info structure that got assigned the first time you create a device. Given that the driver will never be used simultaneously on two different generations of hardware, this was fairly safe to do. However, it has caused a few hickups and isn't, in general, a good plan. Now that the two primary reasons for this singleton are gone, we can get rid of it and make things quite a bit safer. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 8107835..53b9b1b 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -682,7 +682,7 @@ PFN_vkVoidFunction anv_GetInstanceProcAddr(
VkInstance instance,
const char* pName)
{
- return anv_lookup_entrypoint(pName);
+ return anv_lookup_entrypoint(NULL, pName);
}
/* With version 1+ of the loader interface the ICD should expose
@@ -702,10 +702,11 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(
}
PFN_vkVoidFunction anv_GetDeviceProcAddr(
- VkDevice device,
+ VkDevice _device,
const char* pName)
{
- return anv_lookup_entrypoint(pName);
+ ANV_FROM_HANDLE(anv_device, device, _device);
+ return anv_lookup_entrypoint(&device->info, pName);
}
static VkResult
@@ -854,8 +855,6 @@ VkResult anv_CreateDevice(
return vk_error(VK_ERROR_EXTENSION_NOT_PRESENT);
}
- anv_set_dispatch_devinfo(&physical_device->info);
-
device = anv_alloc2(&physical_device->instance->alloc, pAllocator,
sizeof(*device), 8,
VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);