Skip to content

wgpu example fails with "Swap-chain error: Outdated" #721

@phoekz

Description

@phoekz
[2021-10-09T11:21:53Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0x7cd0911d)]
        Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x298c3aa6018, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (800,800), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (800,600), minImageExtent = (800,600), maxImageExtent = (800,600). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://vulkan.lunarg.com/doc/view/1.2.176.1/windows/1.2-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
[2021-10-09T11:21:53Z ERROR wgpu_hal::vulkan::instance]         objects: (type: DEVICE, hndl: 0x298c3aa6018, name: ?)

This happens on Windows 10. Changing the window sizes to 800,600 works though.

@@ -85,7 +85,7 @@ unsafe impl bytemuck::Pod for BgPoint {}
 unsafe impl bytemuck::Zeroable for BgPoint {}

 const DEFAULT_WINDOW_WIDTH: f32 = 800.0;
-const DEFAULT_WINDOW_HEIGHT: f32 = 800.0;
+const DEFAULT_WINDOW_HEIGHT: f32 = 600.0;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions