mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 21:35:29 +03:00
Adjust texture matching hacks
This commit is contained in:
parent
4f5c9047ef
commit
2dd4698441
@ -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);
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,6 @@ namespace skyline::gpu {
|
||||
constexpr bool IsCompatible(const FormatBase &other) const {
|
||||
return vkFormat == other.vkFormat
|
||||
|| (vkFormat == vk::Format::eD32Sfloat && other.vkFormat == vk::Format::eR32Sfloat)
|
||||
|| (vkFormat == vk::Format::eR32Sfloat && other.vkFormat == vk::Format::eD32Sfloat)
|
||||
|| (componentCount(vkFormat) == componentCount(other.vkFormat) &&
|
||||
ranges::all_of(ranges::views::iota(u8{0}, componentCount(vkFormat)), [this, other](auto i) {
|
||||
return componentBits(vkFormat, i) == componentBits(other.vkFormat, i);
|
||||
|
Loading…
Reference in New Issue
Block a user