(I'm also using iced_wgpu).
Once again, I am baffled by how to read/debug this. Here is the error msg:
init: got size: PhysicalSize { width: 800, height: 600 }
[2023-04-13T20:49:14Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0x7cd0911d)]
Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x55d96719d980, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (800,600), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (3834,2119), minImageExtent = (3834,2119), maxImageExtent = (3834,2119). 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://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
[2023-04-13T20:49:14Z ERROR wgpu_hal::vulkan::instance] objects: (type: DEVICE, hndl: 0x55d96719d980, name: ?)
window size: PhysicalSize { width: 800, height: 600 }
*** resize: PhysicalSize { width: 800, height: 600 }
*** resize: PhysicalSize { width: 800, height: 600 }
*** resize: PhysicalSize { width: 3834, height: 2119 }
[2023-04-13T20:49:14Z ERROR wgpu::backend::direct] Handling wgpu errors as fatal by default
thread 'main' panicked at 'wgpu error: Validation Error
Caused by:
In a RenderPass
note: encoder = `<CommandBuffer-(7, 1, Vulkan)>`
In a pass parameter
note: command buffer = `<CommandBuffer-(7, 1, Vulkan)>`
attachments have differing sizes: ("color", Extent3d { width: 3834, height: 2119, depth_or_array_layers: 1 }) is followed by ("resolve", Extent3d { width: 800, height: 600, depth_or_array_layers: 1 })
My screen size is not 800x600, it's 3840 x 2160, and apparently after accounting for decorationns, becomes 3834 x 2119.
Here is everything I don't understand:
Question 1
What is triggering
[2023-04-13T20:49:14Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0x7cd0911d)]
Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x55d96719d980, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (800,600), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (3834,2119), minImageExtent = (3834,2119), maxImageExtent = (3834,2119). 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://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
It seems like we are already off to a bad start. How can I get a stack trace for that? Even if it's non-fatal (as in program continues running), I want to fix it anyway.
Question 2
*** resize: PhysicalSize { width: 800, height: 600 }
*** resize: PhysicalSize { width: 3834, height: 2119 }
[2023-04-13T20:49:14Z ERROR wgpu::backend::direct] Handling wgpu errors as fatal by default
thread 'main' panicked at 'wgpu error: Validation Error
Caused by:
In a RenderPass
note: encoder = `<CommandBuffer-(7, 1, Vulkan)>`
In a pass parameter
note: command buffer = `<CommandBuffer-(7, 1, Vulkan)>`
attachments have differing sizes: ("color", Extent3d { width: 3834, height: 2119, depth_or_array_layers: 1 }) is followed by ("resolve", Extent3d { width: 800, height: 600, depth_or_array_layers: 1 })
It app;ears, during this process, after a resize from 800x600 to 3834 to 2119, some attachments are correctly resized; others are not. I am tryin gto figure out where this happens: I grepped for '"color"' and '"resolve"' -- does not show up in my codebase, I'm trying to figure out where (rust lineof code) these attachments are defined.
Question 3
How to figure out which Rust lines of code corresponds to:
In a RenderPass
note: encoder = `<CommandBuffer-(7, 1, Vulkan)>`
In a pass parameter
note: command buffer = `<CommandBuffer-(7, 1, Vulkan)>`
Thanks!