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

Update conrod_wgpu's wgpu depencency to version 0.10 #1436

Merged
merged 4 commits into from
Sep 13, 2021

Conversation

mitchmindtree
Copy link
Contributor

@mitchmindtree mitchmindtree commented Sep 11, 2021

See the CHANGELOG here:

The GLSL and SPIR-V shaders have been removed in favour of using WGSL
shaders directly. This avoids the need for the new spirv feature and
dodges a little unnecessary bloat.

TODO

  • Currently this freezes at the end of the first RedrawRequest
    event - need to work out what's going on here. See the stacktrace below.
  • Clean up the new WGSL shaders. Currently, these are the direct
    output from naga-cli converting the original glsl shaders.

The following is the state of the program when frozen:

(gdb) backtrace
#0  0x00007ffff7d1fb07 in ioctl () from /nix/store/gk42f59363p82rg2wv2mfy71jn5w4q4c-glibc-2.32-48/lib/libc.so.6
#1  0x00007fffe2a956c0 in anv_gem_syncobj_timeline_wait ()
   from /nix/store/85hbpjblyvgg9k9vvirqk69r8qb1k5dl-mesa-21.1.4-drivers/lib/libvulkan_intel.so
#2  0x00007fffe2ad2d19 in anv_QueuePresentKHR ()
   from /nix/store/85hbpjblyvgg9k9vvirqk69r8qb1k5dl-mesa-21.1.4-drivers/lib/libvulkan_intel.so
#3  0x0000555555feed00 in ash::vk::extensions::KhrSwapchainFn::queue_present_khr (self=0x55555710f280, queue=...,
    p_present_info=0x7ffffffe6f60)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.33.3+1.2.191/src/vk/extensions.rs:566
#4  0x0000555555fe2acd in ash::extensions::khr::swapchain::Swapchain::queue_present (self=0x55555710f278, queue=...,
    create_info=0x7ffffffe6f60)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.33.3+1.2.191/src/extensions/khr/swapchain.rs:91
#5  0x0000555555eeceac in wgpu_hal::vulkan::{{impl}}::present (self=0x55555710f270, surface=0x555556e2e840,
    texture=...)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-hal-0.10.4/src/vulkan/mod.rs:531
#6  0x0000555555b474e7 in wgpu_core::hub::Global<wgpu_core::hub::IdentityManagerFactory>::surface_present<wgpu_core::hub::IdentityManagerFactory,wgpu_hal::vulkan::Api> (self=0x555556e29640, surface_id=...)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-core-0.10.2/src/present.rs:243
#7  0x0000555555c3169b in wgpu::backend::direct::{{impl}}::surface_present (self=0x555556e29640,
    texture=0x7ffffffe8040, detail=0x7ffffffe8058)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.10.1/src/backend/direct.rs:929
#8  0x0000555555cac720 in wgpu::{{impl}}::drop (self=0x7ffffffe8038)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.10.1/src/lib.rs:3069
#9  0x0000555555c600e7 in core::ptr::drop_in_place<wgpu::SurfaceTexture> ()
    at /nix/store/r218w4jqf2yl6whglfpq0kz61yjn1jhz-rust-default-1.53.0/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:192
#10 0x0000555555767f8b in core::ptr::drop_in_place<wgpu::SurfaceFrame> ()
    at /nix/store/r218w4jqf2yl6whglfpq0kz61yjn1jhz-rust-default-1.53.0/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:192
#11 0x0000555555772f31 in all_winit_wgpu::main::{{closure}} (event=..., control_flow=0x7ffffffe8b40)
    at backends/conrod_wgpu/examples/all_winit_wgpu.rs:266
#12 0x00005555557b921e in winit::platform_impl::platform::sticky_exit_callback<(),closure-0> (evt=...,
    target=0x555556d86970, control_flow=0x7ffffffe8b40, callback=0x7ffffffe9338)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/mod.rs:746
#13 0x000055555578ec84 in winit::platform_impl::platform::x11::EventLoop<()>::run_return<(),closure-0> (
    self=0x7ffffffe9ef0, callback=...)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/x11/mod.rs:307
#14 0x000055555578fbf3 in winit::platform_impl::platform::x11::EventLoop<()>::run<(),closure-0> (self=...,
    callback=...)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/x11/mod.rs:385
#15 0x00005555557b9086 in winit::platform_impl::platform::EventLoop<()>::run<(),closure-0> (self=..., callback=...)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/platform_impl/linux/mod.rs:662
#16 0x0000555555780fac in winit::event_loop::EventLoop<()>::run<(),closure-0> (self=..., event_handler=...)
    at /home/mindtree/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.25.0/src/event_loop.rs:154
#17 0x00005555557718ae in all_winit_wgpu::main () at backends/conrod_wgpu/examples/all_winit_wgpu.rs:111

See the CHANGELOG here:

- https://github.com/gfx-rs/wgpu/blob/master/CHANGELOG.md#v010-2021-08-18

The GLSL and SPIR-V shaders have been removed in favour of using WGSL
shaders directly. This avoids the need for the new `spirv` feature and
dodges a little unnecessary bloat.

TODO
----

- [ ] Currently this freezes at the end of the first `RedrawRequest`
  event - need to work out what's going on here.
- [ ] Clean up the new WGSL shaders. Currently, these are the direct
  output from `naga-cli` converting the original glsl shaders.
@kvark mentioned the issue might have something to do with submitting
more than sa single command buffer per frame. Sure enough, before the
event loop begins (and in turn before the first frame) we were
submitting a separate command buffer with the intention of writing the
rust_logo texture. However after looking a bit closer, we never actually
submitted any commands to achieve this, as the `queue.write_texture`
method takes care of this already. I wonder if this command encoder
submission was left over from a pre-`queue.write_texture` time? Either
way, the issue seems to be solved now!
@mitchmindtree mitchmindtree merged commit 782d947 into PistonDevelopers:master Sep 13, 2021
mitchmindtree added a commit to mitchmindtree/conrod that referenced this pull request Oct 4, 2021
Includes:

- Update to `conrod_wgpu` for `wgpu` `0.10.0` PistonDevelopers#1436
- Fix scizzor behaviour PistonDevelopers#1437
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant