EmbarkStudios / kajiya

💡 Experimental real-time global illumination renderer 🦀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion error on present index under wayland.

halli2 opened this issue · comments

Describe the bug
Panics on assertion about present index and next semaphore value when running under wayland.

To Reproduce
Under wayland run:
cargo r --bin view --release --no-default-features -- --scene mini_battle --width 1920 --height 1080 --no-debug

Expected behavior
No panic.

Device:

  • Linux - Fedora
  • Running under wayland
  • AMD RADV - Mesa 22.0.3

Additional context
Error message:

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `3`', crates/lib/kajiya-backend/src/vulkan/swapchain.rs:242:17

If I remove the assertion it runs as expected.

I tried logging the values and most of the time it seems to loop around from index 2 instead of 3 as expected.

[2022-06-08 19:18:30][kajiya_backend::vulkan::swapchain][INFO] Present Index: 0 Next Semaphore Value: 0
[2022-06-08 19:18:30][kajiya_backend::vulkan::swapchain][INFO] Present Index: 1 Next Semaphore Value: 1
[2022-06-08 19:18:30][kajiya_backend::vulkan::swapchain][INFO] Present Index: 2 Next Semaphore Value: 2
[2022-06-08 19:18:30][kajiya_backend::vulkan::swapchain][INFO] Present Index: 3 Next Semaphore Value: 3
[2022-06-08 19:18:30][kajiya_backend::vulkan::swapchain][INFO] Present Index: 0 Next Semaphore Value: 0
[2022-06-08 19:18:31][kajiya_backend::vulkan::swapchain][INFO] Present Index: 1 Next Semaphore Value: 1
[2022-06-08 19:18:31][kajiya_backend::vulkan::swapchain][INFO] Present Index: 2 Next Semaphore Value: 2
[2022-06-08 19:18:31][kajiya_backend::vulkan::swapchain][INFO] Present Index: 0 Next Semaphore Value: 3
[2022-06-08 19:18:31][kajiya_backend::vulkan::swapchain][INFO] Present Index: 1 Next Semaphore Value: 0
[2022-06-08 19:18:31][kajiya_backend::vulkan::swapchain][INFO] Present Index: 2 Next Semaphore Value: 1
[2022-06-08 19:18:31][kajiya_backend::vulkan::swapchain][INFO] Present Index: 0 Next Semaphore Value: 2