Skip to content

feat(wgpu-hal/dx12): add raw_resource method to Buffer - #9364

Merged
Wumpf merged 1 commit into
gfx-rs:trunkfrom
Fachep:dx12-raw
Apr 8, 2026
Merged

feat(wgpu-hal/dx12): add raw_resource method to Buffer#9364
Wumpf merged 1 commit into
gfx-rs:trunkfrom
Fachep:dx12-raw

Conversation

@Fachep

@Fachep Fachep commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Description
Allow accessing ID3D12Resource of Buffer.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

Copilot AI review requested due to automatic review settings April 3, 2026 02:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a DX12-specific escape hatch to access the underlying ID3D12Resource for wgpu-hal’s dx12::Buffer, matching existing raw access patterns used elsewhere in the backend.

Changes:

  • Add Buffer::raw_resource() to expose the underlying Direct3D12::ID3D12Resource.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wgpu-hal/src/dx12/mod.rs

@Wumpf Wumpf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we already have this pattern on Texture, so whatever I don't like about it would also apply here, but that would make it a bigger question and this just makes it consistent 🤷 👍

@Wumpf
Wumpf merged commit 6e37845 into gfx-rs:trunk Apr 8, 2026
61 of 62 checks passed
@Fachep
Fachep deleted the dx12-raw branch April 14, 2026 05:42
slyedoc pushed a commit to slyedoc/wgpu that referenced this pull request May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants