Fix filtering out dx12 software adapters #6843
Merged
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
windows-rs#5956Description
The piece of code that broke is a filter for software rasterizer that incorrectly advertised themselves as integrated GPUs.
Ci was still fine because according to the comment on headless machines we get both a "real" and a "fake" software rasterizers. Due to this bug we'd pick the "fake" one and still run fine, but we want the "real" software rasterizer in actuality.
For reference: this was the original change introducing the filter in the first place
See the original change here:
https://github.com/gfx-rs/wgpu/pull/4259/files#diff-3da333eee10e8a957c04876a1a798ec4047053e7f33bb87b4fabbe2591a8e969R26
if desc.VendorId == 5140 && (desc.Flags & dxgi::DXGI_ADAPTER_FLAG_SOFTWARE) == 0 {(checks that software flag is NOT set)
Testing
Ran
cargo run -p wgpu-info: Before no WARP, after have WARPCaveat: wgpu-info is actually broken atm! It doesn't build with dx12, had to patch that in and then remove static-dxc again due to a linker issue. Out of scope for this PR though.
Started a fix here #6844
Checklist
cargo fmt.taplo format.cargo clippy. If applicable, add:--target wasm32-unknown-unknown--target wasm32-unknown-emscriptencargo xtask testto run tests.CHANGELOG.md. See simple instructions inside file.