HLE: test that XGSuggestSwizzleMode picks linear for a 1D texture #957

Merged
LouisRiverstone merged 1 commit from upstream-pr/957 into main 2026-11-25 00:12:06 +00:00
LouisRiverstone commented 2026-11-24 14:27:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by LouisRiverstone on 2026-11-24T14:27:24Z.


Fixes #868.

suggestions_follow_the_use covered three of the four branches of suggested(). It never set dimension to TEXTURE_1D, the first check, so removing or changing that branch would pass every test.

One added assertion: a TEXTURE_1D descriptor gives 0x100 (SWIZZLED | LINEAR).

Test only, no production change.

Verify: cargo test -p victory-hle suggestions_follow_the_use

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6584037710 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/957). Originally posted by [LouisRiverstone](https://github.com/LouisRiverstone) on 2026-11-24T14:27:24Z. --- Fixes #868. `suggestions_follow_the_use` covered three of the four branches of `suggested()`. It never set `dimension` to `TEXTURE_1D`, the first check, so removing or changing that branch would pass every test. One added assertion: a `TEXTURE_1D` descriptor gives `0x100` (`SWIZZLED | LINEAR`). Test only, no production change. **Verify:** `cargo test -p victory-hle suggestions_follow_the_use` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DenRakEiw commented 2026-11-24 15:03:30 +00:00 (Migrated from github.com)

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

Review: APPROVED


Tested merged cleanly onto main (ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC):

  • cargo test -p victory-hle: 94 passed, 0 failed (plus no_dll_planting: 1 passed)
  • cargo clippy -p victory-hle --all-targets: 0 warnings
  • cargo xtask policy: ok

Clean coverage for the TEXTURE_1D branch in XGSuggestSwizzleMode. Approving.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6041141727 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/957#pullrequestreview-6041141727). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-24T14:32:56Z. **Review:** APPROVED --- Tested merged cleanly onto `main` (`ffe310e`) on Windows 11 x64 (Rust 1.98.1 MSVC): - `cargo test -p victory-hle`: **94 passed, 0 failed** (plus `no_dll_planting`: 1 passed) - `cargo clippy -p victory-hle --all-targets`: **0 warnings** - `cargo xtask policy`: ok Clean coverage for the `TEXTURE_1D` branch in `XGSuggestSwizzleMode`. Approving. AI-assisted (Gemini 4 Neon).
MichaelSmithAI commented 2026-11-24 15:04:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MichaelSmithAI on 2026-11-24T14:41:50Z.


An additional Win64/Wine check passed on 246ecea. For a three-layer, nine-texel RGBA8 1D array, XGSuggestSwizzleMode returned 0x100. Passing that layout to the guest texture address computer produced four automatic mip levels. We wrote distinct byte patterns at widths 9, 4, 2 and 1 in every layer before reading any of them back. All 12 subresources retained their expected bytes through the guest copy slots. Writing the whole array first also checks for overlap between the tested layers and mip levels.

All five focused XG tests passed. This checks agreement between VIctory’s selector and its copy path. The fixture has no independent console layout measurement.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7134799057 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/957#issuecomment-7134799057). Originally posted by [MichaelSmithAI](https://github.com/MichaelSmithAI) on 2026-11-24T14:41:50Z. --- An additional Win64/Wine check passed on `246ecea`. For a three-layer, nine-texel RGBA8 1D array, `XGSuggestSwizzleMode` returned `0x100`. Passing that layout to the guest texture address computer produced four automatic mip levels. We wrote distinct byte patterns at widths 9, 4, 2 and 1 in every layer before reading any of them back. All 12 subresources retained their expected bytes through the guest copy slots. Writing the whole array first also checks for overlap between the tested layers and mip levels. All five focused XG tests passed. This checks agreement between VIctory’s selector and its copy path. The fixture has no independent console layout measurement.
pushkarreddyy commented 2026-11-24 15:04:10 +00:00 (Migrated from github.com)

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


Thanks @LouisRiverstone and @MichaelSmithAI for the validation!

Just a polite note that Issue #868 was claimed earlier (claim on #868) with our PR open at #975, covering linear swizzle assertions for TEXTURE_1D across default, render target, and depth-stencil flag combinations.

Would love any additional verification on PR #975 to help @Marvisak during the next merge review!

<!-- greyfinch-sync:Marvisak/VIctory:comment:7134855449 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/957#issuecomment-7134855449). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-11-24T14:43:54Z. --- Thanks @LouisRiverstone and @MichaelSmithAI for the validation! Just a polite note that Issue #868 was claimed earlier ([claim on #868](https://github.com/Marvisak/VIctory/issues/868#issuecomment-7132934581)) with our PR open at #975, covering linear swizzle assertions for `TEXTURE_1D` across default, render target, and depth-stencil flag combinations. Would love any additional verification on PR #975 to help @Marvisak during the next merge review!
Zipettte commented 2026-11-24 16:05:17 +00:00 (Migrated from github.com)

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


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 246ecea: cargo test -p victory-hle passes, 95 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:7136423095 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/957#issuecomment-7136423095). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T15:40:30Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 246ecea: `cargo test -p victory-hle` passes, 95 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
upstream-sync closed this pull request 2026-11-25 01:05:01 +00:00
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!957
No description provided.