Implement per-vendor VkQueue maximum global priority

We found out that certain vendors such as Nvidia had a limitation on the global priority of a queue and requesting `VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT` would result in `VK_ERROR_NOT_PERMITTED_EXT`. A quirk has been introduced to supply the maximum supported global priority which is currently set on a per-vendor basis to avoid future crashes.
This commit is contained in:
PixelyIon
2022-04-24 16:07:30 +05:30
parent 7ef4959060
commit 44615c8dd2
3 changed files with 17 additions and 3 deletions

View File

@ -143,8 +143,10 @@ namespace skyline::gpu {
needsIndividualTextureBindingWrites = true;
vkImageMutableFormatCostly = true; // Disables UBWC
brokenDescriptorAliasing = true;
if (deviceProperties.driverVersion < VK_MAKE_VERSION(512, 600, 0))
maxSubpassCount = 64; // Driver will segfault while destroying the renderpass and associated objects if this is exceeded on all 5xx and below drivers
maxGlobalPriority = vk::QueueGlobalPriorityEXT::eHigh;
break;
}
@ -153,6 +155,16 @@ namespace skyline::gpu {
break;
}
case vk::DriverId::eArmProprietary: {
maxGlobalPriority = vk::QueueGlobalPriorityEXT::eHigh;
break;
}
case vk::DriverId::eAmdProprietary: {
maxGlobalPriority = vk::QueueGlobalPriorityEXT::eHigh;
break;
}
default:
break;
}
@ -160,8 +172,8 @@ namespace skyline::gpu {
std::string TraitManager::QuirkManager::Summary() {
return fmt::format(
"\n* Needs Individual Texture Binding Writes: {}\n* VkImage Mutable Format is costly: {}\n* Broken Descriptor Aliasing: {}\n* Max Subpass Count: {}",
needsIndividualTextureBindingWrites, vkImageMutableFormatCostly, brokenDescriptorAliasing, maxSubpassCount
"\n* Needs Individual Texture Binding Writes: {}\n* VkImage Mutable Format is costly: {}\n* Broken Descriptor Aliasing: {}\n* Max Subpass Count: {}\n* Max Global Queue Priority: {}",
needsIndividualTextureBindingWrites, vkImageMutableFormatCostly, brokenDescriptorAliasing, maxSubpassCount, vk::to_string(maxGlobalPriority)
);
}