Avoid format aliasing warnings on Adreno

Implements an algorithm to determine formats that can be aliased as views without needing `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT`, this avoids spamming warning logs on view creation when the aliased formats will function in practice.
This commit is contained in:
PixelyIon
2022-05-05 19:06:09 +05:30
parent 7206ab4c67
commit 62ea2a6da5
4 changed files with 170 additions and 4 deletions

View File

@ -149,6 +149,7 @@ namespace skyline::gpu {
case vk::DriverId::eQualcommProprietary: {
needsIndividualTextureBindingWrites = true;
vkImageMutableFormatCostly = true; // Disables UBWC
adrenoRelaxedFormatAliasing = true;
brokenDescriptorAliasing = true;
relaxedRenderPassCompatibility = true; // Adreno drivers support relaxed render pass compatibility rules
@ -160,6 +161,7 @@ namespace skyline::gpu {
case vk::DriverId::eMesaTurnip: {
vkImageMutableFormatCostly = true; // Disables UBWC and forces linear tiling
adrenoRelaxedFormatAliasing = true;
break;
}
@ -185,8 +187,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* Relaxed Render Pass Compatibility: {}\n* Max Subpass Count: {}\n* Max Global Queue Priority: {}",
needsIndividualTextureBindingWrites, vkImageMutableFormatCostly, brokenDescriptorAliasing, relaxedRenderPassCompatibility, maxSubpassCount, vk::to_string(maxGlobalPriority)
"\n* Needs Individual Texture Binding Writes: {}\n* VkImage Mutable Format is costly: {}\n* Adreno Relaxed Format Aliasing: {}\n* Broken Descriptor Aliasing: {}\n* Relaxed Render Pass Compatibility: {}\n* Max Subpass Count: {}\n* Max Global Queue Priority: {}",
needsIndividualTextureBindingWrites, vkImageMutableFormatCostly, adrenoRelaxedFormatAliasing, brokenDescriptorAliasing, relaxedRenderPassCompatibility, maxSubpassCount, vk::to_string(maxGlobalPriority)
);
}