Vulkan: Don't use explicit swizzle channels when not needed

This commit is contained in:
Henrik Rydgård committed 2024-04-04 15:47:39 +02:00
1 parent 4ea58b64d4
commit eae0504627
3 files changed
+7 -5

No files matched your search

+2
View File
@@ -193,6 +193,8 @@ void VKRFramebuffer::CreateImage(VulkanContext *vulkan, VulkanBarrierBatch *barr
VkResult res = vmaCreateImage(vulkan->Allocator(), &ici, &allocCreateInfo, &img.image, &img.alloc, &allocInfo);
_dbg_assert_(res == VK_SUCCESS);
vulkan->SetDebugName(img.image, VK_OBJECT_TYPE_IMAGE, tag);
VkImageAspectFlags aspects = color ? VK_IMAGE_ASPECT_COLOR_BIT : (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT);
VkImageViewCreateInfo ivci{ VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO };