Repository navigation
Conversation
Follow-up to boykopovar#27779. When dword 3 of a table S# is stripped for an _a sample, the ORs taken off are recorded in the column plan and the planned-read check accepts them as uses that feed the table handle, so the table read stays planning-only instead of a GPU memory access. Dword 3 is also stripped before ResolveInvariantPhi, so OR(phi(read), v) resolves to the read; the strip after it stays for an OR behind a phi. verifyAdjustedTableSamplerDword3 plans an image_sample_a whose table S# dword 3 also holds a ballot, with all table reads planning-only, and still refuses the plain image_sample form.
The nested table check now follows recorded reserved-bit adjustments to the sampler handle. The sampler reads stay planning-only when every use goes through the nested table.
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
|
Confirming on Radeon RX Vega 56 (GCN5/gfx900), RADV Linux with a clean fix-toggle — it discriminates. Build: fresh dir from PR head Fix-toggle on
ARM-B fails on exactly the case this PR fixes: plans adjusted samplers behind runtime buffer descriptors No validation errors on ARM A. |
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this; the points below are optional.
What I ran
Reviewed head 067471194ffa0a1ff72a9a8424ab9c815f6907c5. I inspected the prepared diff and the changed code around the affected planner and regression tests using repo_read.py; I did not run tests or a build. No merged preview was run.
Commands:
repo_read.py cat core/shader/recompiler/Optimization/src/ResourceTracker.cpp 240 370
repo_read.py cat core/shader/recompiler/Optimization/src/ResourceTracker.cpp 850 1000
repo_read.py cat core/shader/recompiler/Optimization/src/ResourceTracker.cpp 2400 2505
repo_read.py cat core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp 6865 6930
repo_read.py cat core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp 2075 2130
Results
| Check | Result | Note |
|---|---|---|
| Diff and source review | passed | All three changed files reviewed |
| Author-reported checks | not run | Windows tests and validation were reported by the author |
| Local tests and build | not run | No compilation or execution performed |
Negative control
The author reports that the fail-before run remains unverified. I did not run a negative control.
Findings
Blocking
None.
Non-blocking
None.
Sources
- The planner limits descriptor-word canonicalization to sampler handles used only by adjusted sampling operations and follows stripped adjustment nodes when checking table-read uses: ResourceTracker.cpp at the reviewed head and table planning.
- Regression coverage checks planning-only table reads and compares adjusted sampling output with the original: ShaderMemory.cpp and ImageTable.cpp.
Not verified
I did not run the reported Windows tests or Vulkan validation, confirm the physical GPU behavior, or verify the fail-before behavior. The manifest lists three reviewed files and no excluded files; I inspected the changed hunks and relevant surrounding code, not the full contents of the large test files.
To get this to a good state
Nothing is required.
|
Windows at this head ( Setup:
The added test lines are not inside a platform guard. AI-assisted: yes. |
THEMANnt
left a comment
There was a problem hiding this comment.
Could the regression include one sampler used by both an adjusted sample and an ordinary sample? The planner strips the clamp only when every use is adjusted, but the current positive and negative cases use separate single-consumer handles. A mixed-use case would catch a future change that strips the clamp as soon as any one use is adjusted.
|
AI-assisted: yes (FreeBuff). Independent Blackwell validation of 0674711 on NVIDIA GeForce RTX 5070 Ti (driver 621.47) with Khronos Validation Layer 1.4.363. Validated
Restoring the PR version and rebuilding returned both tests to PASS. No validation errors were reported on the PR arm. |
What
A nested sampler-table read could be rejected when an adjusted sample ORed reserved bits into the sampler’s fourth word. The nested-table check now follows adjustments already proven safe through to the sampler handle. The regression compares the nested table’s sampled output with and without the adjustment.
Part of #28913.
Tested
Windows 11 Pro, WinLibs GCC 15.2.0 Release.
agc_driver_nested_sampler_tableandagc_shader_bindlesspassed (2/2). The Vulkan loader inserted Khronos validation 1.4.363 and reported 0 VUID on the change. The fail-before run remains unverified. Conventions, debt fold, and whitespace passed for the nested-table patch over #27947 andmain. The revised nested-table check is in067471194ff.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)Created with GPT-6.2 Sol in Codex.
Summary by CodeRabbit