Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vulkan: master branch 'quad' example crashes while resizing the window #1780

Closed
ccll opened this issue Jan 31, 2018 · 4 comments
Closed

vulkan: master branch 'quad' example crashes while resizing the window #1780

ccll opened this issue Jan 31, 2018 · 4 comments

Comments

@ccll
Copy link

ccll commented Jan 31, 2018

Short info header:
'quad' example crashes with an error 'Unable to acquire a swapchain image: ErrorOutOfDateKhr' while resizing the window.

  • GFX version: master branch - 48b3ef4
  • OS: Ubuntu 17.10
  • GPU: Intel(R) HD Graphics 530 (Skylake GT2)
  • Backtrace:
AdapterInfo { name: "Intel(R) HD Graphics 530 (Skylake GT2)", vendor: 32902, device: 6418, software_rendering: false }
Surface format: Bgra8Srgb
Pipelines: [Ok(GraphicsPipeline(0x7f5a0132ae00))]
Memory types: [MemoryType { properties: DEVICE_LOCAL | COHERENT | CPU_VISIBLE | CPU_CACHED, heap_index: 0 }, MemoryType { properties: DEVICE_LOCAL | COHERENT | CPU_VISIBLE | CPU_CACHED, heap_index: 1 }]
thread 'main' panicked at 'Unable to acquire a swapchain image: ErrorOutOfDateKhr', /checkout/src/libcore/result.rs:906:4
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:68
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:57
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:397
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:577
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:538
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:522
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:498
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:71
   9: core::result::unwrap_failed
             at /checkout/src/libcore/macros.rs:23
  10: <core::result::Result<T, E>>::expect
             at /checkout/src/libcore/result.rs:799
  11: <gfx_backend_vulkan::window::Swapchain as gfx_hal::window::Swapchain<gfx_backend_vulkan::Backend>>::acquire_frame
             at /home/ccll/proj/gfx/src/backend/vulkan/src/window.rs:383
  12: quad::main
             at quad/main.rs:528
  13: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:101
  14: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:459
             at /checkout/src/libstd/panic.rs:365
             at /checkout/src/libstd/rt.rs:58
  15: main
  16: __libc_start_main
  17: _start
@kvark
Copy link
Member

kvark commented Jan 31, 2018

Thank you for submitting the issue!
We haven't got our hands on proper resizing in the examples yet.

@mpalomas
Copy link

mpalomas commented Apr 25, 2018

Hi,

Same here on Windows 10 Pro, NVIDIA GTX 1050 drivers 391.35.

On gfx master @29d30a1

I'm talking about the Vulkan renderer, it seems D3D12 handles resizing properly.

Finished dev [unoptimized + debuginfo] target(s) in 0.36 secs RunningC:\dev\rust\gfx\target\debug\quad.exeAdapterInfo { name: "GeForce GTX 1050", vendor: 4318, device: 7309, software_rendering: false } Surface format: Bgra8Srgb Memory types: [MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: DEVICE_LOCAL, heap_index: 0 }, MemoryType { properties: DEVICE_LOCAL, heap_index: 0 }, MemoryType { properties: COHERENT | CPU_VISIBLE, heap_index: 1 }, MemoryType { properties: COHERENT | CPU_VISIBLE | CPU_CACHED, heap_index: 1 }] thread 'main' panicked at 'assertion failed:(left == right)left:Success, right: ErrorOutOfDateKhr', src\backend\vulkan\src\lib.rs:731:9 stack backtrace: 0: std::sys::windows::backtrace::unwind_backtrace at C:\projects\rust\src\libstd\sys\windows\backtrace\mod.rs:65 1: std::sys_common::backtrace::_print at C:\projects\rust\src\libstd\sys_common\backtrace.rs:71 2: std::sys_common::backtrace::print at C:\projects\rust\src\libstd\sys_common\backtrace.rs:59 3: std::panicking::default_hook::{{closure}} at C:\projects\rust\src\libstd\panicking.rs:205 4: std::panicking::default_hook at C:\projects\rust\src\libstd\panicking.rs:221 5: std::panicking::rust_panic_with_hook at C:\projects\rust\src\libstd\panicking.rs:457 6: std::panicking::begin_panic_fmt at C:\projects\rust\src\libstd\panicking.rs:344 7: gfx_backend_vulkan::{{impl}}::present<core::option::Option<mut gfx_backend_vulkan::window::Swapchain*>,[gfx_backend_vulkan::native::Semaphore; 0]*> at \<panic macros>:8 8: gfx_hal::queue::CommandQueue<gfx_backend_vulkan::Backend, gfx_hal::queue::capability::Graphics>::present<gfx_backend_vulkan::Backend,gfx_hal::queue::capability::Graphics,core::option::Option<mut gfx_backend_vulkan::window::Swapchain*>,[gfx_backend_vulkan::native::Semaphore; 0]*> at C:\dev\rust\gfx\src\hal\src\queue\mod.rs:113 9: gfx_hal::window::Swapchain::present<gfx_backend_vulkan::window::Swapchain,gfx_backend_vulkan::Backend,gfx_hal::queue::capability::Graphics,[gfx_backend_vulkan::native::Semaphore; 0]*> at C:\dev\rust\gfx\src\hal\src\window.rs:330 10: quad::main at .\quad\main.rs:582

Your project sounds great, but it lacks documentation. Therefore we use code example to figure out, and having basic window resizing would really help!

Thanks!

@kvark
Copy link
Member

kvark commented Apr 26, 2018

Should be addressed by #1856, but it got stale, unfortunately.

bors bot added a commit that referenced this issue Jun 10, 2018
2052: Swapchain resize support r=kvark a=ZeGentzy

Continuation of #1856 
When complete, this pull request will solve issues #1961, #1780 and #1854

Todo:
 - [x] Make quad example use resize

PR checklist:
- [x] `make` succeeds (on *nix)
- [x] `make reftests` succeeds
- [x] tested examples with the following backends: vulkan and gl (both tested on ArchLinux)

Co-authored-by: Hal Gentz <zegentzy@protonmail.com>
@JohnDoneth
Copy link

It should be possible to close this issue due to resizing support in #2052 being merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants