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

Manually merged
github merged 1 commit from gh-pr/957/head into gh-pr/957/base 2026-11-26 04:14:56 +00:00
Owner

@⁠LouisRiverstone on GitHub · 2026-11-24 14:27 UTC · original
LouisRiverstone:hle/swizzle-1d-test → main · +4 −0 · 1 files · 1 commits · merged 2026-11-25 00:12 UTC

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

**@⁠LouisRiverstone** on GitHub · 2026-11-24 14:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/957) `LouisRiverstone:hle/swizzle-1d-test` → `main` · +4 −0 · 1 files · 1 commits · merged 2026-11-25 00:12 UTC 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)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:14:55 +00:00
github manually merged commit 246ecea963 into gh-pr/957/base 2026-11-26 04:14:56 +00:00
Author
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 14:41 UTC · original

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.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 14:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/957#issuecomment-7134799057) 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.
Author
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 14:43 UTC · original

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!

**@⁠pushkarreddyy** on GitHub · 2026-11-24 14:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/957#issuecomment-7134855449) Thanks @⁠LouisRiverstone and @⁠MichaelSmithAI for the validation! Just a polite note that Issue #868 was claimed earlier ([claim on #868](https://git.gtahub.st/github/Marvisak--VIctory/issues/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!
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 15:40 UTC · original

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).

**@⁠Zipettte** on GitHub · 2026-11-24 15:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/957#issuecomment-7136423095) 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)._
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!957
No description provided.