From b9df5bdf8cd670f4709ce306873c12f8e5c45870 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 23 Sep 2021 15:23:09 +0800 Subject: [PATCH] restore old codes. --- src/SceneGraph/Vulkan/VKDeviceAttribute.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SceneGraph/Vulkan/VKDeviceAttribute.cpp b/src/SceneGraph/Vulkan/VKDeviceAttribute.cpp index 20dfb22e..c7100cc8 100644 --- a/src/SceneGraph/Vulkan/VKDeviceAttribute.cpp +++ b/src/SceneGraph/Vulkan/VKDeviceAttribute.cpp @@ -87,7 +87,10 @@ void GPUDeviceAttribute::Refresh() { VkSurfaceFormatKHR *sf = surface_formats_list.GetData(); - if (format_count>1) + if (format_count == 1 && sf->format == VK_FORMAT_UNDEFINED) + { + } + else { surface_format.format=VK_FORMAT_UNDEFINED;