Skip to content

fix(shader): recognize scalarized constant-stride image tables - #13149

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Prophet069:pr/shader-scalarized-image-tables
Nov 1, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Prophet069:pr/shader-scalarized-image-tables

Conversation

@Prophet069

@Prophet069 Prophet069 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What

A PPSA02015 compute shader scales an image-table offset by a constant stride and then moves it through v_readfirstlane inside selects guarded by the lane id. Resource analysis rejected it with GetImageResource dword 0 is not a valid runtime value. The resource tracker now recognizes such an offset as a constant-stride column through selects whose condition the active mask implies. Runtime SRT evaluation gains unsigned greater-than-or-equal comparisons, uniform selected components of constructed U32x4 values and known active-mask conjuncts in nested selects. Image dimension queries stay in GPU IR, and variable scales are still not constant-stride columns. The new entry in docs/dev/debt/shader.md records that the live GPU behaviour of these additions is unmeasured.

Tested

  • With ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (VVL vulkan-sdk-1.4.321.0; neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS), ctest --test-dir build -R <the 63 tests of agc_shader_memory_tests, agc_driver_cmask_fast_clear_tests, agc_driver_graphics_tests and agc_driver_sample_multisample_target_tests> -V on main 8c8b998620 and on this branch, same machine and GPU: main 63/63 passed, 0 VUID-; this branch 63/63 passed, 0 VUID-. New ShaderMemory.cpp cases cover unrelated masks, disjunctions, varying and out-of-range components and variable shifts.
  • agc_driver_unclamped_normalized_blend (the feat(agc): merge a draw into more than one unclamped normalized color target #12916 multi-target regression, 2 draws blending two targets each) passed on main and on this branch with the same validation settings, 0 VUID-.
  • agc_shader_replay --prepare of a captured PPSA02015 request (code hash 3d6b9e898ab900ba, 280 code words, wave64) with ANYPS5_NO_SHADER_CACHE=1: on main 8c8b998620 it exits 1 with resource analysis failed: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00000208(…ReadFirstLane(SelectU32(ULessThan32(GetBuiltin…; on this branch it exits 0 with prepared: 133909 SPIR-V words. The request contains game code and is not attached.
  • The commit changes only the files listed in the diff; it no longer carries the pre-feat(agc): merge a draw into more than one unclamped normalized color target #12916/fix(agc): don't release a label wait on a store its queue already took and reset #12923 tree of the first push.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: PPSA02015 Death Stranding 2: On the Beach (PPSA02015) #5424
  • GPUs tested: NVIDIA GeForce RTX 3080 Laptop GPU (8 GB), driver 616.64, Windows 10 Pro 19045
  • AI-assisted: yes

🤖 Generated with Claude Code

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 30, 2026

@MarcZX10 MarcZX10 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

The shader repro is author-reported as fixed, but the PR also removes multi-target color merging that is present on its base.

What I ran

Reviewed head 6bf492e804cefd0ef70ab4f4a062aeaa5eeed02d; PR base 5ecef095b61e7a406b279c97896f3a8a6fbd6353. Current main is 422f96b3a92e797c5f69c136c4a394c8da672556; the merge preview is clean (tree 300d4e4445d31e7887adfe6179550a5467fc4b87). Environment: Linux 6.1.0-54-amd64 x86_64. I did not build or run tests locally.

git diff --check upstream/main...upstream/pr-13149
git merge-tree --write-tree upstream/main upstream/pr-13149
python3 tools/check_conventions.py --base upstream/main --head upstream/pr-13149
git diff --unified=4 upstream/main...upstream/pr-13149 -- core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp core/shader/recompiler/Recompiler.hpp core/shader/recompiler/Recompiler.cpp
python3 - <<'PY'
import subprocess
base='5ecef095b61e7a406b279c97896f3a8a6fbd6353'
main='422f96b3a92e797c5f69c136c4a394c8da672556'
head='6bf492e804cefd0ef70ab4f4a062aeaa5eeed02d'
def paths(a,b): return set(subprocess.check_output(['git','diff','--name-only',a,b],text=True).splitlines())
print(sorted(paths(base,main) & paths(base,head)))
PY
gh pr checks 13149 -R boykopovar/AnyPS5

Results

Check Result
Diff check Passed; no output
Current-main merge preview Clean
Conventions Passed locally and in hosted CI
Hosted Windows build, Ubuntu and Windows relinker, relinker ASan Passed
Hosted macOS relinker jobs Pending
Hosted Linux and register-context/write-watch jobs Skipped
Author-reported GPU suite 63/63 on main and 63/63 on the change, same Windows 10 / RTX 3080 system, with no VUID output; not independently run
Author-reported shader repro On main 08a10d2253, preparation exits 1 with the reported invalid-runtime-value error; on the PR branch it exits 0 with 133,909 SPIR-V words; not independently run
Changes on current main since PR base Four paths; none overlap the PR’s changed paths
Captured command output
300d4e4445d31e7887adfe6179550a5467fc4b87
All conventions checks passed.
[]
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41001942789/job/123888190767
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41001942789/job/123888191171
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41001942789/job/123888190820
intake	pass	17s	https://github.com/boykopovar/AnyPS5/actions/runs/41001942668/job/123888122972
relinker (ubuntu-latest, g++)	pass	3m16s	https://github.com/boykopovar/AnyPS5/actions/runs/41001942789/job/123888189359
relinker (windows-latest, g++)	pass	8m59s	https://github.com/boykopovar/AnyPS5/actions/runs/41001942789/job/123888189343
relinker-asan	pass	2m46s	https://github.com/boykopovar/AnyPS5/actions/runs/41001942789/job/123888189247
windows	pass	18m51s	https://github.com/boykopovar/AnyPS5/actions/runs/41001942789/job/123888189236
relinker (macos-latest, clang++)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41001942789/job/123888189285
relinker (macos-latest, clang++, x86_64)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41001942789/job/123888189379
conventions	pass	13s	https://github.com/boykopovar/AnyPS5/actions/runs/41001942682/job/123888122893
eligibility	pass	4s	https://github.com/boykopovar/AnyPS5/actions/runs/41001942789/job/123888122754
labels	pass	9s	https://github.com/boykopovar/AnyPS5/actions/runs/41001942778/job/123888123435
report	pass	41s	https://github.com/boykopovar/AnyPS5/actions/runs/41001942830/job/123888122166

Negative control

Assertion Control and change Outcome
Captured PPSA02015 shader preparation Author reports baseline 08a10d2253 versus the PR branch Baseline failed with the cited runtime-value error; PR branch prepared successfully. This is author-provided, not an independently run negative control.
Multi-target regression No local test mutation was run Not exercised locally; the source change itself rejects a second merged target.

Findings

Blocking

  • Restores a one-target limit and removes merged-target handling. Current main supports multiple partial-write/unclamped-normalized target merges: ExportTargetMerges returns a vector, and the recompiler materializes and hashes all entries. This PR changes that to a single TargetMerge and adds Require(merge.mask == 0, ...), which rejects a draw with a second mergeable target. The PR description does not identify this behavior change, and the change removes support introduced by #12916. Please preserve the multi-target state, materialization, cache and SPIR-V paths and their tests while applying the scalarized image-table fix.

Non-blocking

None.

Sources

Not verified

I did not run the author's Windows/Vulkan tests or shader replay locally, a local C++ build, Linux product tests, macOS relinker checks, or console behavior. The GPU and replay results above are the author's report.

To get this to a good state

Preserve multi-target merge handling and coverage from current main, then rerun the relevant multi-target regressions and the captured shader preparation comparison on the revised head. I will repeat the same source, diff, conventions and merge-preview checks on that head.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 docs/dev/debt/shader.md
PR 5371 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 5609 core/shader/recompiler/Optimization/src/SrtWalker/SrtEvaluator.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 6280 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
docs/dev/debt/shader.md
PR 6412 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
docs/dev/debt/shader.md
PR 6924 docs/dev/debt/shader.md
PR 7223 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
docs/dev/debt/shader.md
PR 7392 docs/dev/debt/shader.md
PR 7410 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 7642 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 7684 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
docs/dev/debt/shader.md
PR 7694 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 7922 docs/dev/debt/shader.md
PR 8004 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 9020 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 9183 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
docs/dev/debt/shader.md
PR 9335 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 9356 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 9387 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 9508 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 9748 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 9852 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 10233 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 10359 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 10547 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 10652 docs/dev/debt/shader.md
PR 10757 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 10867 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 10941 docs/dev/debt/shader.md
PR 11351 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 11483 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 11551 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 12299 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 12324 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 12548 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/SrtWalker/SrtEvaluator.cpp
core/shader/recompiler/Optimization/src/SrtWalker/SrtInstructionPredicates.cpp
docs/dev/debt/shader.md
PR 12828 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 13928 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 13929 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 14212 docs/dev/debt/shader.md

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@Prophet069 thanks for these. One problem common to all five PRs (#13145, #13146, #13147, #13148, #13149): each commit sits on main 5ecef095b6, but its tree still has the older versions of the files that #12916 and #12923 changed (for example RequestSerializer.cpp, UnclampedNormalizedBlend.cpp, LabelHistory.cpp, WaitMemory.cpp). So each PR, as it stands, would undo both of those merges; that is where the ~465 deleted lines in every diff come from.

For this PR, git diff 08a10d2253 <head> (main just before #12916) shows only your own change. Could you rebase it onto current main keeping only that change (for example git rebase --onto origin/main 08a10d2253 on a branch whose tree is your change applied to 08a10d2253, or re-apply your change on a fresh branch from main), then force-push? We'll review the change itself as soon as the diff no longer touches the #12916/#12923 files.

An image-table offset that is scaled by a constant stride before v_readfirstlane is recognized as a constant-stride column through selects whose condition the active mask implies. Runtime SRT evaluation supports unsigned greater-than-or-equal comparisons, uniform selected components of constructed U32x4 values and known active-mask conjuncts in nested selects. Image dimension queries stay in GPU IR and variable scales are not constant-stride columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Prophet069
Prophet069 force-pushed the pr/shader-scalarized-image-tables branch from 6bf492e to 74952fa Compare October 30, 2026 05:19
@Prophet069

Copy link
Copy Markdown
Contributor Author

Thanks, you were right: I squashed onto a moving origin/main, so the commit kept the pre-#12916/#12923 tree. Re-applied only this change on a fresh branch from main 8c8b998620 and force-pushed (same patch-id as git diff 08a10d2253 <old head>); the diff now touches only this PR's files. Rebuilt and reran the focused tests on 8c8b998620 and on the new head with the validation layer; the description has the results.

@MarcZX10 The single-target ExportTargetMerge, the targetMerge field and the Require(merge.mask == 0, ...) came from the stale tree of the first push, which reverted #12916; this PR does not change them. The new head leaves State.cpp, Recompiler.hpp and Recompiler.cpp as on main. agc_driver_unclamped_normalized_blend (2 draws blending two targets each) passes on main 8c8b998620 and on this head with VK_LAYER_KHRONOS_validation, 0 VUID-.

@Tehshortbus

Copy link
Copy Markdown
Contributor

@Prophet069 a heads-up: this branch sets the files #12916 changed back to their contents before #12916 merged (3d2d264392), although its base already includes #12916. For example, core/libs/prx/libSceAgcDriver/tests/execution/UnclampedNormalizedBlend.cpp loses TwoTargetProgram and the two-target draws, and ShaderPixelStageInfo::targetMerges goes back to a single targetMerge. Merged as it is, this would undo #12916, and PPSA26344 would stop again on its two-target blend (#12796). The same happens in #13145, #13146, #13147, #13148 and #13149, so they may share a stale copy of those files.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — new head, looks good

The current head preserves the multi-target merge behavior that was missing from the earlier head, and I found no blocking issue in the revised scalarized image-table change.

What I ran

Reviewed head 74952faffa809977ec9b690d38dfbe95f4bdc770 on base 8c8b9986204d5b1cbb23847b363df00ae832ec9c; the merge preview is clean (c2c1c5de3736686f39aace3ea02a5f3ccd05257b). Environment: Linux x86-64. No local build or tests were run.

git diff --check 8c8b9986204d5b1cbb23847b363df00ae832ec9c...74952faffa809977ec9b690d38dfbe95f4bdc770
git merge-tree --write-tree 8c8b9986204d5b1cbb23847b363df00ae832ec9c 74952faffa809977ec9b690d38dfbe95f4bdc770
python3 tools/check_conventions.py --base 8c8b9986204d5b1cbb23847b363df00ae832ec9c --head 74952faffa809977ec9b690d38dfbe95f4bdc770
python3 tools/pr_overlap.py --branch 74952faffa809977ec9b690d38dfbe95f4bdc770 --base main --repo boykopovar/AnyPS5 --jobs 16
gh pr checks 13149 --repo boykopovar/AnyPS5

Results

Check Result
Diff check Passed; no output
Merge preview Clean
Conventions on exact PR head Passed
Open-PR overlap scan No confirmed overlapping hunks; 31 comparisons were inconclusive because those candidate PRs conflict with the base. I manually checked the relevant shared files in #12548, #12828 and #12764; their overlapping evaluator/test/documentation changes are in separate cases or entries.
Hosted checks Windows, Ubuntu/Windows relinker, relinker ASan, conventions, eligibility, labels and report passed. Linux, register-context and write-watch were skipped. Both macOS relinker jobs were pending when checked.
Author-reported focused tests 63/63 on main and the new head, plus the two-target blend regression on both; same Windows/RTX 3080 environment, no VUIDs reported. Not independently run.
Local build/tests Not run; no build performed
Unedited output
git diff --check 8c8b9986204d5b1cbb23847b363df00ae832ec9c...74952faffa809977ec9b690d38dfbe95f4bdc770
(no output; exit status 0)

git merge-tree --write-tree 8c8b9986204d5b1cbb23847b363df00ae832ec9c 74952faffa809977ec9b690d38dfbe95f4bdc770
c2c1c5de3736686f39aace3ea02a5f3ccd05257b

python3 tools/check_conventions.py --base 8c8b9986204d5b1cbb23847b363df00ae832ec9c --head 74952faffa809977ec9b690d38dfbe95f4bdc770
All conventions checks passed.

python3 tools/pr_overlap.py --branch 74952faffa809977ec9b690d38dfbe95f4bdc770 --base main --repo boykopovar/AnyPS5 --jobs 16
<!-- pr-overlap -->
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

| Pull request | Shared files not compared |
|---|---|
| [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `docs/dev/debt/shader.md` |
| [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 5609](https://www.github.com/boykopovar/AnyPS5/pull/5609) | `core/shader/recompiler/Optimization/src/SrtWalker/SrtEvaluator.cpp` |
| [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 6488](https://www.github.com/boykopovar/AnyPS5/pull/6488) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 6924](https://www.github.com/boykopovar/AnyPS5/pull/6924) | `docs/dev/debt/shader.md` |
| [PR 7392](https://www.github.com/boykopovar/AnyPS5/pull/7392) | `docs/dev/debt/shader.md` |
| [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp` |
| [PR 7684](https://www.github.com/boykopovar/AnyPS5/pull/7684) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 7922](https://www.github.com/boykopovar/AnyPS5/pull/7922) | `docs/dev/debt/shader.md` |
| [PR 8004](https://www.github.com/boykopovar/AnyPS5/pull/8004) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 9020](https://www.github.com/boykopovar/AnyPS5/pull/9020) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 9335](https://www.github.com/boykopovar/AnyPS5/pull/9335) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 9356](https://www.github.com/boykopovar/AnyPS5/pull/9356) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` |
| [PR 9387](https://www.github.com/boykopovar/AnyPS5/pull/9387) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 9748](https://www.github.com/boykopovar/AnyPS5/pull/9748) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 9889](https://www.github.com/boykopovar/AnyPS5/pull/9889) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 9897](https://www.github.com/boykopovar/AnyPS5/pull/9897) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp` |
| [PR 10193](https://www.github.com/boykopovar/AnyPS5/pull/10193) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp` |
| [PR 10233](https://www.github.com/boykopovar/AnyPS5/pull/10233) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 10547](https://www.github.com/boykopovar/AnyPS5/pull/10547) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` |
| [PR 10652](https://www.github.com/boykopovar/AnyPS5/pull/10652) | `docs/dev/debt/shader.md` |
| [PR 10757](https://www.github.com/boykopovar/AnyPS5/pull/10757) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` |
| [PR 11351](https://www.github.com/boykopovar/AnyPS5/pull/11351) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` |
| [PR 11551](https://www.github.com/boykopovar/AnyPS5/pull/11551) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` |
| [PR 12324](https://www.github.com/boykopovar/AnyPS5/pull/12324) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` |
| [PR 12548](https://www.github.com/boykopovar/AnyPS5/pull/12548) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/SrtWalker/SrtEvaluator.cpp`<br>`core/shader/recompiler/Optimization/src/SrtWalker/SrtInstructionPredicates.cpp`<br>`docs/dev/debt/shader.md` |
| [PR 12764](https://www.github.com/boykopovar/AnyPS5/pull/12764) | `docs/dev/debt/shader.md` |
| [PR 12828](https://www.github.com/boykopovar/AnyPS5/pull/12828) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` |


gh pr checks 13149 --repo boykopovar/AnyPS5
linux\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906528372
register-context\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906527454
relinker (ubuntu-latest, g++)\tpass\t2m43s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526464
relinker (windows-latest, g++)\tpass\t7m20s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526407
windows\tpass\t4m47s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526357
write-watch\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906527937
relinker-asan\tpass\t2m41s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526436
relinker (macos-latest, clang++)\tpending\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526467
relinker (macos-latest, clang++, x86_64)\tpending\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526413
conventions\tpass\t13s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774250/job/123906463794
eligibility\tpass\t7s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906464931
labels\tpass\t7s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007774317/job/123906502619
report\tpass\t51s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41007775466/job/123906463951

Findings

Blocking

None on the current head. The earlier multi-target finding applied to the stale head 6bf492e804cefd0ef70ab4f4a062aeaa5eeed02d; this head has no changes to State.cpp or the recompiler merge-state files, and the author reports that the two-target regression test passes on main and this branch.

Non-blocking

No further issue found in the reviewed changes. Linux product/specialized jobs were skipped, macOS relinker checks were pending, and GPU-focused tests were not independently run here.

Sources

Not verified

I did not run a local build, CTest, Linux product tests, console behavior, or GPU validation. The 63/63 tests and the two-target blend test are the author's report, not a local run. The two macOS relinker jobs were still pending at the CI check snapshot.

@MarcZX10

Copy link
Copy Markdown
Contributor

Formatting correction — CI output

The review is approved on the current head; I corrected the collapsed check excerpt because its separators were shown as literal text instead of tabs.

linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906528372
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906527454
relinker (ubuntu-latest, g++)	pass	2m43s	https://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526464
relinker (windows-latest, g++)	pass	7m20s	https://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526407
windows	pass	4m47s	https://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526357
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906527937
relinker-asan	pass	2m41s	https://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526436
relinker (macos-latest, clang++)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526467
relinker (macos-latest, clang++, x86_64)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906526413
conventions	pass	13s	https://github.com/boykopovar/AnyPS5/actions/runs/41007774250/job/123906463794
eligibility	pass	7s	https://github.com/boykopovar/AnyPS5/actions/runs/41007774550/job/123906464931
labels	pass	7s	https://github.com/boykopovar/AnyPS5/actions/runs/41007774317/job/123906502619
report	pass	51s	https://github.com/boykopovar/AnyPS5/actions/runs/41007775466/job/123906463951

@oneandonlydean oneandonlydean self-assigned this Oct 30, 2026
@TechLevelZero

TechLevelZero commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 74952fa merged onto main 73f4f7e · tested 2026-10-31 20:33 UTC · 33 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,336 passed · 4 failed (0 new, 3 also fail on main, 1 unstable on main) · 48 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,388 of 3,072 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (878 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_graphics_maps_fallback 30.1 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_submit_progress: failed in 8 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_submit_progress
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (3 IDs in 387 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (387 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 379 more
VUID-vkCmdCopyImage-srcImage-01548 (12 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 4 more
VUID-vkCmdCopyImage-srcImage-01551 (12 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 4 more
Skipped (48)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or plat
Reproduce
git fetch origin 74952faffa809977ec9b690d38dfbe95f4bdc770 73f4f7e06e4f210a8c6570e335fd654dc0a86134
git checkout 73f4f7e06e4f210a8c6570e335fd654dc0a86134 && git merge --no-ff 74952faffa809977ec9b690d38dfbe95f4bdc770
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added shader core/shader docs agc libSceAgc* labels Oct 30, 2026
@RNK123

RNK123 commented Nov 1, 2026

Copy link
Copy Markdown

Independent Linux / AMD RADV focused validation of head 74952faffa809977ec9b690d38dfbe95f4bdc770, merged without conflicts onto main dc9dc7eaaeaf99b1c491d426e68bb999def3da16. Tested merged tree: 99a81bef7a2a15111f15a4f16c60046651625c9a (temporary uncommitted merge; no source changes added).

Host: CachyOS Linux 7.3.1-1-cachyos, Intel Core i5-12400F, GCC 16.2.1, Release, BUILD_TESTING=ON, CTest 4.4.5. GPU: AMD Radeon RX 9060 XT (1002:7590, RADV GFX1200, subgroup 64), Mesa 26.2.5-arch3.1, Vulkan 1.4.354. Khronos validation layer 1.4.363.

Method: Same machine, build directory and exact CTest selection on both trees, serial --parallel 1 --repeat until-fail:3 --timeout 60 -V, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. The locally installed layer was exposed through VK_LAYER_PATH; VK_LOADER_DEBUG=layer confirmed its insertion in both logs (15 insertions each). Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS. GPU selection messages identify the Radeon above, not a software device.

Tree Focused entries passed Individual executions passed Skipped / failed VUID- / SYNC-HAZARD-
main dc9dc7eaae 66/66, each 3/3 198/198 0 / 0 0 / 0
Same main + head 74952faffa 66/66, each 3/3 198/198 0 / 0 0 / 0

The selection covers all entries invoking agc_shader_memory_tests (21), agc_driver_cmask_fast_clear_tests (1), agc_driver_graphics_tests (40), agc_driver_sample_multisample_target_tests (3), plus agc_driver_unclamped_normalized_blend_tests (1). These are the four executable families named in the description and the separate multi-target regression, enumerated on the newer main, hence 66 entries rather than the earlier 63 plus one. The PR's added shader-memory checks run as part of agc_shader_memory.

Existing warnings, not hidden: Both logs contain 30 Undefined-Value-ShaderOutputNotConsumed-DynamicRendering validation warnings, all from agc_driver_unclamped_normalized_blend (10 per execution): fragment output location 0 is unused when color attachment 0 is null. Warning identifiers and counts match; no validation errors or new warning identifiers were observed. Both trees report 2 draws blending two targets each on all three executions of that regression.

Scope: This is focused regression/build coverage, including real GPU rendering tests, not a game bring-up or benchmark. Some entries, including the new runtime-value checks, are CPU-side checks. I did not obtain or replay the captured PPSA02015 shader, run the game, or independently establish live GPU behavior of the new scalarized image-table path; the PR's technical-debt caveat remains applicable. No console-equivalence claim.

Equivalent reproducible selection

After building the five targets named above, generate a CTest name list and run it on each tree with the environment described above:

python3 - <<'PY'
import json
import subprocess
from pathlib import Path

targets = {
    "agc_shader_memory_tests",
    "agc_driver_cmask_fast_clear_tests",
    "agc_driver_graphics_tests",
    "agc_driver_sample_multisample_target_tests",
    "agc_driver_unclamped_normalized_blend_tests",
}
data = json.loads(subprocess.check_output(
    ["ctest", "--test-dir", "build-main", "--show-only=json-v1"], text=True))
names = [test["name"] for test in data["tests"]
         if Path(test.get("command", [""])[0]).name in targets]
assert len(names) == 66
Path("radv-focused-tests.txt").write_text("\n".join(names) + "\n")
PY
ctest --test-dir build-main --tests-from-file "$PWD/radv-focused-tests.txt" \
  --parallel 1 --repeat until-fail:3 --timeout 60 --no-tests=error -V

AI-assisted hardware test run (Codex). No additional PR, code changes, or performance claim.

@oneandonlydean
oneandonlydean merged commit b5f7270 into boykopovar:main Nov 1, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs shader core/shader unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants