394: Get buffer sub data in wgpu-remote r=kvark a=kvark
Required for `mapReadAsync` implementation in Gecko.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
387: Stop dynamic offset iteration when the bind groups stop r=grovesNL a=kvark
Fixes#386
I imagine the code is not performance-optimal and could be improved. This PR focuses on correctness.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
385: Fix build for iOS r=kvark a=grenlight
```
Compiling wgpu-native v0.4.0 (https://github.com/gfx-rs/wgpu?rev=b51053dc2dc3bbe9b2ba050fde42eeb6405fe092#b51053dc)
error[E0422]: cannot find struct, variant or union type `Surface` in this scope
--> /Users/LiJinlei/.cargo/git/checkouts/wgpu-53e70f8674b08dd4/b51053d/wgpu-native/src/device.rs:24:24
|
24 | Rwh::IOS(h) => Surface {
| ^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
```
Co-authored-by: LiJinlei <grenlight@icloud.com>
382: Cleanup exports r=grovesNL a=kvark
This is a follow-up to #381 that cleans up the exports, such that `wgpu-core` doesn't deal with any raw C things.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
378: Support for merged depth-stencil states r=grovesNL a=kvark
Fixes#376
@Yatekii would you be able to test it and confirm the fix?
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
381: Separate Native from the Core r=grovesNL a=kvark
Fixes#379 (haven't figured out how to build remote static lib to test the example, but that's not as important at this stage, since we have Gecko).
Fixes#168
Related to #2 and #8
This is a major refactor that moves out the core Rust API into a separate crate. It also changes the export semantics of wgpu-core in a way that the modules are exposed, and all the functionality is now represented as methods of `Global`. The "local" feature is transformed into a type system as a generic parameter `<F>` on the hubs.
Pros:
- "local" feature is gone
- we can change the core API more often, this doesn't necessarily require the `native` breaking version bump, and it would be very handy when adding Gecko-related changes
- Gecko needs less stuff to compile (remote + core)
- no collision of library names (native with or without the local feature)
- less problem with crate types
- cleaner semantics: each crate is either C or Rust, but not both
Cons:
- more generics, I wouldn't be surprised this regresses the build times visibly
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
380: More licenses for Gecko r=kvark a=kvark
These are all the last things we need to match Gecko, with an exception of #379
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
375: Use callback for `request_adapter` r=kvark a=grovesNL
For now this is mostly a signature change which allows us to start using a callback for `request_adapter`. Once we have an event loop, the callback could be scheduled to make this asynchronous. At that point the examples and server would have to be updated, because they currently rely on the callback running immediately (inline).
The reason for this change is that `request_adapter` is supposed to return a `Promise` in JS, so we can represent it with callbacks at the C API, and `Future` in Rust (though we'll probably keep using callbacks initially).
I also changed `request_adapter` to provide an adapter with `AdapterId::ERROR` when no adapters are available, so we can add basic error handling to wgpu-rs (https://github.com/gfx-rs/wgpu-rs/issues/117).
Co-authored-by: Joshua Groves <josh@joshgroves.com>
372: Followup for #356 - fix incorrect check r=kvark a=parasyte
@kvark This fixes the fix created in #356
The original patch is checking the _requested descriptor limits_, but the backend limits are what needs to be checked for this edge case.
Co-authored-by: Jay Oster <jay@kodewerx.org>
371: Don't depend on gfx-auxil r=straightforward a=kvark
Problem with gfx-auxil is that version 0.1 drags spirv_cross dependency (not needed on Vulkan), and the published crates haven't been switched to gfx-auxil-0.2
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
363: Extended remote example r=kvark a=kvark
The remote example is now successfully able to request an adapter and to clean up the IDs.
In the near future, we need to change the example so that the server is run on a different thread...
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
359: Make examples work again r=kvark a=GabrielMajeri
This PR fixes the C example code to not crash and actually run.
I've also added a few assertions to ensure a warning is emitted next time somebody forgots to increase `max_bind_groups` to something non-zero on device creation.
To help with debugging the examples, I've configured CMake to include debug info in the builds. Some new Makefile targets for the examples have been added to automate running them.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
Get the examples running again.
The compute example has been simplified to use only one buffer.
A new check has been added to ensure the `max_bind_groups`
device limit is properly set.