Repository navigation
Conversation
arcwiser
left a comment
There was a problem hiding this comment.
Reviewed the complete two-file diff and surrounding table-planning/direct-sampler paths at 1aab4aaada. The new canonicalization is appropriately conservative: it is limited to sampler dword 3 with a top-level OR, requires every direct handle consumer to be a sampler-taking image instruction using that same handle, and requires every consumer's memory plan to carry RdnaImageSampleFlagAdjust. A shared ordinary-sample consumer therefore leaves the descriptor unchanged. The recovered operand still goes through the existing scalar-read, record-stride, and source validation, while the regression compares the full output against the unmodified table fixture across all existing record classes.
Local validation: git diff --check f73d791b3df4...HEAD and python tools/check_conventions.py --base f73d791b3df4dcaa773297a93f5ae2c062ee95a3 passed. I could not run the registered GPU target here: this checkout has no initialized submodules or configured build, and check_test_registration.py accordingly reports the missing build/CMakeCache.txt. The PR's paired main/head Vulkan run and separate bindless fixture provide direct coverage of the affected path. I found no blocking issue.
AI-assisted review: yes (Codex); I independently inspected the implementation, regression construction, original sample-adjust rule in #7290, relevant consumers, and local static checks.
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change based on the inspected code; the described regression test covers adjusted sampler table reads.
What I ran
Reviewed head 1aab4aaada5e642ab2caacd4691198b459c90500 from the prepared diff and repository reader context. No tests or build commands were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff review | passed | Two changed files inspected |
| Tests | not run | The PR description reports Windows runs; not independently verified |
Findings
Blocking
None.
Non-blocking
None.
Not verified
No tests, build, or hardware behavior were run. The PR description's reported Windows regression runs were not independently verified. Reviewed files: core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp and core/shader/recompiler/Optimization/src/ResourceTracker.cpp. Excluded files: none listed in the manifest; files.json was not available as a review document.
To get this to a good state
Nothing is required.
|
Confirming on AMD (the PR's "Tested" was left blank): clean fix-toggle, it discriminates. HW: Radeon RX Vega 56 (VEGA10 / GCN5 / gfx900), RADV, Linux (Mesa validation layers enabled) Fix-toggle on
ARM-B fails exactly as the PR describes — the recognizer loses the underlying read and the descriptor goes down the runtime-value path: With the fix the adjusted sampler-table read is preserved and recompiles cleanly on AMD too. No validation errors on ARM A. |
|
Validation datapoint on a third hardware config, PPSA38500 on Windows 11, RTX 3070 (driver 617.42), subgroup size 32. Build: Measured deep into story loading (t=290 s wall, presents flowing at 85-87 per 10 s at capture time):
Compile activity genuinely happens in the fixed build (28 shader-disk-cache write events, cold-cache boot recompiling successfully), so this is not a failure-to-attempt artifact — the shaders prepare. Consistent with eliasbruno124-dev's RTX 3060 Laptop measurement of the same three captured failing pixel shaders (our One deployment note in case anyone else validates on Windows and sees "no change": the patched The remaining stop in this title is the guest-side freeze (tracked in #27759 and the spinoff), which this does not claim to fix — eliasbruno124-dev's fixed builds still die to the title watchdog at 519-1179 s, and our own confirmation run is in progress now. |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
|
The macos PPSA38500 datapoint (from the closed twin #27856 / eliasbruno124-dev): cherry-picking the same dword-3 strip cleared all 308 A re-run of the failed macos job should be enough if |
|
A PPSA38500 (01.002.001) run with and without this, from past the loading screens: in the opening scene the refusal is fatal when the shader is first used. Windows 11 26200, RTX 4080 16 GB, NVIDIA 621.40. Stack as in discussioncomment-20041921 (
One boot without. Edited 1 Dec: I first called this a compute dispatch; stage 5 is Fragment in AI-assisted: yes. Claude Code ran the boots and counted the lines. |
Plyxen
left a comment
There was a problem hiding this comment.
I read the diff at 1aab4aaada. Windows 11, GCC 15.2, merged into main at daa61711afe together with other open PRs (so not an isolated build), with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation on an RTX 5080 (621.24) and a Radeon iGPU (26.11.2).
agc_driver_image_table: pass on both GPUs. The loader log shows the layer inserted and no "was not found" line, and neither run has aVUID-orSYNC-HAZARDline.- Control (the same tree with only this PR's source change taken out): it fails with "GetSamplerResource dword 0 is not a valid runtime value".
The red check is macOS frame_capture_minimize_replay, which main has fixed since.
Not checked: a title.
AI-assisted: yes (Claude Code)
|
A replay data point, results only: the dumped request of PPSA38500's Fragment shader
This is the preparation step only; I have not yet run the title with the change. |
ligmaSec
left a comment
There was a problem hiding this comment.
Could the image-table fixture use the same sampler handle in both an adjusted and an ordinary sample? The added test only exercises the all-adjusted case. The mixed-use fixture would protect the new handle.Uses() gate against stripping a dword-3 expression when an ordinary use still needs it.
Source review at 1aab4aaada. The head trial-merges onto 6ef4f2f73b. Focused Linux checks are queued.
AI-assisted: yes.
|
Thanks for the suggestion. Added the regression in 6347478. The image-table fixture now uses one sampler for an adjusted sample and an ordinary sample, and combines both results. The unmodified shared sampler returns the reference texels. The mixed-use descriptor with a reserved-bit expression is rejected by resource analysis, so that expression cannot be silently stripped for the ordinary sample. The focused case passed on Windows 11 with an RTX 3080 Laptop and Vulkan validation enabled, with zero skips, validation errors or sync hazards. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The reviewed changes at head 6347478b25acb6d5a23ffdb5940eff1e940ea3a0 preserve sampler table reads for adjusted sampling and retain validation when a sampler also has an ordinary sample use.
What I ran
Reviewed every changed line in both files listed under reviewed in files.json, plus the relevant table-planning and sampler-handling code at the pinned head. No tests or builds were run.
Reader commands
env -u ANYPS5_READ_LOG python3 repo_read.py search TryMakeTableColumn core/shader/recompiler/Optimization/src/ResourceTracker.cpp
env -u ANYPS5_READ_LOG python3 repo_read.py search GetSamplerResource core/shader/recompiler/Optimization/src/ResourceTracker.cpp
env -u ANYPS5_READ_LOG python3 repo_read.py cat core/shader/recompiler/Optimization/src/ResourceTracker.cpp 1485 1550
env -u ANYPS5_READ_LOG python3 repo_read.py cat core/shader/recompiler/Optimization/src/ResourceTracker.cpp 2920 2970
Results
| Check | Result | Note |
|---|---|---|
| Changed source review | passed | Both reviewed files and all changed lines inspected |
| Runtime tests | not run | GPU execution tests were not run |
| Build | not run | No compilation performed |
Negative control
The test change includes a mixed-use case that expects an ordinary sampler use to remain rejected; I did not run that GPU test or its negative control.
Findings
Blocking
None.
Non-blocking
None.
Sources
The table sampler adjustment is guarded by each handle use's sampling flags, then canonicalizes only the sampler dword expression (ResourceTracker.cpp at the reviewed head). Table columns use that result for sampler dword 3 (ResourceTracker.cpp at the reviewed head). The regression adds adjusted-only and mixed ordinary/adjusted cases (ImageTable.cpp at the reviewed head).
Not verified
The Windows and Linux GPU results in the PR description are author-reported and were not reproduced. No other files were excluded by the manifest; both changed files were read.
To get this to a good state
Nothing is required.
|
Windows test at head Setup: Windows 11 Pro, RTX 4080 SUPER (driver 621.14), WinLibs GCC 15.2.0, Release, Ninja. Head merged onto
|
Use the iterator name verified by B-Howell in boykopovar#27779.
|
Thanks for testing the merge, B-Howell. I used your |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The reviewed change safely removes reserved sample-adjust bits from table-backed sampler reads only when every direct consumer uses adjusted sampling.
What I ran
Reviewed head dd0f964d16d7314824aa72e3d35490073136280d. No merged-preview check was run. I inspected the prepared diff and full text for both changed files. The pinned reader search found the canonicalization helper, but its logging step failed because the run folder is read-only. No tests or builds were run.
python3 repo_read.py search canonicalizeSampleAdjustDword3
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed source | passed | Both changed files read |
| Tests and build | not run | No executable checks run |
| Pinned reader | failed | Search result returned; logging failed |
Negative control
The mixed-use regression test includes an ordinary-sampling control and checks that mixed adjusted and ordinary uses are rejected. It was not run, so whether the new test fails under a negative control was not confirmed.
Findings
Blocking
None.
Non-blocking
None.
Sources
- Sampler table handling at the reviewed head
- Adjusted and mixed-use regression coverage at the reviewed head
Not verified
The reported Windows and Linux GPU runs were not independently confirmed. No test execution, build, merged-preview check, or console behavior was verified. Both files listed under reviewed in files.json were read; files.json lists no excluded files.
To get this to a good state
Nothing is required.
|
Windows retest at head Setup: Windows 11 Pro, RTX 4080 SUPER (driver 621.14), WinLibs GCC 15.2.0, Release, Ninja. Head merged onto
|
|
Tested
GPU (software Vulkan): 5 GPU tests (AGC, shader recompiler) passed twice on Mesa lavapipe (Mesa 25.2.8-0ubuntu0.24.04.5 (LLVM 20.1.2)) on a GitHub-hosted Ubuntu 24.04 runner, with the Khronos validation layer on and the shader cache off, alongside main Not covered: GPU hardware. lavapipe runs Vulkan on the CPU, so this says nothing about how real GPU drivers handle the changed paths. AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
Plyxen
left a comment
There was a problem hiding this comment.
Re-verified head dd0f964 on Windows 11 with GCC 15.2, applied alone to main 484b036. The two new commits extend ImageTable.cpp with the mixed-use case. Run with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and VK_LOADER_DEBUG=layer (layer 1.4.363).
agc_driver_image_table |
main | this PR | PR tests, ResourceTracker.cpp reverted |
|---|---|---|---|
| RTX 5080 (621.24) | pass | pass | fails |
| AMD Radeon iGPU (26.11.2) | pass | pass | fails |
The negative fails with "GetSamplerResource dword 0 is not a valid runtime value" on the adjusted sample. Each log shows the loader inserting the layer, and none has a VUID-.
Not checked: a title.
AI-assisted: yes (Claude Code)
…opovar#22027 boykopovar#27779 boykopovar#26210; analyzer and run archive boykopovar#27821 fixes upstream issue boykopovar#27705 (PPSA38500 REWIND submits waiting for every queued preparation). boykopovar#26196 keeps deferred large pipelines off the commit thread, boykopovar#22027 keeps waiting on long GPU batches, boykopovar#27779 fixes the GetSamplerResource runtime-value refusals (336 per run), boykopovar#26210 narrow-subgroup detection. boykopovar#25404 was tried and backed out (written against an older SPIR-V emitter API). tools/ppsa/analyze_run.py summarizes a run; the runner archives each run.
What
A Windows loading draw failed with
GetSamplerResource dword 0 is not a valid runtime value. The shader read a sampler from an indexed table and ORed a lane mask into bits 12–29 of its fourth word before an adjusted image sample. The table recognizer lost the underlying read and sent the descriptor down the runtime-value path.The table recognizer now uses the existing sample-adjust rule. It removes an OR operand only when its possible bits are confined to the reserved field and every consumer of the handle uses adjusted sampling. The selected entry still supplies its filter, LOD and border settings. Original sample-adjust rule
Tested
On Windows, the image-table regression dispatches six workgroups across float, unsigned and signed texture records. The control on main at
30cb03d5d47reproduced the loading error. With the change, its complete GPU readback matched the unmodified table fixture. The Khronos validation layer was active in both runs, with zero validation errors and zero skipped cases.A separate pixel-draw fixture on the bindless development branch selects two different LOD biases from one sampler table. Both the descriptor-set and bindless controls reproduced the error. With the change, both modes produced the expected mip stripe at all 2,048 pixels. In the Windows loading draw that previously failed, the planner recovered a four-word sampler column with 128 records and reported zero malformed records. Bindless development branch
On Linux with RADV and a Radeon RX Vega 56,
agc_driver_image_tablepassed 3/3 runs at1aab4aaawith no validation errors reported. Restoring the baseResourceTracker.cppwith the same test reproduced the runtime-value error. Independent verification by tablefrogpillowChecklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Summary by CodeRabbit