Revert image view usage flags regression introduced in 492d3856e8.
All checks were successful
eden-license / license-header (pull_request) Successful in 27s

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.
This commit is contained in:
weakboson 2025-08-12 01:03:15 +08:00
parent 9634342100
commit 065a7e6866

View file

@ -1994,10 +1994,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,