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.
358: Remove all the IPC r=grovesNL a=kvark
Closes#146Closes#22
We have decided to use Gecko IPC for Firefox. `wgpu-remote` will therefore provide all the Rust glue that Gecko needs for client and server:
- initialization/termination of client/server
- ID management for the client
- pass encoding blobs
In Servo, we'd need to enable `serde` feature of `wgpu-native` and potentially roll out a different remoting crate that would establish a protocol based on `ipc-channel`, as we wanted originally.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
353: Always return an Id by request_adapter r=kvark a=kvark
Requesting adapters is a bit special in a sense that it's exactly the place where the backend selection happens. It accepts a list of Ids, and we need to always return one, so that the remote client knows which Id was actually used and clean up the others.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
347: Add license headers to all Rust sources r=imnotalawyer a=kvark
Fixes#346
the header is fairly small, so it shouldn't be in the way of editing files
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
343: Document primary/secondary backend bit r=kvark a=rukai
Happy to add more detail, but this should be sufficient for the user to understand what PRIMARY/SECONDARY mean.
Co-authored-by: Rukai <rubickent@gmail.com>
342: Fallback to D32 when D24 isn't available r=kvark a=grovesNL
The rationale is that D32 seems to be supported on more devices. Using D24 could be a future memory/performance optimization instead.
Otherwise if it's fairly trivial I could add the fallback path for D32 here instead, but I'm not sure how we intend for values in the `D24Unorm` depth range to work in general (i.e. compared to `D32Sfloat`). Maybe I missed some discussion about this, but I don't see it in the minutes.
cc @Yatekii
Co-authored-by: Joshua Groves <josh@joshgroves.com>
341: Track and destroy samplers r=kvark a=yanchith
This PR adds `ResourceId::Sampler`, `NativeResource::Sampler` and
`TrackerSet::samplers`. Samplers are (similarly to bind groups)
created with their own life guard and a device id to keep the device
ref count alive. Also added are `extern wgpu_sampler_destroy` and
`sampler_destroy`.
The rest of the implementation was guided by compiler errors, so there
is a good chance I didn't find something crucial that also needed
doing. Please check :)
I also imagine we might want to add the `Drop` impl for sampler in wgpu-rs.
Fixes: #231
Co-authored-by: yanchith <yanchi.toth@gmail.com>
This PR adds `ResourceId::Sampler`, `NativeResource::Sampler` and
`TrackerSet::samplers`. Samplers are (similarly to bind groups)
created with their own life guard and a device id to keep the device
ref count alive. Also added are `extern wgpu_sampler_destroy` and
`sampler_destroy`.
The rest of the implementation was guided by compiler errors, so there
is a good chance I didn't find something crucial that also needed
doing. Please check :)
331: Add a function to describe a device r=kvark a=paulkernfeld
This is for https://github.com/gfx-rs/wgpu-rs/pull/29
This successfully describes the device on my machine. I think I may have done the imports wrong. If so, apologies.
Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>