299: Rename buffer to encoder in wgpu_command_buffer_copy_* functions r=kvark a=yanchith
This also regenerates `wgpu.h` and updates uses of `wgpu_command_buffer_copy_buffer_to_buffer` in `compute/main.c`.
EDIT: all good...
~Note that I couldn't regenerate `wgpu-remote.h` because of the following cbindgen error:~
```
ERROR: Cannot find a mangling for generic path GenericPath { path: Path { name: "Adapter" }, export_name: "Adapter", generics: [Path(GenericPath { path: Path { name: "Backend" }, export_name: "Backend", generics: [], ctype: None })], ctype: None }. This usually means that a type referenced by this generic was incompatible or not found.
```
Should we investigate before merging? Maybe I am just using an unlucky nightly?
Closes: #250
Co-authored-by: yanchith <yanchi.toth@gmail.com>
Disable vsync
Revert accidential hardcode of num_frames
Make the PresentMode configurable
Adapt examples
+ adjust style according to @kvrak
Adher to @kvarks wishes for style.
Examples build.
Fix unnecessary ampersand.
With gfx-hal 0.2.1 and the various backend releases on 2019-06-28, all
of the gfx-hal types that wgpu depends on implement Debug. Thus, some
types that could not derive Debug in #216 can now derive Debug.
This patch also adds Debug implementations for a few types that were
recently added to wgpu.
Fixes#76.
226: Tracking Rewrite r=grovesNL a=kvark
Fixes#44
The idea is to support independent tracking of sub-resources. Today, this is needed for textures, which can have individual layers and mipmap levels in different states at a time. Tomorrow, this will be needed for buffer sub-ranges.
The intent to hack it in grew into a complete rewrite of the tracker... The new approach is cleaner in a few places (e.g. `TrackPermit` is gone), but the implementation is obviously more complex. I tried to separate the levels from each other (see `ResourceState` and `RangedStates`) to fight complexity, but it requires a whole lot of testing infrastructure to be solid.
Also regresses #216 a bit, cc @arashikou : tracker is a relatively complex structure. I somehow doubt it's useful to look at it in debug spew. We may need to implement `Debug` manually for it before re-adding `Debug` derives on passes and command buffers.
TODO:
- [x] documentation of tracking types
- [x] unit tests for tracking logic
- [x] actual testing with existing apps, ensure no regressions
- [x] write a mipmap generation example
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>