summaryrefslogtreecommitdiff
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index bb1834e1867..391a5576306 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -750,6 +750,20 @@ VkResult anv_CreateInstance(
}
}
+ struct anv_physical_device *pdevice = &instance->physicalDevice;
+ for (unsigned i = 0; i < ARRAY_SIZE(pdevice->dispatch.entrypoints); i++) {
+ /* Vulkan requires that entrypoints for extensions which have not been
+ * enabled must not be advertised.
+ */
+ if (!anv_physical_device_entrypoint_is_enabled(i, instance->app_info.api_version,
+ &instance->enabled_extensions)) {
+ pdevice->dispatch.entrypoints[i] = NULL;
+ } else {
+ pdevice->dispatch.entrypoints[i] =
+ anv_physical_device_dispatch_table.entrypoints[i];
+ }
+ }
+
for (unsigned i = 0; i < ARRAY_SIZE(instance->device_dispatch.entrypoints); i++) {
/* Vulkan requires that entrypoints for extensions which have not been
* enabled must not be advertised.
@@ -1964,6 +1978,10 @@ PFN_vkVoidFunction anv_GetInstanceProcAddr(
if (idx >= 0)
return instance->dispatch.entrypoints[idx];
+ idx = anv_get_physical_device_entrypoint_index(pName);
+ if (idx >= 0)
+ return instance->physicalDevice.dispatch.entrypoints[idx];
+
idx = anv_get_device_entrypoint_index(pName);
if (idx >= 0)
return instance->device_dispatch.entrypoints[idx];