Don't set COLOR_ATTACHMENT_BIT for compressed formats.

The better solution would be to only set this for formats that support
it on original HW but this will get rid of the validation errors for now.
This commit is contained in:
Robin Kertels 2022-02-28 22:44:26 +01:00 committed by PixelyIon
parent 82296ac5b8
commit d889550e84

View File

@ -272,7 +272,7 @@ namespace skyline::gpu {
layerCount(guest->layerCount),
sampleCount(vk::SampleCountFlagBits::e1) {
vk::ImageUsageFlags usage{vk::ImageUsageFlagBits::eTransferSrc | vk::ImageUsageFlagBits::eTransferDst | vk::ImageUsageFlagBits::eSampled};
if (format->vkAspect & vk::ImageAspectFlagBits::eColor)
if ((format->vkAspect & vk::ImageAspectFlagBits::eColor) && !format->IsCompressed())
usage |= vk::ImageUsageFlagBits::eColorAttachment;
if (format->vkAspect & (vk::ImageAspectFlagBits::eDepth | vk::ImageAspectFlagBits::eStencil))
usage |= vk::ImageUsageFlagBits::eDepthStencilAttachment;