GPU: answer format-info and virtual-address feature queries #278
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/278"
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 Quat3rnion on 2026-11-24T02:00:19Z.
What
CheckFeatureSupportreturnedE_NOTIMPLfor D3D12 feature IDs 5 and 6.This answers them with the same size and null validation as the features
already handled:
FORMAT_INFOreports one plane for ordinary formats and two for thedepth/stencil families (including typeless and read-only views).
GPU_VIRTUAL_ADDRESS_SUPPORTreports the 40 resource bits alreadypublished in OPTIONS and 48 bits for the process, since GPU addresses
are CPU addresses here.
Both are small interfaces with a clear error path, as the plan notes.
An AI tool wrote part of this change.
Tested
cargo test --workspacewith PR #112's Linux build fix applied locally (not part of this PR): 166 passed, 0 failed, 3 ignored. Two new tests cover plane counts, address widths and the invalid-size path.cargo check --target x86_64-pc-windows-gnu --workspace --testspasses. Windows-only tests were not run; there is no Windows host here.cargo xtask policypasses (150 files ok). No game files or data from them were added.Checklist
cargo fmton the changed hunks; workspace tests and Windows cross-check pass.cargo xtask policypasses. No game files or data from them were added.Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T04:12:07Z.
Tested PR #278 at head
c90d3c05ab98b9d859863f404fa8293f08450821(state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged atc90d3c05ab98b9d859863f404fa8293f08450821.cargo test --locked -p victory-gpu format_info_reports_the_planes_of_depth_formats— passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 40 filtered out; finished in 0.00s ); cases: device::tests::format_info_reports_the_planes_of_depth_formats.cargo test --locked -p victory-gpu virtual_address_support_matches_the_reported_address_space— passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 40 filtered out; finished in 0.00s ); cases: device::tests::virtual_address_support_matches_the_reported_address_space.Behavior covered: Checks depth-format plane counts and that virtual-address support matches the reported address space.
Code: crates/victory-gpu/src/device.rs
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T09:04:55Z.
Review: APPROVED
Tested
cbf3584on Windows 11, RTX 5070, MSVC:cargo test --workspace --no-fail-fastpasses (249 passed, 0 failed; older base), including both new tests.D3D12_FEATURE_DATA_FORMAT_INFOis aDXGI_FORMATplus aUINT8, padded to 8, and…_GPU_VIRTUAL_ADDRESS_SUPPORTis twoUINTs. Writing au32at the plane-count slot stays inside the 8 bytes, and the low byte lands onPlaneCount.NV12103,P010104,P016105,NV11110,P208130,V208131 andV408132. If any media path asks, this would report 1. That's unlikely for this title, but cheap to add.GPU_VIRTUAL_ADDRESS_SUPPORTreusesOPTIONS[9]for the per-resource bits, so the two queries can't disagree.AI-assisted (Claude Code).
upstream-sync referenced this pull request2026-11-24 19:03:41 +00:00
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:25:28Z.
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:crates/victory-gpu/src/device.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T19:47:28Z.
I compared the
FORMAT_INFOresult with native D3D12 on WARP 1.0.22 with Agility 1.620.2. On the initial 18 formats, main63bcca4returnedE_NOTIMPLfor all of them. This PR at425406cmatched D3D12 on 15/18. The differences were NV12, P010 and P016. The PR reported one plane for each and WARP reported two. The color, BC, depth/stencil, typeless and depth/stencil view cases agreed.I then checked five more formats. WARP returned one plane for 420_OPAQUE, two for NV11, and
E_INVALIDARGfor P208, V208 and V408 in both debug modes. The guest answersS_OKwith one plane for those last three. The patch adds the four confirmed two-plane video formats and extends the existing regression. On09c049e, all 20 successful native queries matched and the same three HRESULT differences remain. DXGI format referenceI repeated the 23 queries on a GeForce GTX 750 Ti (driver
32.0.15.6094) and on the explicit WARP adapter. The D3D12 device identified the selected adapter in both cases. I tested the system runtime (10.0.19041.5794) and app-local Agility1.620.2on each adapter. All four runs matched09c049efor the same 20 formats. The same three queries for P208, V208 and V408 returnedE_INVALIDARGin every run. The hardware check used a native feature-level 11.0 device and queried format metadata only.The branch passed 248 GPU diagnostics tests with one ignored, with the D3D12 debug layer off and on. Clippy passed with default features and diagnostics, and the asset policy check passed. These tests cover the format query.
Follow-up branch. Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the follow-up into another commit.AI-assisted with OpenAI Codex.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.