Преглед изворни кода

vulkan: Fix assert if only one surface format is supported

rdb пре 2 година
родитељ
комит
45b5d406ec
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      panda/src/vulkandisplay/vulkanGraphicsWindow.cxx

+ 3 - 2
panda/src/vulkandisplay/vulkanGraphicsWindow.cxx

@@ -537,9 +537,10 @@ open_window() {
       _surface_format.format = VK_FORMAT_B8G8R8A8_UNORM;
     }
     _surface_format.colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
-  } else {
+  }
+  else {
     // Find a format that meets the requirements.
-    nassertr(num_formats > 1, false);
+    nassertr(num_formats > 0, false);
     _surface_format = formats[0];
 
     if (_fb_properties.get_srgb_color()) {