Adjust texture matching hacks

This commit is contained in:
Billy Laws
2022-10-30 16:24:43 +00:00
parent 4f5c9047ef
commit 2dd4698441
2 changed files with 5 additions and 1 deletions

View File

@ -857,6 +857,11 @@ namespace skyline::gpu {
if (gpu.traits.quirks.vkImageMutableFormatCostly && viewFormat != textureFormat && (!gpu.traits.quirks.adrenoRelaxedFormatAliasing || !texture::IsAdrenoAliasCompatible(viewFormat, textureFormat)))
Logger::Warn("Creating a view of a texture with a different format without mutable format: {} - {}", vk::to_string(viewFormat), vk::to_string(textureFormat));
if ((pFormat->vkAspect & format->vkAspect) == vk::ImageAspectFlagBits{}) {
pFormat = format; // If the requested format doesn't share any aspects then fallback to the texture's format in the hope it's more likely to function
range.aspectMask = format->Aspect(mapping.r == vk::ComponentSwizzle::eR);
}
return std::make_shared<TextureView>(shared_from_this(), type, range, pFormat, mapping);
}