Skip to content

fix(shader): preserve adjusted sampler table reads during Windows loading - #27779

Open
lgqdaxia wants to merge 3 commits into
boykopovar:mainfrom
lgqdaxia:codex/track-adjusted-sampler-tables
Open

lgqdaxia wants to merge 3 commits into
boykopovar:mainfrom
lgqdaxia:codex/track-adjusted-sampler-tables

Conversation

@lgqdaxia

@lgqdaxia lgqdaxia commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

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 30cb03d5d47 reproduced 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_table passed 3/3 runs at 1aab4aaa with no validation errors reported. Restoring the base ResourceTracker.cpp with the same test reproduced the runtime-value error. Independent verification by tablefrogpillow

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: The Game
  • GPUs tested: NVIDIA GeForce RTX 3080 Laptop GPU, NVIDIA 621.14, Windows 11 Pro build 26300 and AMD Radeon RX Vega 56, RADV on Linux
  • AI-assisted: yes

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of table-backed samplers used with adjusted image sampling, while keeping ordinary sampler behavior unchanged.
  • Tests
    • Added coverage confirming that an adjusted sampler instruction preserves valid-record output and that mixing adjusted and ordinary samples is rejected with a runtime-value error.

@arcwiser arcwiser 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 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.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Sampler table adjustment

Layer / File(s) Summary
Canonicalize sampler dword 3 and test adjusted shader
core/shader/recompiler/Optimization/src/ResourceTracker.cpp, core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
The tracker canonicalizes sampler dword 3 when all handle uses meet the sample-adjustment conditions. Tests check that adjusted samples preserve output without faults and that mixed adjusted and ordinary samples produce the expected runtime-value error.

Possibly related PRs

  • boykopovar/AnyPS5#27947: This PR changes the column plan and phi ordering for the same sampler dword 3 handling.
  • boykopovar/AnyPS5#28132: This PR changes mixed-use handling for shared sampler handles on the adjusted-sampler path.
  • boykopovar/AnyPS5#27856: This PR changes table sampler dword 3 canonicalization and planning for adjusted sampling.

Suggested reviewers: arcwiser, marczx10

Change: Bug fix

Merge Risk: Minimal · up to dd0f9

The change stops indexed sampler-table reads from being misclassified as runtime values when an adjusted sample applies a reserved-bit mask, which previously caused the loading draw to fail. It applies only when every use of the handle is an adjusted sample, so ordinary samples keep their existing validation. New tests cover both the adjusted and mixed-use cases, and the author and other testers report passing runs. No merge-blocking risk is evident.

Security architecture risk: Minimal · up to 63474

The shader recompiler can now recognize more adjusted sampler-table reads without changing the public interface or relaxing table validation. Handles shared by adjusted and ordinary samples keep their existing behavior.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 10b447c9-c023-42ba-8cbe-f9558c3b1704
Commits

Reviewing files that changed from the base of the PR and between 6347478 and dd0f964.

Files selected for processing: 1

  • core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
Files skipped from review as they are similar to previous changes: 1

  • core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@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 — 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.

@tablefrogpillow

Copy link
Copy Markdown
Contributor

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)
Build: fresh dir from PR head 1aab4aaa, base f73d791b, BUILD_TESTING=ON -DANYPS5_AGC_EXECUTION_TESTS=ImageTable

Fix-toggle on agc_driver_image_table (the base test runs RunTests, which holds the new "adjusted sampler table" case):

arm result
A — PR head PASS (3/3 re-runs)
B — revert ResourceTracker.cpp to base, rebuild FAIL

ARM-B fails exactly as the PR describes — the recognizer loses the underlying read and the descriptor goes down the runtime-value path:

ShaderRecompiler::Recompile: GetSamplerResource dword 0 is not a valid runtime value;
chain: ReadConstBuffer@pc=0x28(GetBufferResource(...), IMul32(ReadConstBuffer@pc=0x1c(..., ShiftLeftLogical32(GetBuiltin(...), Immediate)), Immediate))

With the fix the adjusted sampler-table read is preserved and recompiles cleanly on AMD too. No validation errors on ARM A.

@akkadbakkad89

Copy link
Copy Markdown
Contributor

Validation datapoint on a third hardware config, PPSA38500 on Windows 11, RTX 3070 (driver 617.42), subgroup size 32.

Build: main-adjacent composite carrying #27590 #27821 #27648 #27872 #27684, this PR, and 00ace24e46 (the follow-up parts dean asked meh7an to move here — both were in the tree already, so this covers the combined effect), RelWithDebInfo with symbols.

Measured deep into story loading (t=290 s wall, presents flowing at 85-87 per 10 s at capture time):

metric before (same machine, pre-fix builds) with the fix
GetSamplerResource dword 0 refusal lines 308 distinct shaders, every boot 0
GetImageResource refusals ~5 0
remaining pipeline deferrals (same) 5 distinct shaders, all VGT_SHADER_STAGES_EN=0x2030 unsupported geometry assembly — the separate known class, not this family

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 shader_105fd*.prepare.req corpus overlaps those addresses).

One deployment note in case anyone else validates on Windows and sees "no change": the patched .prx outputs are built by the libs target, which plain ninja does not build (no ALL on the custom target) — a bare ninja relinks libs/unpatched/*.prx but never refreshes the patched copies the runtime actually loads. I measured "308 unchanged" twice before discovering my boots were running a stale driver; ninja libs is required after the build.

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.

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 28242 core/shader/recompiler/Optimization/src/ResourceTracker.cpp L874

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 6280 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 6488 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 7085 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 7642 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 7684 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 9633 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 9790 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 9852 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 9897 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 9969 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 10193 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 13928 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 13929 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 14032 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 14853 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 14944 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 15555 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 18106 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 18107 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 21745 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 21763 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 22424 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 23242 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 26012 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 28176 core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 28469 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
PR 28470 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
PR 28487 core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp

@notaxeltv

Copy link
Copy Markdown
Contributor

The macos relinker red X on the latest Build run is unrelated to this change: the only failing test is frame_capture_minimize_replay (1023/1024 passed). Windows / Ubuntu relinker / ASAN / conventions are green.

PPSA38500 datapoint (from the closed twin #27856 / eliasbruno124-dev): cherry-picking the same dword-3 strip cleared all 308 GetSamplerResource dword 0 deferrals on that title's Fragment shaders; the remaining stop moved to the #27759 / #27830 class. So landing this (with #27947 on top) is what unblocks the post-settings freeze family, not the helper-free ReadLane gate (#28242).

A re-run of the failed macos job should be enough if frame_capture_minimize_replay is flaky.

@anova44

anova44 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

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 (main 1f27e2abfa + the open PRs listed there, #20519 lazy with mesh pipelines through the heap), APS5_OUTPUT_RESOLUTION=1920x1080; the title's own watchdog is lengthened locally.

  • Without: the boot shows 19 world frames, then at minute 39 it ends on the shader's first use (ReportPreparedAtUse ... Shader 0x1060741a00 stage 5 ... preparing it at use, then): [gpu] driver failure: shader 0x1060741a00 stage 5: ShaderRecompiler::Recompile: GetSamplerResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x000005ac(GetBufferResource(.... 12 DeferPipelineStage lines carry the same message earlier in that boot.
  • With 1aab4aaada merged on top (clean): no line with that message in three boots, which show 21, 17 and 19 world frames. Two of them end on other stops (fix(agc): render DCC-compressed 4_4_4_4 unorm color targets #28311's and fix(agc): blend RGBA4 targets during PPSA38500 loading on Windows #28197's cases, reported there) and I stopped the third.

One boot without. Edited 1 Dec: I first called this a compute dispatch; stage 5 is Fragment in ShaderRecompiler::ShaderStage, so I have taken that out. And the same shader is reached again with the PR: each boot with it (six by now) logs the ReportPreparedAtUse ... Shader 0x1060741a00 stage 5 line once, with no refusal after it, and goes on; the longest showed 95 world frames.

AI-assisted: yes. Claude Code ran the boots and counted the lines.

@Plyxen Plyxen 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.

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 a VUID- or SYNC-HAZARD line.
  • 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)

@milescoviello

Copy link
Copy Markdown
Contributor

A replay data point, results only: the dumped request of PPSA38500's Fragment shader 0x1060741a00, whose preparation fails on main, replayed with agc_shader_replay --prepare (Linux, GCC), built from main 700fae9438 and from main merged with this PR's head 1aab4aaada (22c5ad7236):

  • main: resource analysis failed: GetSamplerResource dword 0 is not a valid runtime value; the sampler's dword 0 comes from a constant-buffer read (ReadConstBuffer@pc=0x5ac) whose offset comes from another one (@pc=0x590).
  • With this PR: the shader prepares (prepared: 482058 SPIR-V words).

This is the preparation step only; I have not yet run the title with the change.

@ligmaSec ligmaSec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@lgqdaxia

lgqdaxia commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

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 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 — 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.

@B-Howell

B-Howell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Windows test at head 6347478b25ac: does not compile on current main; passes with a one-line rename.

Setup: Windows 11 Pro, RTX 4080 SUPER (driver 621.14), WinLibs GCC 15.2.0, Release, Ninja. Head merged onto main 0b0c56dec568 (merges cleanly).

  • The merge does not build: ImageTable.cpp:1130: error: conflicting declaration 'void* tail'. The new mixed-sampler block declares const auto tail in RunTests, and main already has void* tail later in the same function (added by fix(agc): refuse image-table entries whose base address is not mapped #27295 after this branch's base f73d791b3df). Renaming the new iterator (I used adjustedTail, three uses) fixes it.
  • With that rename: agc_driver_image_table and agc_driver_image_table_variants pass 2/2, 3 runs.
  • Control (ResourceTracker.cpp from main, tests kept): agc_driver_image_table fails with "GetSamplerResource dword 0 is not a valid runtime value".
  • With ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation (loaded, never "not found"): 0 VUID- on main and on the PR.

@lgqdaxia

lgqdaxia commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for testing the merge, B-Howell. I used your adjustedTail rename in dd0f964d16d7. The two declarations now have distinct names in the merged RunTests.

@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 — 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

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.

@B-Howell

B-Howell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Windows retest at head dd0f964d16d7: compiles now and passes, control fails.

Setup: Windows 11 Pro, RTX 4080 SUPER (driver 621.14), WinLibs GCC 15.2.0, Release, Ninja. Head merged onto main 6572ed3c09a7 (merges cleanly).

  • The tail name clash from my last run is gone: agc_driver_image_table_tests builds as merged, with no edits.
  • Built agc_driver_image_table_tests and the other focused AGC targets (99 ctest entries). 3 runs: 99 of 99 pass every run, including agc_driver_image_table and the agc_driver_nested_image_table* cases.
  • Control (main's ResourceTracker.cpp, the PR's test kept): agc_driver_image_table fails ("GetSamplerResource dword 0 is not a valid runtime value").
  • With ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation (loaded, never "not found"): 0 VUID- on main and on the PR.

@ycbuzi

ycbuzi commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Tested dd0f964d16 merged into main, with the whole ctest suite on each machine below. Nothing fails that does not also fail on main on the same machine.

  • Windows Server 2022 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 99% tests passed, 2 tests failed out of 7616; 99% tests passed, 2 tests failed out of 7616. 2 of the failing tests fail on main too. run
  • Windows Server 2025 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 100% tests passed, 0 tests failed out of 7616; 100% tests passed, 0 tests failed out of 7616. run

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 6d99b6a9f2: no Vulkan validation message appears that main does not also produce. run

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 Plyxen 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-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)

superSniper4576154 pushed a commit to superSniper4576154/AnyPS5 that referenced this pull request Dec 6, 2026
…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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.