Revert image view usage flags regression introduced in 492d3856e8. (#241)

Maxwell format `VK_FORMAT_A8B8G8R8_SRGB_PACK32` does not support storage. However a `A8B8G8R8_UNORM` view is created for a image with that format which supports storage. The previous patch ignored image view format usage making it impossible for the pipeline to render to the texture.
This commit reverts the image usage override. However, there is still a mismatch between image format usage and image view format usage.

Reviewed-on: eden-emu/eden#241
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
Co-authored-by: weakboson <weakboson@quantum-field.net>
Co-committed-by: weakboson <weakboson@quantum-field.net>
This commit is contained in:
weakboson 2025-08-13 15:35:57 +02:00 committed by crueter
parent 89d40c6302
commit 383fb23348
Signed by untrusted user: crueter
GPG key ID: 425ACD2D4830EBC6

View file

@ -2014,10 +2014,15 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI
}
}
const auto format_info = MaxwellToVK::SurfaceFormat(*device, FormatType::Optimal, true, format);
if (ImageUsageFlags(format_info, format) != image.UsageFlags()) {
LOG_WARNING(Render_Vulkan,
"Image view format {} has different usage flags than image format {}", format,
image.info.format);
}
const VkImageViewUsageCreateInfo image_view_usage{
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
.pNext = nullptr,
.usage = image.UsageFlags(),
.usage = ImageUsageFlags(format_info, format),
};
const VkImageViewCreateInfo create_info{
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,