VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = 1000199000,
VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = 1000199001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = 1000221000,
VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000,
#define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT
#define VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION 1
#define VK_EXT_HOST_QUERY_RESET_SPEC_VERSION 1
+#define VK_EXT_PCI_BUS_INFO_SPEC_VERSION 2
return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT;
}
+template<> VkStructureType getStructureType<VkPhysicalDevicePCIBusInfoPropertiesEXT> (void)
+{
+ return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT;
+}
+
std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceCooperativeMatrixPropertiesNV& value);
std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceCooperativeMatrixFeaturesNV& value);
std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceHostQueryResetFeaturesEXT& value);
+std::ostream& operator<< (std::ostream& s, const VkPhysicalDevicePCIBusInfoPropertiesEXT& value);
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR";
case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR: return "VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT";
case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR: return "VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT";
s << '}';
return s;
}
+
+std::ostream& operator<< (std::ostream& s, const VkPhysicalDevicePCIBusInfoPropertiesEXT& value)
+{
+ s << "VkPhysicalDevicePCIBusInfoPropertiesEXT = {\n";
+ s << "\tsType = " << value.sType << '\n';
+ s << "\tpNext = " << value.pNext << '\n';
+ s << "\tpciDomain = " << value.pciDomain << '\n';
+ s << "\tpciBus = " << value.pciBus << '\n';
+ s << "\tpciDevice = " << value.pciDevice << '\n';
+ s << "\tpciFunction = " << value.pciFunction << '\n';
+ s << '}';
+ return s;
+}
VkBool32 hostQueryReset;
};
+struct VkPhysicalDevicePCIBusInfoPropertiesEXT
+{
+ VkStructureType sType;
+ void* pNext;
+ deUint32 pciDomain;
+ deUint32 pciBus;
+ deUint32 pciDevice;
+ deUint32 pciFunction;
+};
+
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = 1000199000,
VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = 1000199001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = 1000221000,
VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000,
deUint32 queryCount);
#endif
+
+#define VK_EXT_pci_bus_info 1
+#define VK_EXT_PCI_BUS_INFO_SPEC_VERSION 2
+#define VK_EXT_PCI_BUS_INFO_EXTENSION_NAME "VK_EXT_pci_bus_info"
+
+typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ deUint32 pciDomain;
+ deUint32 pciBus;
+ deUint32 pciDevice;
+ deUint32 pciFunction;
+} VkPhysicalDevicePCIBusInfoPropertiesEXT;
+
+
#ifdef __cplusplus
}
#endif
#include <vector>
#include <set>
#include <string>
+#include <limits>
namespace vkt
{
using tcu::TestLog;
using tcu::ScopedLogSection;
+const deUint32 DEUINT32_MAX = std::numeric_limits<deUint32>::max();
+
enum
{
GUARD_SIZE = 0x20, //!< Number of bytes to check
// VK_KHR_get_physical_device_properties2
+string toString(const VkPhysicalDevicePCIBusInfoPropertiesEXT& value)
+{
+ std::ostringstream s;
+ s << "VkPhysicalDevicePCIBusInfoPropertiesEXT = {\n";
+ s << "\tsType = " << value.sType << '\n';
+ s << "\tpciDomain = " << value.pciDomain << '\n';
+ s << "\tpciBus = " << value.pciBus << '\n';
+ s << "\tpciDevice = " << value.pciDevice << '\n';
+ s << "\tpciFunction = " << value.pciFunction << '\n';
+ s << '}';
+ return s.str();
+}
+
bool checkExtension (vector<VkExtensionProperties>& properties, const char* extension)
{
for (size_t ndx = 0; ndx < properties.size(); ++ndx)
log << TestLog::Message << dsResolveProperties[0] << TestLog::EndMessage;
}
+ if (isExtensionSupported(extensions, RequiredExtension("VK_EXT_pci_bus_info", 2, 2)))
+ {
+ VkPhysicalDevicePCIBusInfoPropertiesEXT pciBusInfoProperties[count];
+
+ for (int ndx = 0; ndx < count; ++ndx)
+ {
+ // Each PCI device is identified by an 8-bit domain number, 5-bit
+ // device number and 3-bit function number[1][2].
+ //
+ // In addition, because PCI systems can be interconnected and
+ // divided in segments, Linux assigns a 16-bit number to the device
+ // as the "domain". In Windows, the segment or domain is stored in
+ // the higher 24-bit section of the bus number.
+ //
+ // This means the maximum unsigned 32-bit integer for these members
+ // are invalid values and should change after querying properties.
+ //
+ // [1] https://en.wikipedia.org/wiki/PCI_configuration_space
+ // [2] PCI Express Base Specification Revision 3.0, section 2.2.4.2.
+ deMemset(pciBusInfoProperties + ndx, 0, sizeof(pciBusInfoProperties[ndx]));
+ pciBusInfoProperties[ndx].pciDomain = DEUINT32_MAX;
+ pciBusInfoProperties[ndx].pciBus = DEUINT32_MAX;
+ pciBusInfoProperties[ndx].pciDevice = DEUINT32_MAX;
+ pciBusInfoProperties[ndx].pciFunction = DEUINT32_MAX;
+
+ pciBusInfoProperties[ndx].sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT;
+ pciBusInfoProperties[ndx].pNext = DE_NULL;
+
+ extProperties.pNext = pciBusInfoProperties + ndx;
+ vki.getPhysicalDeviceProperties2(physicalDevice, &extProperties);
+ }
+
+ if (deMemCmp(pciBusInfoProperties + 0, pciBusInfoProperties + 1, sizeof(pciBusInfoProperties[0])) != 0)
+ {
+ TCU_FAIL("Mismatch in VkPhysicalDevicePCIBusInfoPropertiesEXT");
+ }
+
+ log << TestLog::Message << toString(pciBusInfoProperties[0]) << TestLog::EndMessage;
+
+ if (pciBusInfoProperties[0].pciDomain == DEUINT32_MAX ||
+ pciBusInfoProperties[0].pciBus == DEUINT32_MAX ||
+ pciBusInfoProperties[0].pciDevice == DEUINT32_MAX ||
+ pciBusInfoProperties[0].pciFunction == DEUINT32_MAX)
+ {
+ TCU_FAIL("Invalid information in VkPhysicalDevicePCIBusInfoPropertiesEXT");
+ }
+ }
+
return tcu::TestStatus::pass("Querying device properties succeeded");
}
name = name.replace("VIEWPORT_W", "VIEWPORT_W_")
name = name.replace("_IDPROPERTIES", "_ID_PROPERTIES")
name = name.replace("PHYSICAL_DEVICE_FLOAT_16_INT_8_FEATURES", "PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES")
+ name = name.replace("_PCIBUS_", "_PCI_BUS_")
return prefix + name
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = 1000199000,
VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = 1000199001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = 1000221000,
VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000,
uint32_t queryCount);
#endif
+
+#define VK_EXT_pci_bus_info 1
+#define VK_EXT_PCI_BUS_INFO_SPEC_VERSION 2
+#define VK_EXT_PCI_BUS_INFO_EXTENSION_NAME "VK_EXT_pci_bus_info"
+
+typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t pciDomain;
+ uint32_t pciBus;
+ uint32_t pciDevice;
+ uint32_t pciFunction;
+} VkPhysicalDevicePCIBusInfoPropertiesEXT;
+
+
#ifdef __cplusplus
}
#endif