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

Rendy integration #197

Merged
merged 2 commits into from May 31, 2019

Conversation

@kvark
Copy link
Member

commented May 29, 2019

Integrates with rendy-memory and rendy-descriptor.
Includes #195
Fixes #111

@kvark kvark requested a review from grovesNL May 29, 2019

@rukai

This comment has been minimized.

Copy link
Contributor

commented May 29, 2019

The repro in #181 now works!

However I'm getting this panic in my project, I'll try and create a repro.

thread 'main' panicked at 'key not present', src/libcore/option.rs:1036:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:381
   6: rust_begin_unwind
             at src/libstd/panicking.rs:308
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::option::expect_failed
             at src/libcore/option.rs:1036
   9: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
  10: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  11: wgpu_native::device::Device<gfx_backend_vulkan::Backend>::maintain
  12: wgpu_queue_submit
  13: brawllib_rs::renderer::render_gif
  14: rukaidata_website::gif::generate
  15: rukaidata_website::main
  16: std::rt::lang_start::{{closure}}
  17: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:293
  18: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:85
  19: std::rt::lang_start_internal
             at src/libstd/panicking.rs:272
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  20: main
  21: __libc_start_main
  22: _start
Illegal instruction (core dumped)
@rukai

This comment has been minimized.

Copy link
Contributor

commented May 29, 2019

Repro here: https://github.com/rukai/wgpu-rs/blob/rendy_descriptor_bug/examples/repro/main.rs
Its very similar to the repro in #181

I just replaced state.device.get_queue().submit(&[]); with device.poll() and added command_encoder.copy_texture_to_buffer(framebuffer_copy_view, framebuffer_out_copy_view, texture_extent);

@kvark kvark force-pushed the kvark:rendy branch from 2c777df to 5f4f610 May 29, 2019

@kvark

This comment has been minimized.

Copy link
Member Author

commented May 29, 2019

@rukai thank you for another great test case! I don't think it's particularly related to the PR, but the fix is also included now both in this and the base PRs.

@rukai

This comment has been minimized.

Copy link
Contributor

commented May 29, 2019

Yep that fixes it! ... I think that fixes all my problems for real this time.

@kvark

This comment has been minimized.

Copy link
Member Author

commented May 30, 2019

@omni-viral something is weird about STORAGE descriptors. I'm getting the following error in an app:

ERROR 2019-05-30T03:12:06Z: gfx_backend_vulkan:
VALIDATION [VUID-VkDescriptorSetAllocateInfo-descriptorPool-00307 (0)] : Unable to allocate 1 descriptors of type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE from pool 0x2. This pool only has 0 descriptors of this type remaining. The Vulkan spec states: descriptorPool must have enough free descriptor capacity remaining to allocate the descriptor sets of the specified layouts (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-descriptorPool-00307)
object info: (type: DESCRIPTOR_POOL, hndl: 2)

Given that the descriptor pool is now managed by rendy-descriptor, it would happen when I either incorrectly provide the descriptor set layout bindings, or there is bug in rendy-descriptor.

nvm, I was somehow using an old wgpu-native, confusing the development environment on a different machine.

@kvark kvark force-pushed the kvark:rendy branch from 5f4f610 to 2f8e618 May 30, 2019

@kvark kvark force-pushed the kvark:rendy branch from 2f8e618 to 9c408f9 May 30, 2019

@kvark kvark changed the title Rendy descriptor manager Rendy integration May 30, 2019

@kvark kvark force-pushed the kvark:rendy branch from 9a43cdf to 351432a May 30, 2019

@grovesNL
Copy link
Member

left a comment

Looks great to me!

I have no idea whether all of the tuning variables for heaps are reasonable but I guess we should start somewhere :)

@kvark

This comment has been minimized.

Copy link
Member Author

commented May 31, 2019

bors bot added a commit that referenced this pull request May 31, 2019

Merge #197
197: Rendy integration r=grovesNL a=kvark

Integrates with rendy-memory and rendy-descriptor.
~~Includes #195~~
Fixes #111 

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
@bors

This comment has been minimized.

Copy link
Contributor

commented May 31, 2019

@bors bors bot merged commit 351432a into gfx-rs:master May 31, 2019

2 checks passed

bors Build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@kvark kvark deleted the kvark:rendy branch May 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.