mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-29 13:14:14 +01:00
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:
parent
7ef4959060
commit
44615c8dd2
@ -203,7 +203,7 @@ namespace skyline::gpu {
|
||||
throw exception("Cannot find a queue family with both eGraphics and eCompute bits set");
|
||||
}(),
|
||||
vk::DeviceQueueGlobalPriorityCreateInfoEXT{
|
||||
.globalPriority = vk::QueueGlobalPriorityEXT::eHigh,
|
||||
.globalPriority = traits.quirks.maxGlobalPriority,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,9 @@ namespace skyline::gpu {
|
||||
bool needsIndividualTextureBindingWrites{}; //!< [Adreno Proprietary] A bug that requires descriptor set writes for VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER to be done individually with descriptorCount = 1 rather than batched
|
||||
bool vkImageMutableFormatCostly{}; //!< [Adreno Proprietary/Freedreno] An indication that VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT is costly and should not be enabled unless absolutely necessary (Disables UBWC on Adreno GPUs)
|
||||
bool brokenDescriptorAliasing{}; //!< [Adreno Proprietary] A bug that causes alised descriptor sets to be incorrectly interpreted by the shader compiler leading to it buggering up LLVM function argument types and crashing
|
||||
|
||||
u32 maxSubpassCount{std::numeric_limits<u32>::max()}; //!< The maximum amount of subpasses within a renderpass, this is limited to 64 on older Adreno proprietary drivers
|
||||
vk::QueueGlobalPriorityEXT maximumGlobalPriority{vk::QueueGlobalPriorityEXT::eMedium}; //!< The highest allowed global priority of the queue, drivers will not allow higher priorities to be set on queues
|
||||
|
||||
QuirkManager() = default;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user