From 3c2f72e0ef7bdc2c519a80cee104baa82272193a Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 23 Oct 2015 11:09:43 +0200 Subject: [PATCH] For now, set image view channel swizzle to match BGRA formats * This should go away soon as there's an identity swizzle coming --- renderdoc/driver/vulkan/vk_replay.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/renderdoc/driver/vulkan/vk_replay.cpp b/renderdoc/driver/vulkan/vk_replay.cpp index 0cb0c1a5e..18af58cce 100644 --- a/renderdoc/driver/vulkan/vk_replay.cpp +++ b/renderdoc/driver/vulkan/vk_replay.cpp @@ -688,6 +688,10 @@ bool VulkanReplay::RenderTextureInternal(TextureDisplay cfg, VkRenderPassBeginIn 0 }; + // temporary hack, this should change soon, but identity channel swizzle has to match channels + if(iminfo.format == VK_FORMAT_B8G8R8A8_UNORM || iminfo.format == VK_FORMAT_B8G8R8A8_SRGB) + std::swap(viewInfo.channels.r, viewInfo.channels.b); + VkResult vkr = ObjDisp(dev)->CreateImageView(Unwrap(dev), &viewInfo, &iminfo.view); RDCASSERT(vkr == VK_SUCCESS);