GPU: query native format support and multisample quality levels #1369

Closed
github-bot wants to merge 1 commit from gh-pr/1369/head into gh-pr/1369/base
Owner

@⁠fuzeofficlal on GitHub · 2026-11-24 17:38 UTC · original
fuzeofficlal:fix/gpu-format-and-msaa-support-718 → main · +214 −5 · 1 files · 1 commits · closed without merging

Fixes #718.

Summary

  • Forward D3D12_FEATURE_FORMAT_SUPPORT and D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS (SampleCount in 1 | 2 | 4 | 8) in check_feature_support to the host ID3D12Device::CheckFeatureSupport through resource::pc_format.
  • Zero out support bits / quality levels (S_OK) for console-only formats without a host mapping (116, 117, 189..=191) instead of reporting every format as universally renderable and multisample-capable, while preserving input fields and propagating host HRESULT errors.

Verification

  • Added unit and host-comparison tests across 22 formats (including BC1, depth/stencil 118..=120 -> 45..=47, unmapped console formats, and sample counts 1/2/4/8):
    • NVIDIA GeForce RTX 5090 (VICTORY_D3D12_DEBUG=1): passed (0 debug errors)
    • Microsoft D3D12 WARP (VICTORY_D3D12_DEBUG=1): passed (0 debug errors)
  • cargo clippy --workspace --all-targets --all-features and cargo xtask policy: passed.
**@⁠fuzeofficlal** on GitHub · 2026-11-24 17:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/1369) `fuzeofficlal:fix/gpu-format-and-msaa-support-718` → `main` · +214 −5 · 1 files · 1 commits · closed without merging Fixes #718. ### Summary - Forward `D3D12_FEATURE_FORMAT_SUPPORT` and `D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS` (`SampleCount` in `1 | 2 | 4 | 8`) in `check_feature_support` to the host `ID3D12Device::CheckFeatureSupport` through `resource::pc_format`. - Zero out support bits / quality levels (`S_OK`) for console-only formats without a host mapping (`116`, `117`, `189..=191`) instead of reporting every format as universally renderable and multisample-capable, while preserving input fields and propagating host `HRESULT` errors. ### Verification - Added unit and host-comparison tests across 22 formats (including `BC1`, depth/stencil `118..=120 -> 45..=47`, unmapped console formats, and sample counts `1/2/4/8`): - **NVIDIA GeForce RTX 5090** (`VICTORY_D3D12_DEBUG=1`): passed (`0` debug errors) - **Microsoft D3D12 WARP** (`VICTORY_D3D12_DEBUG=1`): passed (`0` debug errors) - `cargo clippy --workspace --all-targets --all-features` and `cargo xtask policy`: passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:29:06 +00:00
github-bot closed this pull request 2026-11-26 04:29:06 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:24 UTC · original · edited 2026-11-25 06:25 UTC

Automated triage for the maintainers.

Needs work. It now merges cleanly with main. device.rs::check_feature_support now answers the title's FORMAT_SUPPORT and MULTISAMPLE queries with the host adapter's capabilities, and it reports zero support for 116, 117 and 189 to 191. That changes runtime return values the title sees, and the evidence given is a comparison with the host's own CheckFeatureSupport, which shows the code forwards correctly but not that the title should see the PC answer. Two concrete concerns:

  • 116, 117 and 189 to 191 are formats the console has: resource.rs on main documents them and gives them element sizes. Telling the title they have no support at all could steer it away from paths it uses on the console, or make it fail.
  • The host's support masks and quality-level counts differ by adapter, so the title would see different answers on different PCs.

What would change the verdict: evidence of what the console reports for these queries, or of what the title does with the answer (the call sites and which bits it tests), plus an answer for the console-only formats that matches what VIctory can actually create for them, rather than zero.

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/1369#issuecomment-7149511303) · edited 2026-11-25 06:25 UTC <!-- victory-triage v1 head=5d49f5c8d32fbc50f8b7bb3d208f82712c5ae0dd verdict=needs-work at=2026-11-25T06:28:00Z --> Automated triage for the maintainers. **Needs work.** It now merges cleanly with `main`. `device.rs::check_feature_support` now answers the title's `FORMAT_SUPPORT` and `MULTISAMPLE` queries with the host adapter's capabilities, and it reports zero support for 116, 117 and 189 to 191. That changes runtime return values the title sees, and the evidence given is a comparison with the host's own `CheckFeatureSupport`, which shows the code forwards correctly but not that the title should see the PC answer. Two concrete concerns: - 116, 117 and 189 to 191 are formats the console has: `resource.rs` on main documents them and gives them element sizes. Telling the title they have no support at all could steer it away from paths it uses on the console, or make it fail. - The host's support masks and quality-level counts differ by adapter, so the title would see different answers on different PCs. What would change the verdict: evidence of what the console reports for these queries, or of what the title does with the answer (the call sites and which bits it tests), plus an answer for the console-only formats that matches what VIctory can actually create for them, rather than zero. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 17:20 UTC · original

Closing this PR: as noted in triage, validating console-specific FORMAT_SUPPORT/MULTISAMPLE query behavior requires runtime call-site evidence from a real title, which I do not have locally. Keeping the PR queue focused on verified changes.

**@⁠fuzeofficlal** on GitHub · 2026-11-25 17:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/1369#issuecomment-7169355508) Closing this PR: as noted in triage, validating console-specific `FORMAT_SUPPORT`/`MULTISAMPLE` query behavior requires runtime call-site evidence from a real title, which I do not have locally. Keeping the PR queue focused on verified changes.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1369
No description provided.