From 151dd86f9480ac7f230a9e0f796e098575c722d9 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Mon, 26 Oct 2020 22:28:55 +0800 Subject: [PATCH] use max Swapchain format. --- src/RenderDevice/VKDeviceAttribute.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/RenderDevice/VKDeviceAttribute.cpp b/src/RenderDevice/VKDeviceAttribute.cpp index e7cc9c54..9ecc2e61 100644 --- a/src/RenderDevice/VKDeviceAttribute.cpp +++ b/src/RenderDevice/VKDeviceAttribute.cpp @@ -88,7 +88,17 @@ void GPUDeviceAttribute::Refresh() if (format_count == 1 && sf->format == VK_FORMAT_UNDEFINED) format = VK_FORMAT_B8G8R8A8_UNORM; else - format = sf->format; + { + format=VK_FORMAT_UNDEFINED; + + for(int i=0;iformat>format) + format=sf->format; + + ++sf; + } + } } } }