Open jfrimmel opened 3 years ago
That might be a bug in wgpu itself. I wasn't able to get it to hang on my end. I did get it to display some validation errors. I'll posted those below, but you should probably file and issue on the wgpu repo itself. Be sure to mention this issue too!
2021-09-15T15:40:46Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0x7cd0911d)]
Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x55760e7f7a60, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (490,699), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (1060,524), minImageExtent = (1060,524), maxImageExtent = (1060,524). 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.189.0/linux/1.2-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
[2021-09-15T15:40:46Z ERROR wgpu_hal::vulkan::instance] objects: (type: DEVICE, hndl: 0x55760e7f7a60, name: ?)
[2021-09-15T15:40:46Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0x7cd0911d)]
Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x55760e7f7a60, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (534,687), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (1060,524), minImageExtent = (1060,524), maxImageExtent = (1060,524). 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.189.0/linux/1.2-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
[2021-09-15T15:40:46Z ERROR wgpu_hal::vulkan::instance] objects: (type: DEVICE, hndl: 0x55760e7f7a60, name: ?)
[2021-09-15T15:40:46Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0x7cd0911d)]
Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x55760e7f7a60, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (974,539), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (1060,524), minImageExtent = (1060,524), maxImageExtent = (1060,524). 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.189.0/linux/1.2-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
[2021-09-15T15:40:46Z ERROR wgpu_hal::vulkan::instance] objects: (type: DEVICE, hndl: 0x55760e7f7a60, name: ?)
Thanks for your reply. I've opened the upstream issue: https://github.com/gfx-rs/wgpu/issues/1971.
I've got the same validation layer errors as well and opened https://github.com/gfx-rs/wgpu/issues/1958 for it.
Any updates on this?
No, unfortunately not. I doubt anything in this area will happen soon. I can reproduce the error fairly often, but cannot find the source.
Hello, first of all: thank you for this great learning resource!
I have a problem when running the example code of these tutorials. I've recorded a GIF demonstrating the issue: As you can see, the example works, but after some resizing (amount varies between runs), the code reproducible hangs and won't update the window anymore. I've tested the tutorial2-code with the latest commit (as seen in the GIF) and the tutoral8-code as well (both show that behavior).
I've attached a
gdb
to the hanging process and it seems, like it is always hanging inDisplatchQueuePresentKHR
:gdb backtrace
``` (gdb) bt #0 0x00007fb57d54c59b in ioctl () from /usr/lib/libc.so.6 #1 0x00007fb57c5755f4 in ?? () from /usr/lib/libvulkan_intel.so #2 0x00007fb57b16bea4 in DispatchQueuePresentKHR (queue=0x557ad4b15600, pPresentInfo=0x7ffcd3c5d210) at /build/vulkan-validation-layers/src/Vulkan-ValidationLayers-1.2.190/layers/generated/layer_chassis_dispatch.cpp:468 #3 0x00007fb57b0debcc in vulkan_layer_chassis::QueuePresentKHR (queue=0x557ad4b15600, pPresentInfo=0x7ffcd3c5d210) at /build/vulkan-validation-layers/src/Vulkan-ValidationLayers-1.2.190/layers/generated/chassis.cpp:4880 #4 0x0000557ad2aca6d0 in ash::vk::extensions::KhrSwapchainFn::queue_present_khr (self=0x557ad4b1a260, queue=..., p_present_info=0x7ffcd3c5d210) at /home/jfrimmel/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.33.3+1.2.191/src/vk/extensions.rs:566 #5 0x0000557ad2abe56d in ash::extensions::khr::swapchain::Swapchain::queue_present (self=0x557ad4b1a258, queue=..., create_info=0x7ffcd3c5d210) at /home/jfrimmel/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.33.3+1.2.191/src/extensions/khr/swapchain.rs:91 #6 0x0000557ad2a2be55 in wgpu_hal::vulkan::{impl#8}::present (self=0x557ad4b1a250, surface=0x557ad4ac2920, texture=...) at /home/jfrimmel/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-hal-0.10.4/src/vulkan/mod.rs:531 #7 0x0000557ad27a5dda in wgpu_core::hub::GlobalIs this related to the interaction between
winit
<->wgpu
or might this be a bug inwgpu
itself? If so, should I post an issue there instead?I'm happy to provide more information if needed.
System specs and versions
- x86_64-based Laptop with internal Intel graphics card - Linux (Arch Linux 5.13.13-arch1-1) - X11 as display server, no wayland installed - Vulkan as backend - Rust 1.55 (rustc 1.55.0 (c8dfcfe04 2021-09-06))