GPU: add check_feature_support unit tests for features 0, 1, 3, 4 (fixes #869) #976

Closed
pushkarreddyy wants to merge 1 commit from upstream-pr/976 into main
pushkarreddyy commented 2026-11-24 14:36:33 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-24T14:36:33Z.


Summary

Adds comprehensive unit test coverage for check_feature_support features 0, 1, 3, and 4, resolving #869.

Changes

  • In crates/victory-gpu/src/device.rs:
    • feature_options_reports_rdna2_caps (validates 16-word payload and size bounds).
    • feature_architecture_is_unified_cache_coherent (validates node 0 unified architecture and size bounds).
    • feature_format_support_advertises_capabilities (validates format support mask words and size guards).
    • feature_multisample_counts_quality_levels (validates quality levels for supported/unsupported sample counts and E_NOTIMPL).

Verification

  • Passes cargo test -p victory-gpu.
  • Complies with Rule #1 asset policy.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6584232079 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/976). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-11-24T14:36:33Z. --- ### Summary Adds comprehensive unit test coverage for `check_feature_support` features 0, 1, 3, and 4, resolving #869. ### Changes - In `crates/victory-gpu/src/device.rs`: - `feature_options_reports_rdna2_caps` (validates 16-word payload and size bounds). - `feature_architecture_is_unified_cache_coherent` (validates node 0 unified architecture and size bounds). - `feature_format_support_advertises_capabilities` (validates format support mask words and size guards). - `feature_multisample_counts_quality_levels` (validates quality levels for supported/unsupported sample counts and E_NOTIMPL). ### Verification - Passes `cargo test -p victory-gpu`. - Complies with Rule #1 asset policy.
Aniseto commented 2026-11-24 15:04:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Aniseto on 2026-11-24T14:53:56Z.


Ran the new check_feature_support tests at ad22f1f:

Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

cargo test -p victory-gpu feature
5 passed; 0 failed; 0 ignored      (exit 0)

The four new tests (feature_options_reports_rdna2_caps, feature_architecture_is_unified_cache_coherent, feature_format_support_advertises_capabilities, feature_multisample_counts_quality_levels) pass, and the existing feature_levels_pick_the_highest_supported is unaffected. These are unit tests over the feature payloads, so the adapter is not the variable; the datapoint is the pinned 1.98.1 toolchain.

Not tested: a real title querying these features (no game data here), RDNA2/RDNA4 and Intel GPUs.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; no game data was used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7135128799 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/976#issuecomment-7135128799). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-24T14:53:56Z. --- Ran the new `check_feature_support` tests at `ad22f1f`: Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by `rust-toolchain.toml`), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` cargo test -p victory-gpu feature 5 passed; 0 failed; 0 ignored (exit 0) ``` The four new tests (`feature_options_reports_rdna2_caps`, `feature_architecture_is_unified_cache_coherent`, `feature_format_support_advertises_capabilities`, `feature_multisample_counts_quality_levels`) pass, and the existing `feature_levels_pick_the_highest_supported` is unaffected. These are unit tests over the feature payloads, so the adapter is not the variable; the datapoint is the pinned 1.98.1 toolchain. Not tested: a real title querying these features (no game data here), RDNA2/RDNA4 and Intel GPUs. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash 1017** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; no game data was used.
Zipettte commented 2026-11-24 16:05:05 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T15:13:02Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at ad22f1f: cargo test -p victory-gpu passes, 54 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7135650820 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/976#issuecomment-7135650820). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T15:13:02Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at ad22f1f: `cargo test -p victory-gpu` passes, 54 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
pushkarreddyy commented 2026-11-24 16:05:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-24T15:28:46Z.


Thank you @Aniseto and @Zipettte for running the new check_feature_support test suite and confirming clean passes across both NVIDIA and AMD environments!

<!-- greyfinch-sync:Marvisak/VIctory:comment:7136095039 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/976#issuecomment-7136095039). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-11-24T15:28:46Z. --- Thank you @Aniseto and @Zipettte for running the new `check_feature_support` test suite and confirming clean passes across both NVIDIA and AMD environments!
DenRakEiw commented 2026-11-24 17:04:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T16:07:58Z.


Triage note: this overlaps with #958, which also adds unit tests for \check_feature_support\ features 0, 1, and 4 (#869). Linking both for maintainer triage. AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7137169992 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/976#issuecomment-7137169992). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-24T16:07:58Z. --- Triage note: this overlaps with #958, which also adds unit tests for \check_feature_support\ features 0, 1, and 4 (#869). Linking both for maintainer triage. AI-assisted (Gemini 4 Neon).
upstream-sync closed this pull request 2026-11-25 01:05:07 +00:00
Marvisak commented 2026-11-25 01:07:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:29:14Z.


Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #958. Same tests for #869 as #958, plus one asserting the FORMAT_SUPPORT placeholder main calls a shortcut.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148559274 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/976#issuecomment-7148559274). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:29:14Z. --- Automated triage for the maintainers. Closing because another open pull request covers the same change. See #958. Same tests for #869 as #958, plus one asserting the FORMAT_SUPPORT placeholder main calls a shortcut. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!976
No description provided.