144: Rewrite bindings generation r=grovesNL a=kvark
This PR is shaping wgpu-remote to become distantly usable, introduces an example that tests it on CI.
It also rewrites our binding generation to use `cbindgen.toml` configuration, which goes in line with Gecko use case (even though they are going to have a separate configuration).
The `ClientFactory` is introduced so that we can have multiple clients (say, one page per client) talking to the same server on a dedicated thread within the GPU process.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
131: Support dynamic offsets r=kvark a=cloudhead
Closes#125
Adds support for dynamic offsets when setting a bind group.
I haven't actually tried if this works with my use-case, but it's fairly straight forward. 😅
Co-authored-by: Alexis Sellier <alexis@monadic.xyz>
127: Track async mapping properly r=grovesNL,swiftcoder a=kvark
Fixes#117, fixes#95, fixes#132
The change can be logically split into 3 parts:
1. when `ActiveSubmission` is retired, we now move the mapped buffers into the "ready to map" vector. This was the missing bit that caused mapping to not work previously.
2. mapping callbacks in Rust wrapper are refactored and they `unmap()` automatically now on users behalf
3. we wait for idle before destroying the device, which allows us to process all the pending callbacks. This fix gets rid of the dummy submission our compute example used to do.
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
124: Configure Swapchain with supported composite_alpha r=kvark a=silphendio
CompositeAlpha::Inherit (default) is not supported on every graphics card.
Relevant : https://github.com/gfx-rs/gfx/issues/2507
Co-authored-by: Markus Ginthör <markus.ginthoer@gmx.at>
121: Implement index formats r=kvark a=grovesNL
I decided to implement index formats to try to catch up on some of the recent changes. The idea is to either source the index format from the last bound pipeline, or switch the index format based on a newly bound pipeline, through the following:
- During `set_index_buffer`, use the index format from the render pass, and cache the bound index buffer ID and offset
- During `set_pipeline`, check if the index format has changed from the previous pipeline, and rebind the index buffer using the new index format if necessary
Some things I wasn't sure about:
- Is the usage of `get_with_extended_usage` correct here?
- Are the caches located in the correct place (i.e. `RenderPassContext`)?
Co-authored-by: Joshua Groves <josh@joshgroves.com>
118: readme: revise supported platforms r=kvark a=nathany
Should this say D3D11?
Co-authored-by: Nathan Youngman <4566+nathany@users.noreply.github.com>