Improve custom backend capabilities#9605
Open
inner-daemons wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands wgpu custom backend support by exposing additional custom backend accessors and enabling custom render bundle encoder finishing.
Changes:
- Adds new custom-backend accessors for TLAS, BLAS references, and external textures.
- Adds custom request-device error construction/display support.
- Reworks render bundle encoder custom dispatch with a boxed object-safe
finish_boxedpath.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
wgpu/src/dispatch.rs |
Adds object-safe finish_boxed to render bundle encoder interface. |
wgpu/src/backend/wgpu_core.rs |
Implements finish_boxed for core render bundle encoder. |
wgpu/src/backend/webgpu.rs |
Implements finish_boxed for WebGPU render bundle encoder. |
wgpu/src/backend/custom.rs |
Replaces custom render bundle encoder wrapper with boxed trait-object wrapper. |
wgpu/src/api/tlas.rs |
Adds TLAS custom accessor and lowest_unmodified accessor. |
wgpu/src/api/render_bundle_encoder.rs |
Routes custom render bundle encoder finish through finish_boxed. |
wgpu/src/api/external_texture.rs |
Adds external texture custom accessor. |
wgpu/src/api/device.rs |
Adds custom request-device error variant and constructor. |
wgpu/src/api/blas.rs |
Adds accessor for a TLAS instance’s custom BLAS. |
CHANGELOG.md |
Adds changelog entry for custom backend improvements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0278557 to
8159e2a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connections
Split off from #9570
Description
Lets custom backends do more things. In particular, this adds
as_customto several API types (which custom backends require to actually make use of these types), and makes render bundles usable on custom backends.Testing
Tested via gfx-rs/wgpu-native#594
Squash or Rebase?
Squash
Checklist
wgpumay be affected behaviorally.CHANGELOG.mdentries for the user-facing effects of this change are present.