fix(shader): plan a table S# whose dword 3 carries _a adjust values #28132
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28132"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by faycalbaklouti on 2026-11-28T17:31:56Z.
What
Table samplers with
_aadjustments may OR valid adjustment bits into descriptor dword 3. Plan the record read for adjusted uses without allowing a plain sample of the same IR handle to borrow it. If canonicalization leaves dword 3 unchanged, both uses still share a column. Both visit orders are covered.Tested
100% tests passed, 0 tests failed out of 11 (
100275ecb9); 0% tests passed, 2 tests failed out of 2 (ae5024fed9+ mixed-use fixtures). The source-only conventions check passed. No physical GPU or full suite run is claimed for the review follow-up.Checklist
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)Independent checks reported in this thread apply to the earlier change: JJenkx ran the 14 ImageTable cases three times on the reviewed Windows head; hamdanpor-ctrl reported three 54/54 focused Windows GPU runs with zero VUID lines on a base plus the original diff. The wider GPU comparison had failures and a timeout; neither report exercises
100275ecb93d.This review update keeps the tested PR ancestry. A Git trial merge with
9a1d772cf1is clean; this is not a test of the merged tree. #27779 and its stacked follow-up #27947 overlap the sampler fix; #27856 is closed unmerged. #20248 needs the buffer and sampler-adjust flags kept distinct if integrated. No combined-run or nested-heap fix is claimed.Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T17:39:05Z.
Review: COMMENTED
Actionable comments posted: 1
4f347291-bfae-4dd7-bd98-e29d38d3aa18Reviewing files that changed from the base of the PR and between
ae0df0e03eandae5024fed9.core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppdocs/dev/debt/changes/sampler-table-adjust-dword3.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T18:01:18Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: make sampler table planning handle-adjust aware when one handle is used by both adjusted and plain samples.
What I ran
Reviewed head
ae5024fed96c01b9861b363ca8456d1e74789fad. No commands or tests were run; repository context was read throughrepo_read.py.Results
Findings
Blocking
core/shader/recompiler/Optimization/src/ResourceTracker.cpp:2408—PlanTableColumncaches by handle alone and returns immediately for an already planned handle, so the first sample’ssampleAdjustflag controls planning for every later use. If a plain sample is visited first, planning reads the ORed dword 3 unchanged and can still reject the table column. If an adjusted sample is first, the plan records the canonicalized dword 3 for a later plain sample too. Track planning by handle and adjustment mode, or otherwise ensure the column plan represents both uses correctly. The added test only exercises adjusted samples and does not cover a mixed-use handle.Non-blocking
None.
Not verified
ctestand Vulkan replay were not run independently.core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp,core/shader/recompiler/Optimization/src/ResourceTracker.cpp, anddocs/dev/debt/changes/sampler-table-adjust-dword3.md(full text was included for all three changed files).files.jsonwas not available through the review reader.To get this to a good state
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T18:19:40Z.
Review: APPROVED
Reviewed — looks good
The change plans adjusted sampler table records by removing dword 3 bits 12–29 from the planned read; I found no blocking defect in the reviewed code.
What I ran
Reviewed head
100275ecb93df516c5d299768fbf6c7891888340against the prepared diff and pinned source usingrepo_read.pysearches and targeted reads. No merged preview was run. No tests or builds were run.Results
Negative control
A negative control could not be run because no tests were executed.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
No tests or builds were run. Physical-console behavior of the
_aadjust values and the description’s extended replay claims were not independently verified. Relevant changed ranges were read for all five files listed as reviewed infiles.json;ShaderMemory.cppwas too large for inclusion in the review folder and was read through the pinned reader. No files were excluded by thefiles.jsonexclusion rules.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T08:41:50Z.
Review: APPROVED
Reviewed — looks good
The reviewed change correctly plans adjusted sampler table reads while keeping plain and adjusted uses of a shared handle separate.
What I ran
Reviewed head
f5f4cc4d0608ef710d32faa3c5ad3ff9c8bf39a8and the prepared diff. I usedrepo_read.pyto inspect the changed source ranges and targeted context; no tests or builds were run. The author reports the source-only conventions check passed, but I did not run it.Results
Negative control
Could not run a negative control because I did not execute the regression tests.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
No tests, build, physical GPU behavior, or full suite were run. All files listed under
reviewedinfiles.jsonwere inspected;files.jsonlists no excluded files. For the largeShaderMemory.cpp, I read the changed lines and relevant surrounding context throughrepo_read.py.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T20:26:35Z.
Review: COMMENTED
The tracker tests cover plain and adjusted samples sharing a handle in both orders. The execution fixture runs the two forms in separate dispatches and compares their sampled values. Could a Vulkan case put both forms from the same unmodified table S# into one shader and verify both outputs, using the existing accepted mixed-handle case as the basis? That would cover shared table binding through materialization and execution.
Source review at
f5f4cc4d06. Paired Vulkan execution is pending.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.