GPU: query native format support and multisample quality levels #1369
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1369"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T17:38:24Z.
Fixes #718.
Summary
D3D12_FEATURE_FORMAT_SUPPORTandD3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS(SampleCountin1 | 2 | 4 | 8) incheck_feature_supportto the hostID3D12Device::CheckFeatureSupportthroughresource::pc_format.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 hostHRESULTerrors.Verification
BC1, depth/stencil118..=120 -> 45..=47, unmapped console formats, and sample counts1/2/4/8):VICTORY_D3D12_DEBUG=1): passed (0debug errors)VICTORY_D3D12_DEBUG=1): passed (0debug errors)cargo clippy --workspace --all-targets --all-featuresandcargo xtask policy: passed.Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T20:49:18Z.
Review: COMMENTED
Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows_sys/Win32) — nothing compiles or runs on macOS; this is source review plus the PR's own Windows tests.
CheckFeatureSupport FORMAT_SUPPORT and MULTISAMPLE now query the real host D3D12 device instead of blanket answers (0x7fff_ffff / 1 quality level), with console-only formats (116, 117, 189..=191 — whose numeric PC IDs mean other formats) zeroed via host_format(), and the old fallbacks kept when no host device exists. Tests cover arg validation, unmapped formats, and host-matching support bits (host-gated). This makes titles that probe format support get truthful answers.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:24:21Z.
Automated triage for the maintainers.
Needs work. It now merges cleanly with
main.device.rs::check_feature_supportnow answers the title'sFORMAT_SUPPORTandMULTISAMPLEqueries 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 ownCheckFeatureSupport, which shows the code forwards correctly but not that the title should see the PC answer. Two concrete concerns:resource.rson 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.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
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T17:20:11Z.
Closing this PR: as noted in triage, validating console-specific
FORMAT_SUPPORT/MULTISAMPLEquery 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