feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7395"
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 EagleBearerYS on 2026-10-18T04:33:56Z.
What
#7223 has merged. With #7223, Marvel's Wolverine (PPSA03671) and Ratchet & Clank: Rift Apart (PPSA01474) stopped on the sampler half of the descriptor chain that #7223 resolves for images (#6191):
66702f1cf+ #7223 + local patches, Linux):82f0c9aec+ picks + #7223, Windows):Ratchet & Clank: Rift Apart (PPSA01474), 11-13: this PR got the title past its
pc=0x6b74sampler stop onmain66702f1cf(Tamalero's run, see Tested). On currentmainthe title doesn't stop there. #14636 removed the title'spc=0x62d4GetSamplerResourcerefusal: with #14636's merge reverted,mainf57c971559aborts on it again (dantdmdarealguy's run). Tamalero's run ofmain4e2acc2120with #18522, on RADV withAPS5_MAX_COMPUTE_SPIRV_WORDS=2000000andAPS5_SKIP_REFUSED_DISPATCHES=1(which skips and logs any compute shader whose recompile fails, code), reaches the first gameplay; the only shaders it skipped were two dropped for size (comment).mainstill refuses this PR's shapes: onmainfb542a2b6f, which has #14636, all five of this PR's tests fail 3 of 3 without its code and pass 3 of 3 with it (llvmpipe, a cloud Linux machine).#7223 resolves record → pointer → V# → T# and leaves samplers refused. Its nested table representation, pointer dictionary and limits are what this PR builds on. The PR extends them to samplers and to a one-hop pointer whose low word is merged through a Phi.
This PR's first fix,
fix(shader): refuse nested table entries whose words have other consumers(0df7d3256e), is now in #7223 (d132754dbe, with its authorship). On #7223's earlier head, a nested child whose descriptor words another instruction also reads crashed lavapipe inside the shader. Four commits remain here:feat(shader): resolve S# reads through nested descriptor tables. This is the record → pointer → V# → S# chain of Marvel's Wolverine (PPSA03671)'s stop above (pc=0xbb28) and of the one atpc=0xb600. This PR plans the S# when it sits at a keyed offset of the V#. Atpc=0xb600it sits at a fixed offset, which this PR doesn't plan and #9457 does (mrfelek's offline replay of #9969's head, comment). Thepc=0xbb28line doesn't show its S#'s offset.pc=0xb600, the shader stops atpc=0xb9f8, then atpc=0xd0f0(records linked through words that are also a V#'s base) and atpc=0xef7c(pointers from a second record table). mrfelek's #16472, on top of #9749, takespc=0xb9f8. In their replay with #9969 merged on, it plans past it and stops atpc=0xd0f0; their game run with the same step and their local stencil and image-table changes stops there 168 s in. No open PR of ours takespc=0xd0f0orpc=0xef7c.feat(shader): look up a Phi-merged record pointer to an S# or T#. This is Ratchet & Clank's shape: record → pointer → S# through an address, with the pointer's low word merged through a Phi.fix(shader): accept a lane-mask word in a pointer-keyed record pointer. Ratchet & Clank: Rift Apart's next stop (ps54all, #6191):GetImageResource dword 0 is not a valid runtime value. A T# is read through a record pointer whose low word passes six levels of Phi, and one arm is a word of the waterfall loop'sBallotlane mask.fix(shader): check the descriptor epoch for a lone nested sampler table(967f0dbebb). A shader whose only table is a nested S# table now gets the same descriptor-epoch retry as images.TableSnapshotter::Run()still widenedhasIndirectfor samplers only oncolumn.indirect. Such a shader skipped the snapshot's own epoch check and retry, and relied on the whole-snapshot revalidation alone.Ordering. This PR was stacked on #7223, which has merged. Its first three commits sit on #7223's
74700a08d1, and the branch then mergesmaina5939f10a8(480c25a6b1) and #7223's head, now7f36e41c45(94a16af777). The fourth commit sits on top. With4d820bdb47, a merge ofmainc2eafe4461, which has #7223, this PR's diff overmainshows only its own changes.TableColumnkeeps #6232'sselectedandselectionand addspointerKeyedafter them, and the plan encoder, the plan hash andsameColumnstake the new field.mainare gone with the restack, and #7223's own merge withmainreplaces them. The first of them took its conflict resolutions from blawesom's rebase of this branch ontomain(comment) and credited blawesom as co-author.3c58f422ee).mainis at 88 since Pipodi's #18455. Ours take one number each: #7642 62 (a draft, held; it takes a free number at its refresh), #7395 93, #8939 94, #9457 95, #9633 96, #9749 97, #9790 98 and #9969 99. The other open PRs changing it hold 89 (#14871, #19852, #21199 and #21240), 90 (#6416, and #16812 and #16814, both stacked on #9969), 91 (#10351) and 92 (#14853), and the rest hold numbers at or belowmain's, from a check of every open PR's head on 11-16. Whichever lands second on a number takes the next free one.main).Tested
41220941d8,9200c3a2d5,f6fb8b64a9, on #7223's74700a08d1), Linux, lavapipe (LLVM 20.1.2), CI's configuration, a cloud worker:agc_shader_disk_cache,agc_shader_bindlessand the rest of the image-table family (21 tests) pass 10 runs in a row;^(agc|shader)tests pass, 838 of 838.main, as CI builds it (0863efbfa4,maina07e985c8f), on GitHub's runners (run): the nested and pointer-Phi table tests,agc_driver_image_table,agc_shader_disk_cacheandagc_shader_bindlesspass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass, and the libc and libkernel suites pass on both.main9caecfd2d5(aed137caee, the head), on GitHub's runners, at 3730bb899e, the same merge with the same tree before the co-author line was added (run): on Linux the^agctests pass 3 runs in a row, 715 tests: 667 pass, 48 skip, 0 fail. The libc and libkernel suites pass on both runners. On Windows, of 714^agctests 173 pass 3 runs in a row and 539 skip, since the runner has no Vulkan device; the only failures areagc_driver_pm4_replay_toolandagc_shader_replay_tool, which fail the same way on that runner for an unrelated branch (run).agc_driver_nested_image_table,agc_driver_nested_sampler_table,agc_driver_pointer_phi_sampler_table,agc_shader_disk_cacheandagc_shader_disk_cache_large_filepass 10 of 10 runs on both runners. Three of them skip on the Windows runner.agc_driver_nested_sampler_table: S# through record → pointer → V#. It covers independent keys, wave32 against wave64, an edited S#, unmapped and non-buffer parents, shared children, the refusal of an S# with another consumer, captured and uncaptured Phi pointers, the S# budget and the nested key budget. Red:GetSamplerResource dword 0 is not a valid runtime value.agc_driver_pointer_phi_sampler_table: S# through a Phi-merged record pointer. It covers the direct control, captured and uncaptured Phi constants, a constant equal to another record's pointer, a null pointer, a non-buffer record table, an S# with another consumer, and a T# through the same path.agc_driver_nested_image_tablegains "a T# with another consumer" (refused). Red is a SIGSEGV on #7223's head.agc_shader_disk_cacheround-trips both new plan shapes and rejects a malformed pointer-keyed column.agc_driver_pointer_phi_ballot_tableandagc_driver_pointer_phi_copies_table: synthetic wave64 waterfall loops shaped like Ratchet & Clank: Rift Apart's chain, where the lane-mask pointer faults as outside the snapshot. On GitHub's runners (run) both fail in all 3 runs on Linux with the third commit's code (4a4db4bf94) and pass 10 of 10 with the fourth, with the other nested and pointer tests andagc_shader_disk_cache; the libc and libkernel suites pass. On Windows they skip without a Vulkan device andagc_shader_disk_cachepasses. A run that mirrors CI's Linux job gives 1378 tests against 1376 on 4a4db4bf94, with only the two new tests changing.main82f0c9aecwith #6946, #6958, #7238, #7223, #6277, #6417, #6160 and #7300) plus this PR's three commits, cold shader cache, one run:GetSamplerResourcestop no longer occurs (0 hits);PhibeforeLoadAddressU32(GetImageResource dword 0 is not a valid runtime value). That is the title's next stop. The fourth commit (b91f0508d5) addresses that chain; Tamalero has since run the title with it (below).f4549448fas the control, both onmain66702f1cf(#7223's base) with no local patches, fresh shader cache, one run each:GetSamplerResource dword 0(pc=0x6b74, 3 refusals);GetImageResource dword 0(pc=0x99ec, 3 refusals). Its record pointer goes through a deeperPhinest, with a word of theBallotlane mask ANDed into it (BitwiseAnd32), a shape the fourth commit doesn't cover. That is the title's next stop.main82f0c9aecwith open PRs, already carrying this PR's earlier commits) plus the fourth commit (b91f0508d5), one run each before and after:LoadAddressU32@pc=0x8fd4, six levels ofPhi) no longer occurs;GetImageResource dword 0 is not a valid runtime value,LoadAddressU32@pc=0x9a30): a seven-levelPhinest with aBallotlane-mask word ANDed in andReadFirstLane(SelectU32 …)arms. That is Tamalero's next stop (above) in a sibling shader: both chains read the record table at pc=0x1aa8, and the stop and the second buffer's reads sit 0x44 later than in Tamalero's (0x9a30, 0x908c and 0x900c against 0x99ec, 0x9048 and 0x8fc8).main61d3d3080c: Rocky Linux 10.2, Release,BUILD_TESTING=ON, 735 graphics tests per GPU, no title (comment):agc_driver_nested_sampler_tableandagc_driver_pointer_phi_sampler_tableamong them;agc_pipeline_cache_filefails, which Capmare reports as unrelated;requiredSubgroupSize = 32,local_size_x = 32and a sampler array of more than 2 elements indexed per workgroup), so it's an ANV issue, filed as Mesa issue 16622 and fixed by Mesa !37394, in Mesa 25.3.0 and later (comment) (comment, comment). The tests stay as they are. The existing nested image-table tests pass on all three GPUs.agc_driver_nested_sampler_tableandagc_driver_pointer_phi_sampler_tablefail with the same lines as on ANV. @BKlaasWerkman's rerun on the same Intel Arc, of this PR alone merged intomain938812df14(comment), and #9969's headd01f290417merged into the samemain(comment): both tests fail 3 of 3 by default and pass 3 of 3 withAPS5_SPANNED_WAVE=1, which spans the program over two full 32-lane subgroups. That switch made both pass on ANV too (comment), so this points to the same cause as there. Xe-LPG is Gfx12 as well. Mesa 25.3's fix doesn't reach Intel's Windows driver (101.9150). On an NVIDIA GeForce RTX 3060 Ti (617.42) in the same run both pass, and neither GPU reports a newVUID-message.GetSamplerResourceorGetImageResourcerefusal.maindoes the same with this title (comment, #6099), so that's the title's next stop, not this PR's.main61d3d3080c(ed4f148a3c), on GitHub's runners (run): the^agctests pass on Linux (734, 0 failed, 49 skipped), and the suites' only failure is libc'sprecise_waittiming test. On Windows, where 551 of the 734 skip without Vulkan, the only failures areagc_driver_pm4_replay_toolandagc_shader_replay_tool(exit code 0xc0000139), which fail the same way on that runner for an unrelated branch (run).mainff2fc57153(59b319a779, the head), on GitHub's runners (run): the^agcand^shadertests pass on Linux (739, 0 failed, 49 skipped), and the suites' only failure is again libc'sprecise_waittiming test. On Windows, where 551 of the 738 skip without Vulkan, the only failures are againagc_driver_pm4_replay_toolandagc_shader_replay_tool(exit code 0xc0000139).4661f4bab5, a merge ofmain0db47b263d. The only conflict wasShaderDiskCache.hpp'sFormatVersionline:mainmoved to 45 (#7831), and this branch keeps its 46. On GitHub's runners (run), the pointer, nested, image-table and disk-cache sets (16 tests) pass 10 runs in a row on Linux. On Windows the set has 18, with two Windows-only disk-cache tests: they build, 5 pass 10 runs in a row, and the other 13, which need a Vulkan device, skip. The libc and libkernel suites pass on both, run withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners. An earlier run linked here didn't run this set, so it's replaced.319fa1f360, a merge ofmain379b1dca32.main's #7880 changed the indirect-column builder this PR also changes: it reads a record pointer's words throughUnwrapTableReadand checks that the offset is available where the handle is (AvailableAt). The conflicts inResourceTracker.cppkeep both: this PR's record-origin walk, and #7880's unwrap of the high word and its dominance check.FormatVersiongoes to 47, abovemain's 46.agc_shader_memoryandagc_shader_bindlesson both runners withGetImageResource dword 0 is not a valid runtime value(run).agc_shader_bindless,agc_shader_memoryand the^agc_driver_pointer_,^agc_driver_nested_,^agc_driver_image_tableand^agc_shader_disk_cachetests. Linux: 18 run, 18 pass, 0 skip, 0 fail. Windows: 20 run, 7 pass, 13 skip (Vulkan device tests; the runner has none), 0 fail.^agcset once (run): Linux 973 run, 908 pass, 64 skip, 1 fail; Windows 992 run, 272 pass, 718 skip, 2 fail. The failures areagc_driver_sgpr_pattern_fill_keyson Linux ("the dispatch completed 17 times without a pending write over the keys") andagc_driver_pipelined_metadata_passand its_draw_pipelinevariant on Windows (vkCreateInstancereturns -9 on the device-less runner).main379b1dca32shows the same three with the same messages (run);agc_driver_sgpr_pattern_fill_keysfailed 1 of 4 runs there.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners. It merges cleanly with currentmain.2525821ac9, a merge ofmainc9b2660d56.main's #7550 tookFormatVersion47, the number this branch had, and git merged the two edits silently, so the merge moves this PR to 50. This PR's own diff is otherwise unchanged. On GitHub's runners, 10 runs (run) of the pointer, nested, image-table and disk-cache sets (agc_shader_bindless,agc_shader_memory,^agc_driver_pointer_,^agc_driver_nested_,^agc_driver_image_table,^agc_shader_disk_cache): Linux: 18 run, 18 pass, 0 skip, 0 fail. Windows: 20 run, 7 pass, 13 skip (no Vulkan device), 0 fail. The libc and libkernel suites pass on both, run withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.71741a70b6, a merge of #7223'sf1cc524085(yabanana's merge ofmainc8d34aa8f4, which moves #7223 toFormatVersion48). Two conflicts, each resolved to this PR's side, which already holds the other side's content:FormatVersionstays 50, and inResourceTracker.cppthe old one-argumentPointerRecordOriginline gives way to this PR's two-argument version and its helpers, at its one call site. The merge brings in exactlymain'sc9b2660d56toc8d34aa8f4changes (249 files, each the same asmain's own), so this PR's own diff is unchanged. On GitHub's runners, 10 runs (run) of the pointer, nested, image-table and disk-cache sets (agc_shader_bindless,agc_shader_memory,^agc_driver_pointer_,^agc_driver_nested_,^agc_driver_image_table,^agc_shader_disk_cache): Linux: 18 run, 18 pass, 0 skip, 0 fail. Windows: 20 run, 7 pass, 13 skip (no Vulkan device), 0 fail. The libc and libkernel suites pass on both (143 and 206 tests on Linux, 170 and 222 on Windows), run withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.^agcsweep, once (run): Linux 1,009 run, 945 pass, 64 skip, 0 fail. Windows 1,037 run, 292 pass, 740 skip, 5 fail.agc_submit_progress,agc_submit_progress_no_timeline,agc_driver_pipelined_metadata_passandagc_driver_pipelined_metadata_pass_draw_pipelinestop atvkCreateInstance(-9) on GitHub's runner, which has no Vulkan device, as onmainc9b2660d56alone (run).agc_driver_frame_replayfails withthe replay did not reproduce the second copy, the intermittent Windows failure tracked in #10711, which #10715 (open) quarantines on Windows. Run alone on Windows 20 times in a row, it passes on this head (run) and onmainc8d34aa8f4(run).9343a179b3:7808540443, a merge of #7223's153400ba2b, then a test-only commit (run).153400ba2bmergesmain0d62324ce2into #7223 and moves it toFormatVersion49, abovemain's 48. That line was the one conflict, and it stays 50 here. This PR's own diff is unchanged.9343a179b3dropsagc_driver_nested_sampler_table's check that a V# with another buffer consumer is refused, one of the assertions @oneandonlydean listed on #9969, under the rule that tests don't assert that a shape the code doesn't support yet throws. The sampled results, sharing and budget checks stay.agc_pipeline_cache_fileandagc_driver_sgpr_pattern_fill_keys, ran 10 times with no failure. Linux: 12 run, 11 pass, 1 skip (agc_pipeline_cache_file), 0 fail. Windows: 14 run, 6 pass, 8 skip (the seven Vulkan device tests, as the runner has no device, andagc_pipeline_cache_file), 0 fail.guest_raise_exceptionfailed after "address waking round 20: the handler did not run within 5 s", asmain9fc181dde5does in the same verify setup (run); that is #11813, and this PR doesn't touch libkernel.exec_arguments,guest_timed_join_import_libkernel_sysandguest_timed_join_import_libkernel_webfail at their setup in the verify's Windows build (FileNotFoundErrorstarting the title, or copying the libraries they load), and pass inmain's own Windows job at1829def9bf(job). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.ca14648806, a test-only commit (run). It dropsagc_driver_nested_sampler_table's check that an S# with another consumer is refused, with therefusedhelper it was the last user of, under the rule that tests don't assert that a shape the code doesn't support yet throws. #9790 plans that S# and checks its sampled result. The sampled results, sharing and budget checks stay. The pointer, nested, image-table and disk-cache tests withagc_pipeline_cache_fileandagc_driver_sgpr_pattern_fill_keysran 10 times with no failure. Linux: 12 run, 11 pass, 1 skip (agc_pipeline_cache_file), 0 fail. Windows: 14 run, 6 pass, 8 skip (the seven Vulkan device tests andagc_pipeline_cache_file), 0 fail. Suites: libc and libkernel pass on Linux (158 and 217). On Windows libc passes (187), and libkernel passes 236 of 239:exec_arguments,guest_timed_join_import_libkernel_sysandguest_timed_join_import_libkernel_webfail at their setup in the verify's Windows build (FileNotFoundErrorstarting the title, or copying the libraries they load), and pass inmain's own Windows job at1829def9bf(job). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.ca5ba6296f, a merge ofmain38ccd50f83(run).mainnow has #11507 (hugodearaujo's short-cube sampling), which takesFormatVersion49 (b9f4f65904); that line was the one conflict, and this PR keeps its 50 (see Version bumps above). #11507 also adds anImageResourcefield,sampledOnly, whichShaderDiskCache.cppencodes next to this PR's fields without a conflict. This PR's diff overmainis the same apart from theFormatVersionline's old value. The pointer, nested, image-table and disk-cache tests withagc_pipeline_cache_file,agc_driver_sgpr_pattern_fill_keysand #11507'sagc_driver_image_sample_short_cuberan 10 times with no failure. Linux: 13 run, 12 pass, 1 skip (agc_pipeline_cache_file), 0 fail. Windows: 15 run, 6 pass, 9 skip (the eight Vulkan device tests andagc_pipeline_cache_file), 0 fail. Suites: libc and libkernel pass on Linux (166 and 265). On Windows libc passes (194), and libkernel passes 284 of 287:exec_arguments,guest_timed_join_import_libkernel_sysandguest_timed_join_import_libkernel_webfail at their setup in the verify's Windows build (FileNotFoundErrorstarting the title, or copying the libraries they load), withmain's code too, and pass inmain's own Windows job at1829def9bf(job). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.e04a705765:d908758281, a test-only commit,86d97d969a, a merge of #7223's0dbf5478b2, ande04a705765, the format commit (run).d908758281dropsagc_driver_nested_image_table's two checks that a valid shader is refused, one whose parent V# also feeds another buffer consumer and one whose T# has another consumer, with therefusedhelper they were the last users of, under the rule that tests don't assert that a shape the code doesn't support yet throws (raised on #9457, #9790 and #10846). Neither shape is implemented. The sampled-result, wrap, bounds, non-buffer and empty-dictionary checks stay. The PRs stacked on this one take the commit through their merges, so none of the stack's tests asserts thenot a valid runtime valuerefusal any more.86d97d969atakes yabanana's0dbf5478b2, which mergesmainf7e84c4cf1into #7223 and moves #7223 toFormatVersion50. Clean: both sides had moved the line to 50.e04a705765gives this PR its own disk-cache format, 51, one above #7223's 50, so a cache written by #7223's recompiler isn't read as this one's (see Version bumps above). Apart from that line andd908758281, this PR's diff over #7223 is unchanged.agc_shader_bindlessandagc_shader_memoryran 10 times with no failure. Linux: 19 run, 19 pass, 0 skip, 0 fail. Windows: 21 run, 8 pass, 13 skip (the Vulkan device tests; the Windows runner has no Vulkan device), 0 fail. The libc and libkernel suites run 191 and 291 tests on Linux and 220 and 314 on Windows, with 0 failed. They ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.4769d5a745, a test-wording commit (run), for the last part of oneandonlydean's item 1 and XairRrR's first non-blocking point. The nested image table and nested sampler table tests no longer check refusals, so their success lines no longer say "and refusals". The nested image table line (ImageTable.cpp:1635) is #7223's own, from Daniele Giovane'sad44bc41bb; it's in this branch through the merges of #7223, and this commit changes it here. The image-table, nested, pointer, disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 19 run, 19 pass, 0 skip, 0 fail. Windows: 21 run, 8 pass, 13 skip, 0 fail; the 13 skip because the runner has no Vulkan device. The libc and libkernel suites run 191 and 291 tests on Linux and 220 and 314 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.f4781de1f7:480c25a6b1, a merge ofmaina5939f10a8,94a16af777, a merge of #7223's7f36e41c45, andf4781de1f7, the format commit (run).480c25a6b1: one conflict,FormatVersion. This PR's own diff is unchanged except that its removed line now readsmain's 50.94a16af777: clean.f4781de1f7: moves this PR to 63 (Version bumps above).agc_shader_nested_snapshot_retry, which exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows.5fdf20fc3d, below, fixes it.967f0dbebb, the lone nested sampler table's epoch check.agc_shader_nested_sampler_snapshot_retryruns the nested retry check with an S# child column and a sampler as the only table. Its registration gives it libc's directory on PATH on Windows, in the same commit.f4781de1f7, 3 of 3 runs on both runners: "nested retry: expected inner retry and outer revalidation". Green: 10 of 10 (run).APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.1f158eb5e0, a merge ofmain0836dfdf4f(run, on fc6a89d796, which has the same tree). #12862 movedlibSceAgcDriver's test registrations intotests/cmake/; the conflict inCMakeLists.txtis resolved withtools/agc_test_split.py resolve, which moves this PR's registrations intotests/cmake/agc_driver_image_table_tests.cmake(+11) andtests/cmake/agc_shader_memory_tests.cmake(+7). Nothing else conflicted. Apart from the move, this PR's diff is unchanged. With-DBUILD_TESTING=ON,ctest -Ngives 3084 tests:main's 3075 plus its 9 tests, each listed once. The 11 tests of this PR's verify set ran 10 times in a row. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 11 run, 2 pass, 8 skip (no Vulkan device), 1 fail:agc_shader_nested_snapshot_retry, #7223's test, which exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. It failed the same way before this merge (run at967f0dbebb, run atf4781de1f7), andresolvemoved its lines byte for byte. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.5fdf20fc3d: libc on PATH for both nested snapshot retry tests on Windows, at oneandonlydean's request on #10846 (comment).tests/cmake/agc_shader_memory_tests.cmake's Windowsset_tests_propertiesnow names #7223'sagc_shader_nested_snapshot_retrybeside this PR'sagc_shader_nested_sampler_snapshot_retry, so the 0xc0000135 failure noted above is gone. It's one line, and nothing else changes.1f158eb5e0: on Windows,agc_shader_nested_snapshot_retryexits with 0xc0000135 and the sampler retry passes. Linux passes both.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.maind262000: 39 tests, 39 passed, 0 skipped, 0 failed, both retry tests included.5fdf20fc3d, from TechLevelZero's NVIDIA bot (report): merged ontomaine6f5730, driver 595.99.02, Ubuntu 26.04.1, 2,543 of 3,148 tests selected.main, and 3 are unstable onmain.VK_LAYER_KHRONOS_validation, there are no new validation IDs againstmain, over 941 tests on the GPU. 9 tests ran with the layer but aren't inmain's baseline, so they weren't compared. Both nested snapshot retry tests passed on the GPU.3283b23aac, a merge ofmain88e804b0a7(run).mainnow has Ondra97's #7694 (scalar-address descriptor Phis), which addsDescriptorSource::requiredBlocksto the shader plan encoding, and JJenkx's #6959, which movesFormatVersionto 51. Three conflicts, each keeping both sides. InShaderDiskCache.cppthe encoder writes this PR'spointerKeyedand then #7694'srequiredBlocks, in the order the decoder reads them, and the static checks take both changes:DescriptorSource224 bytes with 4 fields,TableColumn120 bytes with 20, and at least 82 bytes per encoded descriptor source.FormatVersionstays 63, andagc_shader_memory_tests.cmakeregisters this PR's two snapshot-retry tests and #7694'sagc_shader_descriptor_phis. This PR's changed lines are the same apart from those numbers, and its#include <unordered_set>inResourceTracker.cppleaves the diff because #7694 adds the same line. The shader-memory, nested, pointer, image-table, disk-cache and bindless tests, with #7694'sagc_shader_descriptor_phis, pass 10 runs in a row. Linux: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 11 pass, 13 skip, 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.6cb37cc9ed, a merge ofmain4f64f81ef7, which brings B-Howell's #12246 (1D array layer rows). #12246 addsresourceViews, a table's registered image views, to the image-table column snapshot.ResourceMaterializer.cpp: the table equality check compares this PR'snested,pointerKeyedandpointersand #12246'sresourceViews, and the footprint keeps #12246's loop overresourceViewswith this PR'stable.pointers.size() * 2uadded to its first line.Snapshot(source, table)that records each table's registered image views and checksimage.table != table. #7223, which this PR is built on, copies a column's records in a helper,CopyRecords, that nested child columns use too, and git placed the loop there, wheretableisn't in scope, so the merge didn't build. The merge commit moves the loop back intoSnapshot, right afterout = CopyRecords(records).image.tableonly ever indexes a top-level table (ResourceTracker::AssignTables), and nested children are reached only through a parent record's code, so nested children having no registered views is exact. It's folded into the merge so that no commit fails its tests.FormatVersionstays 63, and this PR's diff overmainis otherwise unchanged.agc_shader_descriptor_phis, pass 10 runs in a row. Linux: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 11 pass, 13 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (217 and 318) and on Windows (244 and 339). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.agctest on the stack's two tips, #9749 and #9969, cover this merge's code (see those PRs).63b5c09df9, a merge ofmain4f41f4c375(×10, the PR's own tests ×10).ShaderDiskCache.hpp'sFormatVersion, wheremainis now at 52 (#10000) and this PR keeps its 63; anddocs/dev/debt/shader.md, where this PR's entries andmain's new entries are adjacent and both stay. This PR's own lines are unchanged apart from theFormatVersionline's old value.agc_driver_image_table,agc_driver_many_direct_samplersand every test matching^agc_shader_memory,^agc_shader_disk_cache,^agc_shader_sampler_limits,^agc_shader_nestedor^agc_shader_table. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 13 run, 11 pass, 2 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 322 tests on Linux and 327 and 342 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.^agc_driver_pointer_and^agc_driver_nested_test, the image-table tests in this PR's diff overmain, which the first run's names left out. Linux: 7 run, 7 pass, 0 skip, 0 fail. Windows: 7 run, 0 pass, 7 skip (no Vulkan device), 0 fail.014d1e30c3:4d820bdb47, a merge ofmainc2eafe4461, which brings yabanana's #7223, and014d1e30c3, a debt-entry sentence (×10).tests/cmake/agc_driver_image_table_tests.cmake),pointerKeyedin the image-table column and its equality check (ResourceMaterializer.cpp), the plan encoder's field count and list version (ShaderDiskCache.cpp), andShaderDiskCache.hpp'sFormatVersion, which stays 63 (mainis at 56 since #7223).tests/cmake/agc_shader_memory_tests.cmake, git kept both #7223'sagc_shader_nested_snapshot_retryblock and this PR's, which registers it besideagc_shader_nested_sampler_snapshot_retry, so CMake refused the secondadd_test. The merge keeps one block, this PR's, at #7223's place.mainis now its own changes only: 15 files, 530 insertions and 45 deletions.014d1e30c3adds a sentence to the "Nested image tables" debt entry: a T# reached through a nested child is materialized from its raw words, without registeredresourceViews, so a 1D array pastmaxImageArrayLayerskeeps its raw descriptor there.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 10 pass, 14 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 301 and 325 tests on Linux and 331 and 343 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.main5b1d381, driver 595.99.02, Ubuntu 26.04.1, 2,894 of 3,883 tests selected. 2,840 passed, 5 failed and 49 skipped. None of the failures is new: 3 also fail onmain, and 2 are unstable onmain. WithVK_LAYER_KHRONOS_validation, there are no new validation IDs againstmain, over 980 tests on the GPU.agc_shader_nested_sampler_snapshot_retryran with the layer but isn't inmain's baseline, so it wasn't compared.0ce8d173a3, a merge ofmain8eaf82f315(×10).docs/dev/debt/shader.md, where JJenkx's #15305 adds a "runtime resource snapshot" entry right above "Nested image tables", whose wording this PR changes. Both stay, #15305's entry first. This PR's own lines are unchanged.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 23 run, 23 pass, 0 skip, 0 fail. Windows: 25 run, 10 pass, 15 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 327 and 344 tests on Linux and 358 and 371 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.86527d2f76, a merge ofmain006d11fca5(×10).ShaderDiskCache.hpp'sFormatVersion, where frankea's #9020 movesmainfrom 56 to 57. This PR keeps its 63. Its own lines are unchanged apart from theFormatVersionline's old value.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 23 run, 23 pass, 0 skip, 0 fail. Windows: 25 run, 10 pass, 15 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 327 and 344 tests on Linux and 358 and 371 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.85e79949ae, a merge ofmaindd7c8de5de(×10).ShaderDiskCache.hpp'sFormatVersion, where #10489 movesmainfrom 57 to 60; this PR keeps its 63. Anddocs/dev/debt/shader.md, where #10489 rewords the entry after this PR's pointer-keyed image-table entry (the image limit is now 128). The merge keeps this PR's entry and #10489's wording. This PR's own lines are unchanged apart from theFormatVersionline's old value.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 37 run, 37 pass, 0 skip, 0 fail. Windows: 39 run, 10 pass, 29 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 344 and 346 tests on Linux and 375 and 373 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.3309a349f6:0157b8d469, a merge ofmain017bd95f5f, and the format commit3309a349f6(×10).ShaderDiskCache.hpp'sFormatVersion, where zaryabzip's #14636 movesmainfrom 60 to 68, above this PR's 63. The merge takes 68, and the format commit moves this PR to 79: every number from 69 to 78 is held by an open PR, from a check of every open PR's head on 11-10. This PR's own lines are unchanged apart from theFormatVersionline.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 37 run, 37 pass, 0 skip, 0 fail. Windows: 39 run, 10 pass, 29 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 350 and 348 tests on Linux with 0 failed, and 380 and 375 on Windows. On Windows, libkernel'sguest_kernel_resident_fmem_exportandguest_kernel_resident_fmem_export_patchedfail: the same harness fails them onmain7259cce111alone (run), andmain's own Windows job passes them, so they come from the verify harness, not this PR. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.agctest: Everyagctest also ran once on #9749's tree, which holds this PR (run): Linux 1,530 run, 1,437 pass, 93 skip, 0 fail; Windows 1,573 run, 467 pass, 1,106 skip (no Vulkan device), 0 fail.40d718d87b, a merge ofmaine22c5fb941, without conflicts (×10).agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmainandmain's newagc_shader_memory_coherent_atomic_loads. Linux: 38 run, 38 pass, 0 skip, 0 fail. Windows: 40 run, 11 pass, 29 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 379 and 372 tests on Linux and 406 and 400 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.e9ddd12bd2, a merge ofmainbd278f3654(×10).ShaderDiskCache.hpp'sFormatVersionline, where imellag's #19530 movesmainfrom 68 to 69. The merge keeps this PR's number:main's 69, this PR's 79. This PR's other changed lines are unchanged.40d718d87b. Linux: 38 run, 38 pass, 0 skip, 0 fail. Windows: 40 run, 11 pass, 29 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 380 and 376 tests on Linux and 410 and 404 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners._putenv_stest fix (#19899) on top, becausemain's Windows test build breaks without it ("'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.3c58f422ee, a merge ofmain328cbf673e(×10, with #21255's test change).ShaderDiskCache.hpp'sFormatVersionline, where Pipodi's #18455 movesmainfrom 69 to 88, above this PR's 79. The merge moves this PR to 93, and the PRs stacked on it take 94 to 99 in turn (see the ladder above). This PR's other changed lines are unchanged.e9ddd12bd2. Linux: 45 run, 44 pass, 0 skip, 1 fail. Windows: 47 run, 11 pass, 36 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 391 and 390 tests on Linux and 421 and 417 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.agc_driver_image_table_packed_guards, fails as onmain: three identical "stage 4 pc 0x68" records, then "unrecoverable packed table format was not poisoned", the same lines as inmain's own Linux job ate249fc47b5(job). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9969's20b045a8de, which holds this PR's3c58f422ee(run),agc_driver_image_table_packed_guardspasses 10 of 10, and so do the same tests on that tree: Linux 57 run, 57 pass, 0 skip, 0 fail; Windows 59 run, 11 pass, 48 skip (no Vulkan device), 0 fail.guest_thermal_sensorsin that run: libkernel'sguest_thermal_sensorsreached its 20 s timeout in the Linux suite. It times out in every run I have on GitHub's Intel Xeon 6975P-C runners,main0694c4cbd6alone included (run), and passes in this PR's own ×10 above and inmain's own job. This PR changes no libkernel file._putenv_stest fix (#19899) on top, becausemain's Windows test build breaks without it ("'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.ANYPS5_REQUIRE_VULKAN=1,ANYPS5_REQUIRE_DISPLAY=1andANYPS5_NO_SHADER_CACHE=1. This head3c58f422eemerged ontomain1ccc399b17(clean), againstmain1ccc399b17alone,ctest -R '^(agc_driver_image_table.*|agc_driver_nested_.*|agc_driver_pointer_phi_.*|agc_shader_memory|agc_shader_disk_cache|agc_shader_nested_.*)$'.main: 35 of 35 pass. This PR: 40 of 40 pass, including the five tests in that set thatmaindoesn't have:agc_driver_nested_sampler_table,agc_driver_pointer_phi_sampler_table,agc_driver_pointer_phi_ballot_table,agc_driver_pointer_phi_copies_tableandagc_shader_nested_sampler_snapshot_retry. NoVUID-line on either side, and every device test selected the RTX 4090.ef102a3a52, a merge ofmaind89f26516c(×10, with #21255's test change).ShaderDiskCache.hpp'sFormatVersionline, where Celegans12's #6416 movesmainfrom 88 to 90. The merge keeps this PR's 93, and the PRs stacked on it keep 94 to 99. This PR's other changed lines are unchanged.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 45 run, 44 pass, 0 skip, 1 fail. Windows: 47 run, 11 pass, 36 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 410 and 411 tests on Linux and 439 and 432 on Windows, with 0 failed apart fromguest_thermal_sensors(below). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.agc_driver_image_table_packed_guards, also fails onmaind89f26516calone in the same harness on GitHub's runners (run: the^agc_driver_image_tabletests ×10, 29 run, only this one fails).main's own Linux job, on the project's self-hosted runner, passes it at244b338dd0(job). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9969's630bbb0a2e, which holds this PR'sef102a3a52(run),agc_driver_image_table_packed_guardspasses 10 of 10, and so do the same tests on that tree: Linux 57 run, 57 pass, 0 skip, 0 fail; Windows 59 run, 11 pass, 48 skip (no Vulkan device), 0 fail.guest_thermal_sensors: libkernel'sguest_thermal_sensorsreached its 20 s timeout in the Linux suite, on one of GitHub's Intel Xeon 6975P-C runners. It times out in every run I have on those runners,main0694c4cbd6alone included (run), and passed in this refresh's runs on AMD EPYC runners. This PR changes no libkernel file._putenv_stest fix (#19899) on top, becausemain's Windows test build breaks without it ("'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.BUILD_TESTING=ON, validation layer 1.4.363, withANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1,ctest -V -R '^agc_driver_pointer_|^agc_driver_nested_|^agc_shader_nested_|^agc_driver_image_table|^agc_shader_memory|^agc_shader_disk_cache|^agc_shader_sampler_limits', 3 runs per arm. #9969's630bbb0a2e(with #7395, #8939, #9457 and #9790; their merge 2c9689c0c3) and #9749'sbee5a91996(with #7395, #8939, #9457 and #9633; their merge b726f51423), each merged ontomaine1ab104e0a(clean), againstmaine1ab104e0aalone; both carry this PR's headef102a3a52.main: 39 tests, 38 pass, 1 skip in each run. Each arm: 56 tests, 55 pass, 1 skip in each run; the counts include the tests of each arm's other PRs. The one skip is the same in every arm,main's included:agc_driver_image_table_vouched_lookups(the device reports host-imported pages written after a GPU read). The layer was inserted 32 times onmainand 48 times in each arm, and never reported missing. NoVUID-line in any arm, and every Vulkan test selected the RX 9070 XT.mained1def4dd4withgit merge --no-ff. No validation layer was installed, so these runs say nothing aboutVUID-errors. #8939's606212c86eand #9633's2f104ac486both carry this PR's headef102a3a52. In both, the new tests pass,agc_driver_nested_sampler_tableamong them, and of the 1296 and 1302 tests the changes reach, the only failures are onesmainalso fails on that GPU (#23232, #23711, #23942).5b21241399, a merge ofmaind50640e264(×10, with #21255's test change).ShaderDiskCache.hpp'sFormatVersionline, where edubox's #21758 movesmainfrom 90 to 91. The merge keeps this PR's 93, and the PRs stacked on it keep 94 to 99. This PR's other changed lines are unchanged.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 45 run, 44 pass, 0 skip, 1 fail. Windows: 47 run, 11 pass, 36 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 410 and 417 tests on Linux and 439 and 438 on Windows, with 0 failed apart fromguest_thermal_sensors(below). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.agc_driver_image_table_packed_guards, also fails onmaind89f26516calone in the same harness on GitHub's runners (run: the^agc_driver_image_tabletests ×10, 29 run, only this one fails).main's own Linux job, on the project's self-hosted runner, passes it at244b338dd0(job). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9969'sdc97c68c75, which holds this PR's5b21241399(run),agc_driver_image_table_packed_guardspasses 10 of 10, and so do the same tests on that tree: Linux 57 run, 57 pass, 0 skip, 0 fail; Windows 59 run, 11 pass, 48 skip (no Vulkan device), 0 fail.guest_thread_cpu_clockin the run with #21255's test change: libkernel'sguest_thread_cpu_clockaborted once in that run's Windows suite, on an Intel Xeon 6973P-C runner. ShootanoJumper's #23756 reports this test failing intermittently on Windows onmained1def4dd4under load and changes it. It merged aftermaind50640e264, so these runs don't have it. This PR changes no libkernel file.guest_thermal_sensors: libkernel'sguest_thermal_sensorsreached its 20 s timeout in the Linux suite, on one of GitHub's Intel Xeon 6975P-C runners. It times out in every run I have on those runners,main0694c4cbd6alone included (run), and passed in this refresh's runs on Intel Xeon Platinum 8573C and AMD EPYC runners. This PR changes no libkernel file._putenv_stest fix (#19899) on top, becausemain's Windows test build breaks without it ("'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.Overlap
git merge-treeonmain5adb7d22ab):ControlFlowInfo.hpp: each adds aTableColumnfield,pointerKeyedhere anddynamicin #20519, with itsoperator==term. The recompiler'sShaderDiskCache.cppencodes and decodes both, in the same order.fieldCount<TableColumn>()from 19 to 20, so with both fields it's 21, and the sizes need rechecking. The build catches it.ResourceMaterializer.cpp: the capture and the plan output keep both sides' lines.ResourceTracker.cpp: in the heap-handle check, this PR dropssampler ||and #20519 returnsruntimeAddress()in place offalse, so the merged line takes both.ImageTable.cpp's test options keep both.FormatVersionis a one-line conflict that keeps this PR's 93, above #20519's 89.mainresolves it here.Checklist
74700a08d1, merged with #7223's head7f36e41c45andmaindd7c8de5de, which has #7223; 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)main(see What)APS5_SPANNED_WAVE=1), Windows 11, with the validation layer (BKlaasWerkman, in #9969's stack); NVIDIA RTX 2000 Ada Generation (driver 595.99.02, Ubuntu 26.04.1; TechLevelZero's NVIDIA bot); NVIDIA GeForce RTX 4090 (driver 620.70.06, Arch Linux, with the validation layer), by @domx4q; AMD Radeon RX 9070 XT (RADV, Mesa 26.2.7, Arch Linux, with the validation layer), by @hugodearaujo; NVIDIA RTX 4060 (driver 616.56, Windows 11, no validation layer), by @ShootanoJumperImported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-18T10:27:50Z.
Rebase handoff — rebased onto current
main(all six commits, authorship unchanged). The conflicts reconcilemain's evolved table-record architecture (DenseScratchMap/tagged scratch records, theselected/selectioncolumns) with this PR's nested/pointer-chained image-table support:ResourceMaterializer.cpp:main'sDenseScratchMaprecords kept, plus a second tagged map for the nested-table codes (the auto-merge had produced a non-compilingtry_emplace— the nested/leaf namespaces now index separate maps, with the PR's per-invocation clearing semantics preserved across recursion); your recursivefill(self, …)shape and thegrowMapbudget guards layered on topControlFlowInfo.hpp/ShaderDiskCache.cpp: additive fields throughout —selected/selection(main) +buffer(yours) +pointerKeyed(commit 5) — theTableColumnfield count is now 19, encoder/decoder and the static assert agreeResourceTracker.cpp: main's constant/addend offset logic with your parent-pointer word patch unioned (args 1–2 of a parent-pointer patch take the pointer's words)ImageTable's binding-role counts, the--nested*/--pointer-phi*flags, and the disk-cache reject cases all carriedOne combination to review when you pick it up: when a
selectedcolumn and a parent-pointer patch apply together, the args take the pointer's words while remaining args keep main's constant offsets — no test covers that intersection.Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; the image-table and disk-cache tests pass; full suite green apart from the knownmainregression (agc_driver_tessellationsegfault — Mesa, #5444), not this PR.To pick it up:
Head is
fdcf0d57.Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T11:28:21Z.
@blawesom thank you for the rebase and for reconciling all eight files, including the auto-merge's non-compiling
try_emplace. We took your resolution as a merge rather than a rebase, to keep the branch's history without a force-push: aed137caee mergesmain9caecfd2d5into this branch, its tree is exactly your fdcf0d5704's, and you're credited as co-author on it. On GitHub's runners (run) the^agctests pass 3 runs in a row on Linux (715, 0 failed); on Windows the only failures are the two replay tools that fail the same way on that runner for unrelated branches. Thanks also for flagging the case where aselectedcolumn and a parent-pointer patch apply together; we'll add a test for it.Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T13:29:35Z.
@blawesom a follow-up on the case you flagged, where a
selectedcolumn and a parent-pointer patch apply together. We said we'd add a test for it, but no shader can reach that case on this branch, so there's nothing for a test to cover:ResourceTracker.cpp:650-670at aed137caee). The other place that sets one,TryMakeIndirectColumn(825), returns beforeselectedis worked out.selectedonly when its T#'s dwords validate (692). Those dwords areReadConstBufferreads through the heap V#, and validating such a read validates its V# handle and the handle's four dwords (SrtRuntimeValidator.cpp:111-142), the same check line 650 makes.selectedleaf never takes the nested branch, and a nested leaf is neverselected. The materialization loop never takes itsselectedarguments and its parent-pointer arguments for the same plan.A Linux run of the
^agctests (716) with a temporary print logged 211 table-column plans, none with both. A nested-table shader whose keys the CPU evaluates gave a singleselectedcolumn and no nested table at all. We've left the code as it is.Imported from boykopovar/AnyPS5. Originally posted by ps54all on 2026-10-18T14:03:30Z.
@EagleBearerYS thanks for b91f0508d. Ratchet & Clank: Rift Apart (PPSA01474) data with it:
82f0c9aecplus open PRs, not clean main) that already carried this PR's earlier commits; b91f0508d cherry-picked on top. Windows 11, RTX 3080 (NVIDIA 610.74), MinGW GCC 15.2.0, Release.LoadAddressU32@pc=0x00008fd4, 6-deep Phi) is gone.Ballot/CompositeExtractU32x4(Ballot, Immediate)andReadFirstLane(SelectU32 ...)arms feeding the Phis, plus aReadConstBuffer@pc=0x908cwhose buffer comes fromLoadAddressU32@pc=0x900c(GetAddressResource).I can capture the shader (
.req) if that helps.AI assistance: the run and this summary were made with Claude Code.
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T14:14:09Z.
@ps54all thanks for running it. On your branch, b91f0508d clears the stop on compute shader 0x116bb5f500 (
LoadAddressU32@pc=0x8fd4). Your next stop is the one Tamalero reached on Linux (#6191), in a sibling shader: both chains read the same record table at pc=0x1aa8, and every pc after it is 0x44 past theirs (the stop at 0x9a30 against 0x99ec, the second buffer's read at 0x908c against 0x9048, and its V# load at 0x900c against 0x8fc8). So one fix covers both.No need for the
.req, thanks. What's still open is which values those reads return at run time, and the shader's code can't show that. If you, or Tamalero on #6191, can run one diagnostic on that dispatch, it's the one we asked Tamalero for (comment): the dword the read at pc=0x908c returns, next to the high dwords of the records the pc=0x1aa8 reads return, with addresses masked. Whether those are always equal decides how #7395 takes the pointer's high word. The chain's other two parts, the AND with aBallotword and the high word's Phi of record reads, don't need that data.Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-18T18:39:05Z.
Tested on real hardware, with no title run. Head
aed137cae, full build withBUILD_TESTING=ON, Release, Rocky Linux 10.2,ANYPS5_GPU=<name> ANYPS5_REQUIRE_VULKAN=1, 735 graphics tests per GPU.agc_driver_nested_sampler_tableandagc_driver_pointer_phi_sampler_tableagc_pipeline_cache_fileThe Intel failures, run as
agc_driver_image_table_tests --nested-samplerand--pointer-phi-sampler:The two values are swapped between the two tests. The tests choose between a wrap and a clamp point sampler, so ANV may return the result of the other sampler. I have not found the cause. The existing
agc_driver_nested_image_table*tests pass on all three GPUs.Tested and written by Claude (AI assistant) on a contributor's machine.
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T19:48:10Z.
@Capmare thank you for running all four devices, and for repeating the ANV failures three times.
The tests can't confuse the two samplers. Every lane samples past the right edge, so a wrap sampler reads texel x (0x3e800000, 0.25, at lane 0) and a clamp sampler reads texel 63 (0x427d0000, 63.25).
Both failures come from the first check of the first dispatch. That check walks the workgroups in order and stops at the first one that differs, so your two lines say this:
--nested-sampler: workgroup 0 selects the wrap S# and matches. Workgroup 1 selects the clamp S# and reads the wrap result.--pointer-phi-sampler: workgroup 0 selects the clamp S# and matches. Workgroup 1 selects the wrap S# and reads the clamp result.So on ANV the second workgroup gets the first workgroup's sampler. Workgroups 2 and 3 never ran through the check.
The
agc_driver_nested_image_table*tests go through the same records and keys, and they pass there. So the difference is in how the sampler is picked. Each workgroup indexes aVK_DESCRIPTOR_TYPE_SAMPLERarray with its own index, decoratedNonUniform, withshaderSampledImageArrayNonUniformIndexingenabled. We haven't found yet whether the fault is in our SPIR-V or in ANV, so the tests stay as they are and we're keeping this open.If you have time for one more run: the same two tests with the Khronos validation layer (
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, if it's installed) would show whether it reports anything for those dispatches.Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-18T20:46:52Z.
@EagleBearerYS I ran the two tests with the Khronos validation layer, and I found a trigger on ANV that does not involve our SPIR-V. Details below, including what I could not prove.
Summary
spirv-valaccepts the module.requiredSubgroupSize = 32,local_size_x = 32and a sampler array with more than 2 elements, indexed per workgroup.APS5_SPANNED_WAVE=1makes both tests pass on ANV. It changes no other registered test result on the Intel GPU.Setup
aed137cae) merged withorigin/mainatc4c2b3aa7, plus some local patches (see "Caveats").ANYPS5_GPU=Intel ANYPS5_NO_SHADER_CACHE=1 ./agc_driver_image_table_tests --nested-sampler(and--pointer-phi-sampler), from the source directory. I ran the binary directly and did not use ctest.Results of the two tests
--nested-sampler--pointer-phi-samplerThe two Intel failures are the lines from your comment:
--nested-sampler: group 1 lane 0 is0x3e800000, expected0x427d0000(the wrap result instead of clamp).--pointer-phi-sampler: lane 0 is0x427d0000, expected0x3e800000(the clamp result instead of wrap).I added the group number to the failure message locally. It confirms your reading: the first mismatch is workgroup 1, and workgroup 1 gets the sampler of workgroup 0. The failure does not depend on the validation layer, on
APS5_NO_GPL, onAPS5_NO_PROC_TABLE, onAPS5_NO_TIMELINE, onAPS5_NO_HOST_IMPORT, or onAPS5_NO_SAMPLER_CACHE. I ran each of these on Intel, and the result did not change. All my runs usedANYPS5_NO_SHADER_CACHE=1; I did not test with the shader cache on.Validation layer
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationloads (VK_LOADER_DEBUG=layershowsInsert instance layer "VK_LAYER_KHRONOS_validation"). It prints no message for either test on any device.spirv-val --target-env vulkan1.3accepts the captured compute module (5,656 words). I builtspirv-valandspirv-disfrom the repo's SPIRV-Tools source for this.The SPIR-V of the failing dispatch
I captured the pipeline with
APS5_DUMP_COMPUTE_PIPELINES. Facts about the module:LocalSize 32 1 1. The guest wave is 64, and the module has twoOpImageSampleExplicitLod. I read this as two guest lanes per host invocation, but I did not verify that in the emitter.OpLoadfromtable_samplers[element](a runtime array ofOpTypeSampler), thenOpSampledImagecombines it with the image. The element comes fromtable_map. There is noNonUniformdecoration, because the emitter treats the index as uniform per workgroup when the workgroup is one subgroup.What I tried on the real test, with the real buffers
I added a local diagnostic hook that replaces the compute module with an edited file, so the driver, the buffers and the descriptors stay real. Results on the Intel GPU:
gl_WorkGroupIDonly, with the expected pattern wrap/clamp/clamp/wrapNonUniformforced on the index (emitter switch)OpGroupNonUniformBroadcastFirston the index (emitter switch)The row with the workgroup id is the important one. It means the key, the record and the pointer chain are not the cause.
Standalone reproduction (no AnyPS5 code)
A C program (about 300 lines) and one GLSL compute shader. It makes two samplers (REPEAT and CLAMP_TO_EDGE) and a 64x1 R32_SFLOAT texture with texel
i = i. It dispatches 4 workgroups of 32 threads. Workgroupgsamples atu = 1.2578125through samplerg & 1. Wrap gives texel 16, clamp gives texel 63. Expected output per workgroup:16 63 16 63.On the Intel GPU:
[2],[8],[1024], runtime, with and withoutnonuniformEXT, with a branch, with 2 samples per invocation, with a two-level indexrequiredSubgroupSize = 32[2]fixedrequiredSubgroupSize = 32[8],[1024]or runtime (8 to 1024 descriptors, partially bound), index from a buffer, from a subgroup broadcast, with a branch, with 2 sampleswg0=16 wg1=16 wg2=16 wg3=16requiredSubgroupSize = 32+REQUIRE_FULL_SUBGROUPSrequiredSubgroupSize = 8or16NVIDIA, RADV and llvmpipe pass every variant. The validation layer reports nothing for the program.
The trigger is therefore: required subgroup size 32, a workgroup of exactly 32 threads (one SIMD32 thread), and a sampler array with more than 2 elements indexed per workgroup. The driver creates our compute stages with
requiredSubgroupSize = 32for wave32 programs, which is why the tests hit it.The compute shader of the reproduction
Workarounds I tested on the Intel GPU
APS5_SPANNED_WAVE=1: works. Both tests pass, 3 runs each. The program then runs asLocalSize 64with two 32-lane subgroups, so a workgroup is no longer one SIMD32 thread.computeSubgroupSize): not enough. The sampler check then passes, but both tests fail at a later check:a captured pointer selected through Phi faulted(--nested-sampler) anda captured pointer selected through Phi changed the result(--pointer-phi-sampler). The wave32 logic needs a subgroup of 32 lanes.Effect of
APS5_SPANNED_WAVE=1on the other registered testsI ran all 235 registered libSceAgcDriver tests directly (121 test executables, with the environment, timeout and working directory from
CMakeLists.txt), on each GPU:APS5_SPANNED_WAVE=1Between the two Intel runs only
agc_driver_nested_sampler_tableandagc_driver_pointer_phi_sampler_tablechange, from fail to pass. No test goes from pass to fail.Tests that fail on every device
These 13 tests fail on Intel, NVIDIA and RADV alike, with and without the spanned-wave switch:
agc_buffer_pool,agc_driver_stencil_replay_no_gpl,agc_host_import_second_mapping,agc_import_settle_deferred,agc_import_settle_deferred_other_family,agc_import_settle_earlier_import,agc_import_settle_first_use,agc_import_settle_retire,agc_import_settle_storage_image,agc_shader_bindless,agc_shader_frontend_pair,agc_storage_cpu_snapshot,agc_vertex_barrier. RADV also failsagc_pipeline_cache_file. I did not investigate them. They may come from my merge oforigin/main, from my local patches, or they may exist upstream. I did not run them on a clean checkout of the PR head.Caveats
--nested-samplerfails on every device witha V# with another buffer consumer was not refused by resource planning. I turned it off withAPS5_NO_DESCRIPTOR_SUBSTITUTE=1for all runs above. A clean PR head does not have this fallback.Suggestion
I did not change the tests or the driver. If you want a driver change, enabling the spanned-wave mode on ANV is the smallest one I found. It changes how every single-wave wave64 compute shader runs on that driver, so I leave the decision to you. Separately, the standalone program is a clean bug report for Mesa. I can attach the source and a short write-up, or file the Mesa report myself if you prefer.
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T20:50:56Z.
@Capmare thank you, this settles it, and the standalone program is the strongest part. With no AnyPS5 code, ANV gives workgroup 1 workgroup 0's sampler whenever the stage has
requiredSubgroupSize = 32and the sampler array has more than 2 elements. A fixed[2]array passes, and so does the default subgroup size. The validation layer andspirv-valreport nothing. So it's an ANV issue, not our SPIR-V.A correction to my last comment: the module carries no
NonUniformon that index, as you found. The emitter treats the index as uniform when the workgroup is one subgroup, and your forced-NonUniformrun shows the decoration makes no difference.The two tests stay as they are, since they're what caught it.
APS5_SPANNED_WAVE=1passing on ANV is a useful lead for a workaround on our side. We aren't changing anything for it yet.If you want to report it, your program looks ready to post as a Mesa issue as it stands (https://gitlab.freedesktop.org/mesa/mesa/-/issues). That's entirely up to you.
Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-18T20:58:29Z.
@EagleBearerYS thank you for the careful review and for the clear questions. They pointed me to the validation layer and to the exact failing dispatch, which is how I found the cause.
I posted the standalone program as a Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16622
I agree with leaving the two tests as they are and with not changing the driver yet. If Mesa answers, I will post the result here.
Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-18T22:51:32Z.
#7684 adds conservative table-key ranges and sentinel handling, with 3 CPU suites and a 7-case regression batch (5 real Vulkan, 2 CPU/mock) passing on its exact head. The overlap check found a textual conflict with this PR's capture refactor.
I propose #7684 first, then this PR can retain
TableColumn::allOnesKey, its plan-cache encoder/decoder field, and the heap/address sentinel fault predicate when moving capture intoReadColumn. The deliberately unbounded merged-pointer branch must also stay unbounded. The topics have no runtime dependency on one another.I left #7684 as a draft pending agreement on ordering. If the #7223 → #7395 sequence should go first, I can rebase the bounded change afterward and rerun the combined fixtures.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T22:54:19Z.
@fdfawef324 thank you for checking the overlap and listing what to keep. #7684 first works for us. On a trial merge of this PR's head (59b319a779) over #7684's df6aa653d1, the conflicts are small: six hunks in
ResourceMaterializer.cpp,ResourceTracker.cpp,ShaderDiskCache.cppand the shader debt file. They compose as follows:TableColumnkeeps both new fields,allOnesKeyand this PR'spointerKeyed, and the plan encoder and decoder write and read both.Phistays unbounded (maxKey = 0xffffffff), and every other column goes throughboundTableKey.ReadColumn, the key count keeps this PR's limit (the nested tables' parent budget), andoutsidetakes your heap/address sentinel fault predicate.If #7684 lands first, we'll merge
mainhere with those resolutions and rerun this PR's table tests on both runners.Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-18T22:58:31Z.
Agreed: #7684 first. I have marked it ready for review and linked your composition plan in its body. The published tests cover #7684 alone; the combined nested-table tests you describe remain the follow-up after merging main here.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by j2m304 on 2026-10-18T23:28:47Z.
Tested #7395 head 59b319a779 (including #7223) offline against a captured Wolverine compute request, with SPIRV-Tools enabled. Needed a local iterative Tarjan walk to avoid the previously observed stack overflow; used APS5_FORCE_STRUCTURIZER_FALLBACK=1 and disabled shader caching. This is a combined experiment, not a stock-PR title test.
The request loads, but still stops in resource analysis at
GetSamplerResource dword 0 is not a valid runtime value, with nested Phi / ReadConst inputs. Adding #6417's production invariant-word resolution and a local repeated-Phi folding loop following #6332's description did not resolve it. Seven CPU and seven nested-image/sampler/pointer GPU checks passed before that follow-up, and four CPU plus seven GPU checks passed afterward.A diagnostic traversal of the failing word's Phi edges finds 129 Phi nodes and 43 ReadConst nodes referring to 30 distinct runtime-read slots, plus arithmetic and lane-operation leaves. This is only the Phi surface, not a full dependency graph; it does not prove that the live sampler path combines different values.
Attached synthetic DescriptorMerge.cpp isolates the validator boundary: equivalent-slot Phi inputs are accepted, while distinct-slot Phi inputs are individually valid and rejected after merging, at depths 1/2/9. All six controls pass. This is a unit-level capability reproducer, not a minimized full resource-tracker/title reproduction and not evidence that the conservative rejection should be removed. No title code, capture or dump is included.
Is a synthetic full-tracker fixture retaining the incoming control-flow correlation the most useful next step for this shape? I have kept the title capture and memory dump local.
AI-assisted: yes. No compatibility or performance claim.
sampler-merge-reproducer.zip
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-19T04:43:20Z.
Little Nightmares Enhanced Edition (PPSA10737, version 01.004.000, on Windows 11 / RTX 5090 with #7413
cc6901685to get past an earlier hoisted table call) stops 2 min 46 s in on compute shader0x2010fa0000with the sameBitwiseAnd32Ballotlane-mask shape noted in this PR's description:In
0x2010fa0000,GetAddressResource@pc=0x3384has an unmerged high dword (arg1 = ReadConstBuffer@pc=0x15ecat+4) while the low dword (arg0) goes through nestedPhinodes that merge the matchingReadConstBuffer@pc=0x15ecat+0withimm=0x0andBitwiseAnd32@pc=0x1600(CompositeExtractU32x4@pc=0x15d4(Ballot@pc=0x15d4(...), imm=0x0), BitwiseNot32@pc=0x15fc(...))because the low-dword SGPR is reused for the loop's lane mask.With a local change in
TryMakeIndirectColumnthat unwrapsPhiarms to the single equivalentReadConstBufferorigin while ignoringimm=0x0andBallot-derived lane-mask expressions,0x2010fa0000compiles and creates its pipeline (414421 SPIR-V words in 26173 ms), and the title advances to its next stop on compute shader0x200c340000(computed/data-dependent s_swappc_b64 call target at program counter 0x000008b4 is not statically resolvable).AI-assisted: yes. Written with AI assistance and reviewed by me.
Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-19T05:25:12Z.
Following the agreed #7684-first order, #6488 is now rebased and verified at
a48c5a7c7321on main676d423968a1. Its lane-loaded image handle keeps the numeric key in argument 0 and an independent U32 load predicate in argument 1; an inactive descriptor load selects NullCode before a table fault, while active real UINT_MAX keys keep the unsupported-OOB fault.At your reviewed
59b319a77919head, pointer/nested columns use handle arguments 1/2 for parent-pointer words and move ordinary access into LookupTableWord/LookupTablePointer. Composition must retain the laneKey branch before interpreting those pointer operands, plus current SharedValues/Seal storage, sharedMode memo/hash identity and both complete metadata layouts. The features are separate; the operand convention is a concrete shared implementation point.I propose #7684, then #6488, then your #7395 rebase with both conventions and the masked-invalid-table controls retained. Only the #7684-first part is already agreed; this extension is a proposal. I am keeping #6488 in draft while that order is coordinated. Current #6488 CPU3 and Vulkan3 pass, including the new controls, but no combined #7395 runtime result is claimed. Let me know if the opposite order for these two is preferable.
AI-assisted: yes (Codex)
Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-19T08:45:34Z.
Marvel's Wolverine (PPSA03671) on this PR's head 59b319a779, as asked on #6191. Rocky Linux 10.2, Release build of the head as it is (no local patches), NVIDIA GeForce RTX 4070 SUPER (driver 615.71.09), cold shader cache, one run of about 9 minutes, then I stopped it.
GetSamplerResourceorGetImageResource), no[dispatch] failedand nopresentation failed.StorageTexturecreations in that time, on 371 distinct addresses. The same surfaces are created thousands of times (0x115df300007,681 times,0x11630600005,790,0x112c7b00005,787). At about 4 minutes the device memory was at 11.9 of 12 GB, two threads were at 100% CPU, and the process used 18 GB of RAM.So the next stop of the title on this head is not a refusal but this build storm. I think the cause is the one-image-per-table-element build of surfaces that appear at several extents (dynamic-resolution variants of one surface). On my local tree, substituting one representative per family of variants and building table entries lazily avoids it, and the same title then reaches the 3D scene and the Initial Setup menu. That is a separate topic from this PR. I can open it as its own PR if you want it.
Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-19T09:02:38Z.
Update on the ANV failure of the two sampler tests: the Mesa developers answered on Mesa issue 16622. It is fixed by Mesa merge request !37394 ("nir/brw: Fix texture/sampler accesses with EU fusion on Gfx12.X HW"). On Gfx12 two fused threads run in lock step and cannot have different sampler handles, which matches workgroup 1 getting workgroup 0's sampler. The fix is in Mesa 25.3.0 and later, and not in the 25.2 branch.
I checked it on the same Intel RPL-S with the freedesktop Flatpak runtimes' Mesa, using the standalone program from the issue. Mesa 25.2.7 (the distribution package) gives 18 failing runs. Mesa 26.2.2 and 26.2.4 give 0.
I did not run
agc_driver_nested_sampler_tableandagc_driver_pointer_phi_sampler_tablethemselves on the newer Mesa. So the description can say that the two tests fail on ANV with Mesa 25.2.x and that Mesa 25.3 and later has the fix. The tests stay as they are.Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-19T12:50:21Z.
A note on the Wolverine result above: the build storm is not specific to this branch. On current
main(b106f6f8c) the same title also presents no frame in 5 minutes: GPU memory is full and the same sampled textures are rebuilt about 418 times each (20,392 creations). The numbers for both builds are in #6099. So the next stop for this title, after this PR, is the churn, which is the dynamic-resolution part of #6099. I have a change for it on my local tree and will send it as a PR once my open PR is merged.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T14:26:24Z.
Thanks for the sampler and pointer-Phi extensions. #7223 has moved to
74700a08d1: it now carries your shared-consumer fix (same patch as0df7d3256e, with your authorship) and is merged with currentmain. This branch still sits on #7223's older head and conflicts withmaininResourcePlan.hpp,ResourceMaterializer.cppandRecompiler.cpp.Could you restack your three commits (
65a15b9919,4a4db4bf94,b91f0508d5) on #7223's current head? The review would then cover only those three. Note that #7223 moves the disk-plan format to 42, so any further plan field here needs 43.Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T05:58:19Z.
@oneandonlydean, done: the three commits are restacked on #7223's
74700a08d1, so the review covers only them. The new hashes are41220941d8,9200c3a2d5andf6fb8b64a9.0df7d3256eis dropped, since #7223 carries it.9200c3a2d5adds the plan's pointer-keyed field, so it movesShaderDiskCache::FormatVersionto 43 andImageTableAbi::Versionto 4. The other two commits change no format.TableColumnkeeps #6232'sselectedandselectionfirst, thenpointerKeyed. The plan encoder, the hash andsameColumnstake the new field too.agc_shader_disk_cacheand the rest of the image-table family pass 10 runs in a row (21 tests);^(agc|shader)tests pass, 838 of 838.mainthe way CI builds it (run), the nested and pointer-Phi table tests,agc_shader_disk_cacheandagc_shader_bindlesspass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass.mainsince #7223's merge: #7966 (merged 2026-10-21 01:21 UTC) also movedFormatVersionfrom 41 to 42. #7223 andmainnow both say 42 for different layouts, and git merges that line without a conflict. This branch's 43 is past both. It's also the one line where this branch conflicts with currentmain, until #7223 takesmainagain. If #7223 moves to 43, this branch moves to 44.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:08:34Z.
@EagleBearerYS thanks for the restack and the format notes. A review of the three restacked commits is next. On the version line: whichever of this, #7223 and the other open
FormatVersionbumps lands first takesmain+1, and the rest move up at their own merge, so we will check it again just before merging.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:45:25Z.
@EagleBearerYS a heads-up on the version line: #8295 has merged and moved
main'sShaderDiskCache::FormatVersionto 43, the same value this branch writes, so git now merges it without a conflict. This branch needs a value above 43. #7223 (which still writes 42) lands first, so the exact number depends on what it takes; we will check it again just before each merge.ImageTableAbi::Versionis unaffected.Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T11:48:48Z.
@oneandonlydean, on the version line: #6683 merged with
ShaderDiskCache::FormatVersion44, and you asked #7223 to take 45, so this branch now writes 46.ImageTableAbi::Versionstays 4.92200f93e3merges #7223's current head87168157a2. The only conflict was that line.6c1371b261mergesmainb6fe513b9a, so the branch merges cleanly withmainagain. Its only conflict was the same line.41220941d8,9200c3a2d5andf6fb8b64a9.agc_driver_image_table,agc_shader_disk_cacheandagc_shader_bindlesspass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass. The libc and libkernel suites pass, apart from libc'sprecise_waittiming test on Linux, which this branch doesn't touch.If #7223 takes a different number, this one moves to the next one above it.
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T13:07:44Z.
Review: APPROVED
Reviewed — approved
The head merges cleanly into
mainand builds. The four new nested and pointer-keyed table tests pass on an NVIDIA GPU under the Khronos validation layer with noVUID-messages, and they fail with #7223's production code. I found nothing blocking; two non-blocking points are about stale wording.Scope: the PR's diff against
mainalso carries all of #7223 (open). I reviewed this PR's own change, which is the diff from #7223's head0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461to this head (13 files, +489 −43). #7223's code is not covered by this review.What I ran
e04a7057655626a8815d8c9293ae58651f9e180bmain:157b02c4f1803e9d2cd757677b9a805961203fc40dbf5478b2aaaac7f2a5f7a12e3724d9a2346461Results
maingit diff --checktools/check_conventions.py --base origin/mainAll conventions checks passed.main, validation layermain)VUID-linesmainwas not found but was requested by env var VK_INSTANCE_LAYERSVK_LAYER_KHRONOS_validationMerged tree
main
Negative control
On the merged tree I replaced
core/shaderwith #7223's head version, kept the PR's tests, and rebuiltagc_driver_image_table_tests.agc_shader_disk_cachewas left out because its new round-trip test uses thepointerKeyedfield, which doesn't exist without the change. #7223's head is behind currentmain, so this also reverted a few unrelatedcore/shaderfiles to their older versions; the build still succeeded.All four new tests fail with the refusals the PR describes. #7223's own nested tests still pass:
Output
Findings
Blocking
None.
Non-blocking
Test summary lines still claim refusal checks that were removed. The last three test commits dropped the refusal assertions, as the maintainer asked in the 2026-10-29 comment, and the
refusedhelper is gone. The success lines still say otherwise:ImageTable.cpp:1635prints "... faults, budget and refusals checked".ImageTable.cpp:1799prints "... with sharing, budgets and refusals".The maintainer's comment also asked for this wording to be dropped. Suggested fix: remove "and refusals" from both lines.
The description's version and ordering notes are out of date.
ShaderDiskCache::FormatVersion = 51(ShaderDiskCache.hpp:16), because #7223 now takes 50.153400ba2b, but the branch now merges #7223's0dbf5478b2.The number is fine as committed. Only the text needs updating so whoever merges sees the current numbers.
Notes from reading the code, no change requested:
parentPointer. The lookup does not depend on which Phi arm produced the value. That is why acceptingBallotlane-mask words and same-column copies under other keys is sound: a value that matches no captured record faults as outside the snapshot, and a value that matches a captured record reads the descriptor the hardware would read at that address.mergedinTryMakeIndirectColumn(IsPhi() && UnwrapTableRead(...) == nullptr) only widens what plans for non-buffer handles. For buffer handles, a Phi thatUnwrapTableReadreduces to one record read now takes the key-bounded path. The description explains this as #7880's interplay, andagc_shader_bindlessandagc_shader_memorypass here.pointerKeyedcolumn that is not indirect, is a buffer, or has a parent, and thestatic_assertsizes, the field count and the minimum record size all follow the new field.docs/dev/debt/shader.mdcovers the new limit: 65536 captured record pointers, with uncaptured pointers faulting.Not verified
mainuntil #7223 merges.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T08:26:45Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
This pull request does not merge cleanly into
main(4f41f4c375): head6cb37cc9edconflicts incore/shader/recompiler/ShaderDiskCache.hppdocs/dev/debt/shader.mdPlease rebase it onto current
main. I will review the change once it merges cleanly.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T14:18:14Z.
Review: APPROVED
Re-checked — approved
Since
e04a705765the PR has fixed the test wording, extended the per-snapshot descriptor-epoch check to a nested S# table that is the shader's only table (with a new test), put libc on PATH for both nested retry tests on Windows, moved toFormatVersion63, and resolved #12246'sresourceViewsloop in a merge. The checks pass, the focused tests pass, and the new test fails without the fix. I found nothing blocking.What changed since my last review
4769d5a745: removes "and refusals" from the nested image and nested sampler success lines.967f0dbebb:TableSnapshotter::Run()now setshasIndirectfor a sampler when its column isindirector its heap source is itself a table column. This is the same test the image loop already used. The commit addsagc_shader_nested_sampler_snapshot_retry.5fdf20fc3d: on Windows, puts libc's directory on PATH for bothagc_shader_nested_snapshot_retryandagc_shader_nested_sampler_snapshot_retry.f4781de1f7: setsShaderDiskCache::FormatVersionto 63.mainis at 52, so this stays above it.mainand of #7223's7f36e41c45:6cb37cc9edmoves #12246'sresourceViewsloop out ofCopyRecordsand back intoSnapshot(). #7223's own budget-reset commit is out of this review's scope, as before.What I ran
63b5c09df9776ccd7d0ce018dfd676931e2d7639main:4f41f4c375f5abb487dbd184fbc150f31994d762fbf279248cc3902f161e51a442c76155374f0f4bgit diff --checkcheck_conventions.pyAll conventions checks passed.main.VUID-lines;layer_missing_inemptyagc_shader_disk_cacheat 6.4 s.agc_shader_nested_sampler_snapshot_retryfails withnested retry: expected inner retry and outer revalidation. #7223'sagc_shader_nested_snapshot_retrystill passes. After the restore, both pass and the worktree is clean.Previous findings
4769d5a745removes "and refusals" from both lines.grep refusalsfinds nothing inImageTable.cppat the head.mainhas 52) and names #7223's7f36e41c45in the Ordering paragraph. Two small leftovers: the first checklist line still says "merged with #7223's head0dbf5478b2(mainf7e84c4cf1)", and the Version bumps paragraph still saysmainis at 51 (it is at 52). Neither needs to block.New findings
Blocking
None.
Non-blocking
CopyRecordsbuilds nested children (core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:1490), and onlySnapshot()fillsresourceViews(:1502-1510). For an image reached through a nested child, the materializer therefore always uses the child's raw words (:2132-2133). The merge commit argues this is exact becauseimage.tableonly indexes top-level tables. However,layerRowsCompatibleis set without regard to how the T# is reached (core/shader/recompiler/Optimization/src/ResourceTracker.cpp:2402). So a sampledDim1DArrayT# read through record → pointer → V# would be planned as layer-rows compatible while its descriptor is neither normalized nor registered. No test covers that combination, and I did not check what the emitter does in that case.resourceViewsfor nested children of a candidate image, or clearlayerRowsCompatiblefor images whose column has a table-column heap source. Alternatively, list the gap indocs/dev/debt/shader.md.Notes on the new code, with no change requested:
967f0dbebbmirrors the image loop exactly (ResourceMaterializer.cpp:755-763against:746-754).plan.descriptorSources.at(column.heapSource)throws on an out-of-range source instead of reading past the end.Not verified
7f36e41c45budget reset, which is part of this PR's diff againstmainuntil #7223 merges.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T20:20:09Z.
Review: COMMENTED
Reviewed — comments
The review covers the pointer-keyed sampler and image-table changes at head
3c58f422eef1fa2bb8950f704a05acb3c4a88989; I found no verified blocking defect, but did not read every changed line or run checks, so a formal decision is not justified.What I ran
Read the prepared description, commit list, manifest, diff, review-folder README, and targeted ranges from the pinned repository reader. No tests or builds were run.
Results
Findings
Blocking
None verified in the code read.
Non-blocking
None.
Not verified
The full changed-line sets were not read, so the remaining changes have not been reviewed. In particular,
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas excluded from the review folder and was not read through the repository reader; several added ranges in other files were also not inspected. The author reports extensive Linux and Windows test runs and hardware runs indescription.md; these were not performed by me. No merged-preview check or negative control was run.Files read:
review/description.md,review/commits.md,review/manifest.json,review/diff.patch,review/README.md; targeted ranges incore/shader/recompiler/Optimization/src/ResourceTracker.cpp,core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp,core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp, andcore/shader/recompiler/ShaderDiskCache.cpp.Files excluded or not fully read:
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas excluded as too large; added-line ranges in the other changed files were not all read.review/files.jsonwas not available in the review folder; the changed-file inventory came from the review-folder listing and README.To get this to a good state
Nothing is required. Optional: complete the changed-line review and run the relevant checks on this head before making a formal merge decision.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T05:03:57Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the points below are optional.
What I ran
I reviewed head
5b21241399dda4bfacfd086c0f8bd2acde309a51using the prepared diff and the pinnedrepo_read.pyreader. I did not run commands or tests. The description reports repeated focused and CI runs; I treated those as author supplied results.Results
Findings
Blocking
None verified.
Non-blocking
Not verified
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas excluded from the bundle; only the changed ranges were read through the reader.review/description.md,review/commits.md,review/manifest.json,review/diff.patch; changed source ranges incore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp; and targeted ranges incore/shader/recompiler/Optimization/src/ResourceTracker.cpp,core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp,core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp,core/shader/recompiler/ShaderDiskCache.cpp,core/shader/recompiler/ShaderDiskCache.hpp, andcore/shader/recompiler/ImageTableAbi.hpp.ShaderMemory.cpptext. No other changed file listed in the manifest was identified as excluded.To get this to a good state
Nothing is required. Optional: retain clear documentation of the known Intel driver behavior and its reported workaround.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T05:49:05Z.
Review: COMMENTED
Reviewed — no blocking findings
The change targets nested and pointer-keyed descriptor table reads; this review is incomplete because several changed files were not read, so a formal decision is not justified.
What I ran
Reviewed the supplied diff and description for head
6f09da1100e25722400f7aa6bb1253e36c64bb5c. No test or build commands were run.Results
Findings
Blocking
None verified in the portions reviewed.
Non-blocking
None.
Not verified
Read
review/description.md,review/manifest.json, andreview/diff.patch(lines 1–90). The description includes author-reported test results; they were not independently verified. Did not readreview/commits.mdor the changed repository files at the pinned head. The manifest shows 14 changed files, includingShaderMemory.cpp, excluded from the review folder because it was too large. The remaining changed-file contents and behavior are not verified.To get this to a good state
Nothing is required. Optional: complete review of the changed files and run the relevant tests before making a formal approval decision.