686: Move BufferSize to wgpu-types r=kvark a=kvark
This is required to be able to update wgpu-rs, since it uses `BufferSize` in the internal API for its backends.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
678: Make libx11 optional r=kvark a=parasyte
**Connections**
Fixes#676
**Description**
Make `libx11` optional with a new non-default feature. Default features need to go "to the edge". In its current state, a crate depending on `wgpu` cannot disable the `x11` feature on `gfx-backend-vulkan`.
- `wgpu` will be updated with a similar new feature, but will enable the `wgc/x11` feature by default. This should hopefully be backward compatible for any downstream user of `wgpu`.
- `wgpu-native` will also be given the same treatment.
**Testing**
This was tested with repro steps included in the linked ticket.
Co-authored-by: Jay Oster <jay@kodewerx.org>
667: Add asserts to validate that a resource exists when used r=kvark a=DavidPeicho
Hi,
As discussed in #610, this is mostly for C/C++ users. Some questions:
* Would it be possible to display the ID of the resource that failed? I don't know what you think about implementing the `Display` trait on the `Id` struct?
* Do you see other places needing for checks?
Thanks!
Co-authored-by: David Peicho <david.peicho@gmail.com>
668: Return failures to the user in swap_chain_get_next_texture, rather than transparently reconfiguring. r=kvark a=AlphaModder
TODO:
- [x] Change `Global::swap_chain_get_next_texture` in `wgpu-core`.
- [x] Update `wgpu_swap_chain_get_next_texture` in `wgpu-native`. (https://github.com/gfx-rs/wgpu-native/pull/32)
- [x] Wrap `SwapChainOutput`/`SwapChainStatus` in a nice enum in `wgpu-rs`. (https://github.com/gfx-rs/wgpu-rs/pull/323)
- [ ] Update `wgpu_bindings` (?)
Co-authored-by: AlphaModder <quasiflux@gmail.com>
* "Use the whole buffer" is !0, not 0
Fixes#654
Applies to BufferBinding, set_vertex_buffer, set_index_buffer
* Add BufferSize type alias
* Make BufferSize a transparent type
Add a custom serialization "buddy" type
Use BufferSize::WHOLE instead of crate::WHOLE_SIZE
* Move SerBufferSize into device::trace mod
Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
660: Fix possible out-of-bounds when trace log level enabled r=kvark a=yanchith
Also, even when there was no out-of-bounds access, the log statement talked
about an incorrect submission index.
Fixes https://github.com/gfx-rs/wgpu/issues/659
Co-authored-by: yanchith <yanchi.toth@gmail.com>
655: use unambigous ISO8601 format for dates r=kvark a=skierpage
06-04-2020 is in the future (June) for ~400 million people.
Oblig. XKCD https://xkcd.com/1179/😉
Co-authored-by: skierpage <info@skierpage.com>
653: Implement Queue::write_buffer r=nobody a=kvark
Implements https://github.com/gpuweb/gpuweb/pull/749
TODO:
- [x] handle a case where the buffer is dropped while there is a pending write. Edit: we bump the submission index on the buffer, so it will be kept alive.
- [x] properly free the temporary buffer and memory
- [x] properly destroy the pending command buffer on device drop
- [x] tweak the linear allocator settings - bumped to 16 megs
- [x] provide a patch to wgpu-rs and verify it works on the examples - https://github.com/gfx-rs/wgpu-rs/pull/307
- [x] provide a patch to wgpu-native - https://github.com/gfx-rs/wgpu-native/pull/25
- [x] check/fix the trace/replay support
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
306: Improve example friendliness: Don't busy-redraw in examples r=kvark a=khoek
Looking around for solid Rust graphics libraries, I was a bit shocked when the `wgpu-rs` examples made my whole X desktop environment in Ubuntu laggy---maximizing/minimizing other windows or moving any of them had very noticeable latency when an example was running.
This almost turned me off, but after playing around I found that this was just because of the
```rust
match event {
event::Event::MainEventsCleared => window.request_redraw(),
...
```
in all of the examples. Trying to add the least code possible I've replaced a `ControlFlow::Poll` with `ControlFlow::WaitUntil(...)` in the event loops and capped the redraws-per-second below 50, which completely solves this problem for me (plus the window resize response on the examples themselves are much improved, etc.).
I was just going for an unintrusive fix---this is by no means a perfect solution, but I think in the worst case it won't be any worse that what was there originally. Plus, I think it will make people like me who try to start by copying an example more likely to stick around in the short term.
Co-authored-by: Keeley Hoek <keeley@hoek.io>
- Clean up after the pending writes on destroy.
- Fix temporary buffer creation.
- Fix internal thread initialization by the command allocator.
- Clean up player event_loop usage.
302: Add BufferRange struct for #199 r=kvark a=paulkernfeld
- Use in set_index_buffer
- Use in set_vertex_buffer
- Use in BindingResource
Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>