42: Remove glfw submodule r=nobody a=grovesNL
Fixes#41
I temporarily added a glfw submodule as part of #40 but it looks like it was mistakenly added as part of #39
Co-authored-by: Joshua Groves <josh@joshgroves.com>
39: Remove generic and option from render pass descriptor r=kvark a=grovesNL
- Temporarily lock cbindgen to known working revision until a new version is published
- Remove generic and `Option` from `RenderPassDescriptor`, map between wgpu/wgpu-native types like other descriptors, and add a missing length field (this appears necessary to generate bindings)
- Regenerate bindings (using `a7be40c65 2018-12-26`, earlier versions should work too)
- Remove `+nightly` for bindings generation from Makefile, because newer nightlies won't work at the moment
- Fix typo in Makefile `clean`
Co-authored-by: Joshua Groves <josh@joshgroves.com>
34: Basic windowing and presentation r=grovesNL a=kvark
- [x] native swapchain creation
- [x] native use of frames and presentation
- [x] native semaphore waits
- [x] rust wrapping
- [x] working examples
~~I may or may not bite the bullet and update gfx-rs here. Probably not :)~~
## Architecture
There is a bit of complexity here to manage all the synchronization and lifetimes properly. Essentially, presentation is exposed in Vulkan/gfx-rs as a separate hidden queue, so we inevitably run into the territory of using semaphores for synchronization, where previously we could ignore them for workloads on a single queue.
A swapchain has a fixed (at creation) number of frames, each represented by a texture plus view pair. When `get_next_texture` is called we acquire the next image index and return this pair. We wait for the associated fence to make sure the frame is no image used. We then associate a semaphore with this index for image availability.
The texture has extra information to link back to an image of the swapchain (which is `None` for regular textures). Whenever it's used, the command buffer collects that link to be used on submission, where it's just resolved to a semaphore that we wait on actual submission.
Presenting on a swapchain creates a temporary command buffer that we only use for transiting the swapchain image into presentable state. This small submission is useful for establishing a "ready" semaphore as well as a fence (waited in `get_next_image`). The "ready" semaphore is used immediately for native `present` call.
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
35: Update to current version of gfx-hal r=kvark a=porky11
I'll also push the transition to rust 2018 and some cleanup soon
Co-authored-by: porky11 <krapohl.f@gmx.de>
32: Improve locking safety for Registry r=grovesNL a=kvark
This isn't ideal: we shouldn't be mutably locking anything for adding/removing objects in `local` path. But at least it makes it safe, for now.
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
28: Dependencies/makefile update r=kvark a=grovesNL
- Update gfx and add `unwrap`s for now
- Because we're not actively the allocator yet, disable rendy-memory temporarily (until the latest gfx-hal feature is merged and we can start bumping its commit number)
- Use git dependency for cbindgen until the bitflags changes are ready
- Disable C examples in root Makefile until wgpu.h generation is complete
Co-authored-by: Joshua Groves <josh@joshgroves.com>