Update image_view.cpp

[Render.Vulkan] <Error> image_view.cpp:ImageViewInfo:109: Storage image (num_comps = 4) requires swizzling [BGRA]
format 43 dst_sel 3886
This commit is contained in:
DanielSvoboda 2024-08-13 21:09:17 -03:00 committed by GitHub
parent 808bc7a542
commit 5520457302
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,6 +58,9 @@ vk::Format TrySwizzleFormat(vk::Format format, u32 dst_sel) {
if (format == vk::Format::eR8G8B8A8Unorm && dst_sel == 0b111100101110) {
return vk::Format::eB8G8R8A8Unorm;
}
if (format == vk::Format::eR8G8B8A8Srgb && dst_sel == 0b111100101110) {
return vk::Format::eB8G8R8A8Srgb;
}
return format;
}