if (p.Type() != OutputType::json) {
if (gpu.inst.CheckExtensionEnabled(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) {
void *place = gpu.props2.pNext;
- chain_iterator_phys_device_props2(p, gpu.inst, gpu, place, gpu.inst.vk_version);
+ chain_iterator_phys_device_props2(p, gpu.inst, gpu, place, gpu.api_version);
}
}
p.AddNewline();
if (p.Type() != OutputType::json) {
if (gpu.inst.CheckExtensionEnabled(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) {
void *place = gpu.features2.pNext;
- chain_iterator_phys_device_features2(p, gpu, place, gpu.inst.vk_version);
+ chain_iterator_phys_device_features2(p, gpu, place, gpu.api_version);
}
}
}
AppInstance &inst;
uint32_t id;
VkPhysicalDevice phys_device;
+ VulkanVersion api_version;
VkPhysicalDeviceProperties props;
VkPhysicalDeviceProperties2KHR props2;
: inst(inst), id(id), phys_device(phys_device) {
vkGetPhysicalDeviceProperties(phys_device, &props);
+ // needs to find the minimum of the instance and device version, and use that to print the device info
+ uint32_t gpu_version = props.apiVersion < inst.instance_version ? props.apiVersion : inst.instance_version;
+ api_version = {VK_VERSION_MAJOR(gpu_version), VK_VERSION_MINOR(gpu_version), VK_VERSION_PATCH(gpu_version)};
+
if (inst.CheckExtensionEnabled(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) {
props2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR;
buildpNextChain((VkStructureHeader *)&props2, chainInfos.phys_device_props2);