Repository navigation
Conversation
Replace the `windows` crate (0.53..=0.62) with the self-contained `d3d12-agility` bindings (generated from the D3D12 Agility SDK 1.722-preview headers on top of `windows-core` 0.100), so that the D3D12 types in our public API are shared with the rest of the `d3d12-agility` ecosystem. This is an intentional breaking change: every D3D12/DXGI type in the `d3d12` module API now comes from `d3d12_agility` instead of `windows::Win32::Graphics::*`. - Enums and flags are plain integer aliases now, so `.0` accesses in the visualizer are gone. - `CheckFeatureSupport()` returns a raw `HRESULT` that we `.ok()`. - Castable formats are passed as explicit count + pointer pairs. - `E_OUTOFMEMORY` and `DXGI_ERROR_*` codes are not part of `d3d12-agility`, so they are defined locally. - The example no longer needs `windows` either. `d3d12-agility` requires Rust 1.95 and, being a git dependency with `edition = "2024"`, its manifest must be parsed by Cargo for every target and feature set. Bump the crate MSRV to 1.95 accordingly (also in CI and the README), which in turn enables `clippy::manual_is_multiple_of`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Switches the
d3d12backend fromwindowstod3d12-agility+windows-core0.100.Note
Draft until
d3d12-agilityis public and published to crates.io. It is currently an internal git dependency, so CI cannot fetch it yet andcargo publishwould reject the git-only dependency.Background
windows0.100 /windows-sys0.100 were never published to crates.io (only the smallerwindows-core,windows-bindgen, ... crates were; see microsoft/windows-rs#4867). Instead of patching a forkedwindowsacross every crate in our tree, D3D12/DXGI bindings now come fromd3d12-agility: self-contained bindings generated from the latest DirectX 12 Agility SDK headers on top ofwindows-core0.100, so breda and all D3D12-facing libraries share one set of types.Changes
d3d12 = ["dep:d3d12-agility", "dep:windows-core"]; thewindowsdependency and dev-dependency are gone.gpu_allocator::d3d12(ID3D12Device,ID3D12Device10/12,ID3D12Heap,ID3D12Resource,D3D12_RESOURCE_DESC,D3D12_HEAP_PROPERTIES,D3D12_HEAP_FLAGS,D3D12_CLEAR_VALUE,D3D12_RESOURCE_STATES,D3D12_BARRIER_LAYOUT,DXGI_FORMAT) now comes fromd3d12_agility. Enums/flags are plain integer aliases rather than newtypes. gpu-allocator's own signatures are unchanged.E_OUTOFMEMORY/DXGI_ERROR_DEVICE_REMOVEDare defined locally as they aren't part ofd3d12-agility.Testing
cargo build/clippy -D warnings/test/docwithd3d12(+std,hashbrown,visualizer,vulkan) feature combinations on Windows.d3d12-buffer-winrsexample ran successfully on a real GPU (FL 12_0).cargo readmeshould be rerun to confirm it matches.🤖 Generated with Claude Code