Add quirk to avoid VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT on Adreno GPUs

Adreno GPUs have significant performance penalties from usage of `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT` which require disabling UBWC and on Turnip, forces linear tiling. As a result, it's been made an optional quirk which doesn't supply the flag in `VkImageCreateInfo` and logs a warning if a view with a different Vulkan format from the original image is created.
This commit is contained in:
PixelyIon
2022-03-12 20:01:52 +05:30
parent 731d06010d
commit 24d7066d8b
3 changed files with 13 additions and 3 deletions

View File

@ -131,6 +131,12 @@ namespace skyline::gpu {
switch (driverProperties.driverID) {
case vk::DriverId::eQualcommProprietary: {
needsIndividualTextureBindingWrites = true;
vkImageMutableFormatCostly = true; // Disables UBWC
break;
}
case vk::DriverId::eMesaTurnip: {
vkImageMutableFormatCostly = true; // Disables UBWC and forces linear tiling
break;
}
@ -141,8 +147,8 @@ namespace skyline::gpu {
std::string TraitManager::QuirkManager::Summary() {
return fmt::format(
"\n* Needs Individual Texture Binding Writes: {}",
needsIndividualTextureBindingWrites
"\n* Needs Individual Texture Binding Writes: {}\n* VkImage Mutable Format is costly: {}",
needsIndividualTextureBindingWrites, vkImageMutableFormatCostly
);
}