GPU: unit tests for the OPTIONS, ARCHITECTURE and MULTISAMPLE feature queries #958
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!958
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/958/head"
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?
@LouisRiverstone on GitHub · 2026-11-24 14:27 UTC · original
LouisRiverstone:gpu/feature-support-tests→main· +49 −0 · 1 files · 1 commits · closed without mergingFixes #869.
check_feature_supportimplements five feature ids, but onlyFEATURE_LEVELShad a test. Titles read the other answers to decide which GPU features to use, so a silent edit would go unnoticed.Three tests, none touching production code:
OPTIONS, the key tiers are 3/3/3, 40 address bits and heap tier 2, and a wrong size or null pointer givesE_INVALIDARG.E_INVALIDARG.Verify:
cargo test -p victory-gpu feature_🤖 Generated with Claude Code
@MichaelSmithAI on GitHub · 2026-11-24 14:41 UTC · original
On RTX 4090 under Wine/vkd3d-proton 3.2, five focused tests passed with a test-only comparison of the guest device vtable and the live D3D12 device. For RGBA8_UNORM at 8× MSAA, both queries returned one quality level. For BC7_UNORM at 8×, the guest returned one and the host returned zero. The guest FORMAT_SUPPORT query also returned the same flags for both formats, while the host returned different flags.
This confirms the tests capture VIctory’s current guest-visible answers. A positive guest multisample answer alone does not establish host support for that format. The comparison used feature queries only. Texture creation and title use were outside the test.
@Zipettte on GitHub · 2026-11-24 15:41 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 7d0302b:
cargo test -p victory-gpu52 passed. In the full runframe::tests::waits_end_on_ticks_and_count_framesfailed once ([4, 5, 6, 8], a skipped frame), but it passed 5/5 on rerun, and also 5/5 on main. So it looks like the timing flake that #985 targets, not something this PR causes.Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 00:29 UTC · original · edited 2026-11-25 02:22 UTC
Automated triage for the maintainers.
The three new tests in
crates/victory-gpu/src/device.rsrepeat whatcheck_feature_supportalready does and do not check those answers against a reference.feature_options_report_the_rdna2_tierscompares the output with the sameOPTIONSconstant the function writes. The architecture test copies the[0, 1, 1]literal. The multisample test copies thematches!(q[1], 1 | 2 | 4 | 8)rule. That rule is a known shortcut: it ignores the format, and the RTX 4090 comparison in this thread shows the host disagreeing for BC7. Fixing it would then require editing this test, so the test does not catch regressions. It only makes intended changes harder.A test that checks these values against public documentation or the console's real answers would be welcome. As it stands this adds no value, so it is a proposed close. This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the
triage: proposed closelabel.Generated by Claude Code
Pull request closed