[Mesa-dev] [PATCH] anv: Implement VK_EXT_pci_bus_info
Jason Ekstrand
jason at jlekstrand.net
Sat Oct 13 13:16:07 UTC 2018
This is trivial for us to implement because Intel integrated GPUs have
always been at 0000:00:02.0. One of these days, when we actually ship a
discrete GPU, we'll have to implement it for real but right now we can
just hard code it.
---
src/intel/vulkan/anv_device.c | 11 +++++++++++
src/intel/vulkan/anv_extensions.py | 1 +
2 files changed, 12 insertions(+)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 6a24d1086d8..92644778982 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1166,6 +1166,17 @@ void anv_GetPhysicalDeviceProperties2(
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT: {
+ VkPhysicalDevicePCIBusInfoPropertiesEXT *properties =
+ (VkPhysicalDevicePCIBusInfoPropertiesEXT *)ext;
+ /* Intel integrated GPUs have always been at 0000:00:02.0 */
+ properties->pciDomain = 0;
+ properties->pciBus = 0;
+ properties->pciDevice = 2;
+ properties->pciFunction = 0;
+ break;
+ }
+
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: {
VkPhysicalDevicePointClippingProperties *properties =
(VkPhysicalDevicePointClippingProperties *) ext;
diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py
index d4915c95013..1329ef74026 100644
--- a/src/intel/vulkan/anv_extensions.py
+++ b/src/intel/vulkan/anv_extensions.py
@@ -121,6 +121,7 @@ EXTENSIONS = [
Extension('VK_EXT_external_memory_dma_buf', 1, True),
Extension('VK_EXT_global_priority', 1,
'device->has_context_priority'),
+ Extension('VK_EXT_pci_bus_info', 1, True),
Extension('VK_EXT_shader_viewport_index_layer', 1, True),
Extension('VK_EXT_shader_stencil_export', 1, 'device->info.gen >= 9'),
Extension('VK_EXT_vertex_attribute_divisor', 3, True),
--
2.19.1
More information about the mesa-dev
mailing list