Shaders: return zero for unused image query extents #1313

Open
github-bot wants to merge 1 commit from github-bot/gh-1313 into main AGit
Owner

@⁠EatCodeSleep2 on GitHub · 2026-11-24 17:21 UTC · original
EatCodeSleep2:fix/image-resinfo-unused-extents-1249 → main · +56 −13 · 2 files · 1 commits · open

Summary

Return zero for unused extents in the 1D, 2D and 1D-array image_get_resinfo cases. UAVs continue to report one mip level. Cube queries retain their existing behavior.

Refs #1249, finding VIC-BT-038. The reported RDNA2 behavior is also documented in the published hardware measurements.

Verification

  • A synthetic 2D query with all four result channels enabled reads back [3, 2, 1, 1] on main. After the fix it validates and returns [3, 2, 0, 1] on native Direct3D 12 and WARP.
  • The shader library suite passed 120 tests, with one ignored and the known NaN median test filtered out (#726, #745).
  • All-targets shader Clippy with warnings denied passed.

GPU readback covered 2D. This run used no RDNA2 hardware or game files. AI-assisted.

**@⁠EatCodeSleep2** on GitHub · 2026-11-24 17:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/1313) `EatCodeSleep2:fix/image-resinfo-unused-extents-1249` → `main` · +56 −13 · 2 files · 1 commits · open ## Summary Return zero for unused extents in the 1D, 2D and 1D-array `image_get_resinfo` cases. UAVs continue to report one mip level. Cube queries retain their existing behavior. Refs #1249, finding VIC-BT-038. The reported RDNA2 behavior is also documented in the [published hardware measurements](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/debt/shader.md). ## Verification - A synthetic 2D query with all four result channels enabled reads back `[3, 2, 1, 1]` on main. After the fix it validates and returns `[3, 2, 0, 1]` on native Direct3D 12 and WARP. - The shader library suite passed 120 tests, with one ignored and the known NaN median test filtered out (#726, #745). - All-targets shader Clippy with warnings denied passed. GPU readback covered 2D. This run used no RDNA2 hardware or game files. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:27:15 +00:00
Author
Owner

@⁠crosettiremi on GitHub · 2026-11-24 17:28 UTC · original · edited 2026-11-24 17:35 UTC

Independent XCL cross-check on a Windows RX 7900 XT, using XCL's native D3D12 compute fixture. A 4×4, single-mip 2D texture queried with all four result channels returned [4, 4, 1, 1] before changing the emitter. Changing the unused extent to zero returned [4, 4, 0, 1] across the tested lanes. XCL’s existing native cube-array fixture also passed with 12 layers for two cubes. This reproduces the 2D discrepancy in a second translator. The game impact and 1D cases are unmeasured here.

Game follow-up on the same RX 7900 XT: the XCL test build accepted the account selection and continued world streaming. The last captured frame was dark, and the process ended with a second-chance guest breakpoint at RVA 0xf2cc4b after 204 s with no logged device removal. The 2D query correction alone did not produce a visible world on this run.

**@⁠crosettiremi** on GitHub · 2026-11-24 17:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/1313#issuecomment-7139238483) · edited 2026-11-24 17:35 UTC Independent XCL cross-check on a Windows RX 7900 XT, using XCL's native D3D12 compute fixture. A 4×4, single-mip 2D texture queried with all four result channels returned `[4, 4, 1, 1]` before changing the emitter. Changing the unused extent to zero returned `[4, 4, 0, 1]` across the tested lanes. XCL’s existing native cube-array fixture also passed with 12 layers for two cubes. This reproduces the 2D discrepancy in a second translator. The game impact and 1D cases are unmeasured here. Game follow-up on the same RX 7900 XT: the XCL test build accepted the account selection and continued world streaming. The last captured frame was dark, and the process ended with a second-chance guest breakpoint at RVA 0xf2cc4b after 204 s with no logged device removal. The 2D query correction alone did not produce a visible world on this run.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:21 UTC · original

Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-shader/src/emit/waterfall_tests.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/1313#issuecomment-7149471999) <!-- victory-triage v1 head=7295d7e85ceca285b82637dd1c3f84a20e553830 verdict=needs-rebase at=2026-11-25T01:21:58Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `crates/victory-shader/src/emit/waterfall_tests.rs`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-shader/src/emit/waterfall_tests.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1313/head:github-bot/gh-1313'
git switch 'github-bot/gh-1313'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1313'
git switch 'github-bot/gh-1313'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1313'
git switch 'github-bot/gh-1313'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1313'
git switch 'main'
git merge --squash 'github-bot/gh-1313'
git switch 'main'
git merge --ff-only 'github-bot/gh-1313'
git switch 'main'
git merge 'github-bot/gh-1313'
git push origin 'main'
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!1313
No description provided.