This PR removes optional backend features in favor of run-time
selection at the `request_adapter` entry point. Adapters from all
supported gpu backends on the platform are reported.
It also makes gfx-rs dependency to be public (for now).
This change merges `Id` with `GenericId` and abstracts away its contents, exposing itself as just u64. This will allow us to encode the backend type into it, in addition to index and epoch.
It also refactors `TypedId` to have a single function extracting all the fields, since this is how it's used all the times anyway.
307: Add cubemap hint to multiple of 6 layers textures r=kvark a=LaylConway
This is an attempt at addressing #306. Vulkan has specific requirements on what can and can't be marked with the CUBE hint.
Co-authored-by: Layl <2385329-layl@users.noreply.gitlab.com>
71: Use `HasRawWindowHandle` in `create_surface` r=kvark a=hecrj
This change lets users use `wgpu` without listing `raw-window-handle` as a direct dependency themselves.
Co-authored-by: Héctor Ramón Jiménez <hector0193@gmail.com>
70: Wholesome update for wgpu-0.3 r=everyone a=kvark
~~This update is a little more opinionated, i.e. the BGL creation just accepts a slice of things instead of a descriptor. I believe the reason for descriptors in the upstream API is mostly techincal - it's more convenient to generate bindings in Googles giant codegen. Following it verbatim doesn't appear to be strictly necessary, especially if we can extract better usability from Rust features.~~
The change also disables "gl" feature for the release. We'll re-enable it once we can provide it nicely, it will not be a breaking change.
I also noticed that barriers are not working correctly on the mipmap example. Will investigate separately - the native part is already published anyway. Edit: fixed by https://github.com/gfx-rs/wgpu/pull/302
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
302: Fixed pipeline barriers that are not transitions r=grovesNL a=kvark
The actual fix is a one-liner: `u.start != u.end` bit in `PendingTransition::record`. The case is relatively new - as of #281, which I haven't tested extensively.
The PR also improves our logging for further assistance with similar issues... but the most annoying piece is that I would find this much much earlier if I didn't ignore the result here: `let _ = state.change(...)`. Let it be the lesson to all of us :)
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
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>
297: Update rendy-memory and rendy-descriptor to 0.4 from crates.io r=kvark a=yanchith
I also locally tested for regressions in `wgpu-rs` on the metal backend (only have macOS today) and the examples seemed ok.
Co-authored-by: yanchith <yanchi.toth@gmail.com>
69: Prevent possible double panic in Drop impls r=kvark a=yanchith
Drop impls for `SwapChainOutput`, `RenderPass` and `ComputePass` now only
call out to `wgn` if not `thread::panicking()`.
Fixes#50
Co-authored-by: yanchith <yanchi.toth@gmail.com>
67: Update to latest wgpu-native commit r=kvark a=rukai
closes https://github.com/gfx-rs/wgpu-rs/issues/66
Make sure my documentation for sample_mask and alpha_to_coverage_enabled is correct, I am not familiar with these fields.
Co-authored-by: Rukai <rubickent@gmail.com>
285: Update API according to the upstream spec r=grovesNL a=kvark
Includes changes in texture view creation, enumeration mapping,
binding types, and more.
This would be a nice target for our 0.3 release.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>