Repository navigation
feat(shader): raise the image limit to 128 and name the counts in its refusals - #10489
oneandonlydean merged 24 commits into
Conversation
… refusals ShaderInfo::MaxImages goes from 64 to 128. Nothing that holds per-image data is narrower: the ImageBase, MipCountBase, CompareBase and StoreQuantizeBase specialization ranges reach 1663, 8447, 49919 and 12799 at 128 images, below the next range at 4096, 12288, 57344 and 16384; the runtime ShaderData image array holds 256; and no mask is indexed by image. Direct sampled images stay bound to the 64-element typed heaps, so images past 64 come through image tables. The tracker's "image resource limit exceeded" and the binding builder's "runtime image count exceeds the static capacity" now name the count and the limit, as in "(129 of 128)". FormatVersion goes to 51: boykopovar#10000 is at 49 and boykopovar#9969 at 50. The selected-record limit test is sized for 128 images: 256 heap records, the direct T#s and samplers past the 130 key words, and the two-heap split scaled from the limit (40 and 30 at 64, 80 and 60 at 128).
agc_shader_image_limits plans and binds 65 and 128 image table images, each element holding its own T#, and 64 table images followed by 64 direct images, whose image 127 has its specialization constants at 1659 to 1663 with no ID emitted twice. 129 images are refused with "image resource limit exceeded (129 of 128)", and a ShaderInfo of 129 images with "runtime image count exceeds the static capacity (129 of 128)". agc_driver_many_images samples 65 images on the device, a table image and 64 direct images in both orders, so image 64 is once a direct and once a table image, and checks that each image read its own texels.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
MarcZX10
left a comment
There was a problem hiding this comment.
I reviewed the current diff and reported image-limit tests. Two integration/verification items remain. First, git merge-tree against current upstream main (3fcb5e4) conflicts in core/shader/recompiler/ShaderDiskCache.hpp: this branch sets FormatVersion to 51 and removes LoadSharedPlan, while main still has version 47 and that declaration. The body says this PR goes after #10000, #9989 and #10440, and its format-version sequence also cites #9969, but the checklist lists only #10000 as a dependency. Please make the full predecessor/landing order explicit and resolve the conflict without dropping either side's cache changes when the predecessors land. Second, this is an AGC/shader-recompiler change. The report's paired validation run compares against #10000's earlier head 51a0116de, not current main; the repository requires the same focused tests on main and the change on the same GPU with the required Vulkan validation environment and no new VUIDs. Please attach that current-main comparison (or update the evidence after the dependency stack lands). I did not approve this head.
|
@MarcZX10 thanks. That review is on 8e0d4f5. The head is now e916c02, a merge of #10000's d6061d4, which merges
Could you re-review e916c02? |
Takes boykopovar#10000's merge of main (boykopovar#10440's 64-bit image atomics next to the widened sampler mask).
|
First run on real GPUs, Windows. Windows 11 10.0.26300, WinLibs GCC 15.2.0, Release;
AI-assisted: yes (Claude Code); results above were run on this machine. |
|
@wachi35676 thank you, that's the first run of this on real GPUs, and the 128-image variant with 64 table T#s next to the 64 direct ones is exactly the case the raised limit is for. I've put your results in the Tested section and added both GPUs to the list. The |
The entry was over 1000 characters, so the debt-length check warned on every change to it. It now states the masked-key case in the same sentence as the unevaluated key and drops the reason clause, keeping the behaviour it records.
✅ NVIDIA GPU test: passedPR head
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)Validated but not compared (4, not in the main baseline's validation pass)Validation IDs already present on main (8 IDs in 527 tests)Skipped (50)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
✅ AMD GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (7, not counted against this PR)Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)Validated but not compared (4, not in the main baseline's validation pass)Validation IDs already present on main (8 IDs in 527 tests)Skipped (61)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
boykopovar#7223 takes FormatVersion 56 on main, above this branch's 54, so this branch moves to 57, the next number no open pull request holds.
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validated but not compared (4, not in the main baseline's validation pass)Validation IDs already present on main (13 IDs in 546 tests)Skipped (50)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (9, not counted against this PR)Validated but not compared (4, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 557 tests)Skipped (60)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
…nd 58176 main's SamplerLodBiasBase takes 57728 to 57791, one ID per sampler, inside the FMASK format range this branch had moved to 57728. The FMASK format and volume gather ranges now start at 58048 and 58176, each MaxImages wide, above the IDs other open pull requests take below 58048.
…D chain SamplerLodBiasBase sits between MinLodBase's per-image range and the FMASK format range, so the static_assert chain now checks both of its edges.
✅ NVIDIA GPU test: passedPR head
Failing on main too (3, not counted against this PR)Validated but not compared (4, not in the main baseline's validation pass)Validation IDs already present on main (9 IDs in 593 tests)Skipped (55)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
…at, 63 yabanana's #7223 now takes 51, the number this PR had, and 52-62 are held by the open PRs: #10000 52, #8939 53, #10489 54, #9457 55, #9633 56, #9749 57, #10193 58, #9790 59, #9969 60, #10846 61, #7642 62. So this PR takes 63 and a cache written by #7223's recompiler is not read as this one's.
What
With #10000, Ghostrunner (PPSA03685)'s compute shader 0x200c520000 gets past
sampler resource limit exceededand stops onimage resource limit exceeded(frankea's offline replay, onmain+ #9068 + #8070 + #9701-#9703 + #8939 + #9969 + #10000). The cap isShaderInfo::MaxImages, 64. This PR raises it to 128:image resource limit exceeded (129 of 128), the image being added against the limit, and the binding builder's isruntime image count exceeds the static capacity (N of 128). A replay that still refuses then says what it needs.ImageBasespec IDs, 1024 + 5 per imageVertexBase4096 (614 images)MipCountBase, 8320 + 1 per imageStoreQuantizeBase12288StoreQuantizeBase, 12288 + 4 per imageDescriptorIndexBase16384CompareBase, 49152 + 6 per imageFoldOffsetBase57344MinLodBase, 57600 + 1 per imageSamplerLodBiasBase57728 (#14621, 1 per sampler, to 57791)FmaskFormatBase, 58048 + 1 per imageVolumeGatherBase58176VolumeGatherBase(#9183), 58176 + 1 per imageImageComponentBase65536RuntimeAbi::ImageCapacityDescriptorIndex,HeapCountBaseand the per-sampler bases are indexed per heap element, binding kind or sampler, not per image. No 64-bit mask is indexed by image:directSamplers[image]holds sampler bits. Device limits are still checked when the layout is created.On
main,FmaskFormatBase(57472) left room for 64 images belowMirrorUnnormalizedBase(57536), so a direct FMASK image at index 64 or above would share sampler k's mirror-axes ID (XairRrR's review). This PR moves it aboveMinLodBase+ 128, andDescriptorBindingBuilder.cppnow has astatic_assertfor each per-image and per-sampler range: each base plus its limit stays at or below the next base, so a later limit change or new base fails to compile. fma-rc's #9183 addedVolumeGatherBaseat 57664, which at 128 images would overlapFmaskFormatBase's new range, so this PR moves it too, making each per-image rangeShaderInfo::MaxImageswide, and adds it to that chain. danielhorngt's #14621 has since taken 57728-57791 forSamplerLodBiasBase, one ID per sampler. So 482e813 movesFmaskFormatBaseto 58048 andVolumeGatherBaseto 58176, above the IDs other open PRs take below 58048, and e626035 addsSamplerLodBiasBaseto the chain, betweenMinLodBase's range andFmaskFormatBase.128 images (127 selected tables, 1 direct), 128 pairs.shader image heap capacity exceeded). Images past 64 come through image tables, so 0x200c520000 gets past the tracker only if at most 64 of its images are direct.agc_shader_replay --prepare, on Linux with an RTX 5070, on fix(shader): narrow a goto junction Phi to the arm its branch allows #14636's 8e5b82d withMaxImagesraised locally rather than with this PR: each needs 77 images, overmain's 64 and under this PR's 128 (comment on #13538), and freneza's reply on #14636 confirms the 77 and that module size, not the image limit, is what stops them. It doesn't pass: the modules come to 33.9-35.2M SPIR-V words each, andvkCreateComputePipelineshadn't returned after 17 min 49 s at about 19 GB, when freneza's own memory guard stopped it. The module size is what Ratchet & Clank: Rift Apart (PPSA01474): the compute shader whose s_swappc_b64 calls a computed target becomes a 2.5M-word SPIR-V module that RADV cannot compile (nir_opt_copy_prop_vars grows past 16 GB; Mesa 25.2.8 and 26.2.6) #13538 is about, not this PR.FormatVersion60:mainis at 57 since frankea's feat(agc): blend into 11_11_10 float color targets in the pixel shader #9020 (11-07 11:49Z). Ours take one number each: feat(shader): raise the image limit to 128 and name the counts in its refusals #10489 60, feat(agc): look up table images at run time through a device image table on the GPU heap (APS5_GPU_PATH) #7642 62, feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395 63, fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 66, fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457 67, fix(shader): follow a conditional pointer chase through a V# behind a pointer-keyed record pointer #9633 70, fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790 71, fix(shader): read a chased pointer's high word at its own offset #9749 72 and fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer #9969 73. This PR held 57 from 9544416 (11-04 04:33Z), as feat(agc): blend into 11_11_10 float color targets in the pixel shader #9020, ZSWolt's fix(shader): serve ds_ordered_count in wave launch order #12944 and savvaniss's feat(shader): decode more GCN instructions and take a GCN image's dimension from its T# #9889 and perf(agc): bound vertex-indexed guest buffers by the draw's vertex range #9897 did. All of them changemain's 56 to 57 on the same line, so git merged feat(agc): blend into 11_11_10 float color targets in the pixel shader #9020'smaininto this PR with no conflict. feat(agc): blend into 11_11_10 float color targets in the pixel shader #9020 landed first, so this PR moved to 58 (d5b9ccd). frankea's fix(agc): retire a multisampled color target a write-only storage image overwrites #10049 and ntamas94's perf(agc): bound instance-indexed guest buffers by the draw's instance range #14032 also held 58, so the head moves to 60 (74407aa). That's also what Dean asked of feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508 on 11-07: "take a freshFormatVersionnumber, since other open PRs also bump that line" (comment). The other open PRs changing it hold 51 (fix(agc): preserve proven base formatted buffer read extents #14944), 52 (fix(shader): keep faulting invocations in their wave and mask their later writes #6416), 53 (feat(agc): blend into 10_11_11 unorm color targets in the pixel shader #9748), 57 (feat(shader): decode more GCN instructions and take a GCN image's dimension from its T# #9889, perf(agc): bound vertex-indexed guest buffers by the draw's vertex range #9897, feat(agc): export stencil operation values through an attachment #10351, feat(agc): test the depth bounds in the pixel program when the device lacks the depthBounds feature #11551 and fix(shader): serve ds_ordered_count in wave launch order #12944, the same asmain), 58 (fix(agc): retire a multisampled color target a write-only storage image overwrites #10049 and perf(agc): bound instance-indexed guest buffers by the draw's instance range #14032), 59 (fix(shader): emit OpFmaKHR for f32 fma when VK_KHR_shader_fma is available #15343), 61 (feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508), 62 (feat(agc): back extra guest mip levels with storage images #7085), 68 (fix(shader): narrow a goto junction Phi to the arm its branch allows #14636), 69 (feat(shader): flatten oversized 1D image arrays to 2D #14871), 73 (fix(shader): accept a nested S# whose V# gives the key of a sibling V#'s T# array #15555, fix(shader): let a V# read again at dispatch feed plain reads #16812 and fix(shader): let a word of a V# read again at dispatch feed a pointer #16814, on fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer #9969), 74 (fix(shader): skip a bit-field low word in a pointer-keyed table's Phi #14853), 75 (feat(agc): serve lane-keyed, pointer and runtime image-table columns #10193, fix(shader): follow a pointer loaded straight through a pointer-keyed record pointer #16472 and fix(shader): follow pointer-keyed table chases up to 8 steps #16631) and 76 (feat(agc): resolve table samplers through device image keys #13928 and feat(agc): resolve runtime sampler addresses through device image keys #13929), from a check of every open PR's head at 17:41Z on 11-07. Whichever lands second on a number takes the next free one.mainmoves its range, and checks the merged values whether or not git reports a conflict:SamplerLodBiasBase, now onmain: danielhorngt's fix(agc): apply a LOD bias beyond the device limit in the shader #14621 merged (1322bab, 11-05 23:13Z) withSamplerLodBiasBaseat 57728, one ID per sampler, inside theFmaskFormatBaserange this PR had moved to (57728-57855). This PR moved its two bases above it (482e813, see Tested). shahulmubeen-a's feat(agc): implement unnormalized S# clamp modes 4 and 5 (half border) #14964 addsHalfBorderUnnormalizedBaseat 57728 too, which now overlapsmain'sSamplerLodBiasBaserather than this PR's ranges (BunnyFl's note). This PR leaves 57792-57855 free, which feat(agc): scale unnormalized samples to the selected mip on multi-level 2D views #16935 takes (below).UnnormalizedScaledBaseat 57792, one ID per sampler, for a different Gran Turismo 7 (PPSA01317) stop: Gran Turismo 7 (PPSA01317 01.710.000): aborts after buying a used car: "guest texture sampled with unnormalized coordinates ... (base level 0, levels 10, layers 1, view type 1)" #16650, where an unnormalized S# selects a nonzero mip on a multi-level 2D view. This PR raises the image limit that the title's table-call shaders exceed (above).ShaderInfo::MaxSamplersis 64 on both, so feat(agc): scale unnormalized samples to the selected mip on multi-level 2D views #16935's range ends at 57855, below this PR'sFmaskFormatBase(58048) and fix(shader): gather a 2D image's image_gather4_l at its LOD #12790'sGatherLodBase(57856). Git reports one conflict, inPipelineSpecialization.hpp: both PRs add their lines right afterSamplerLodBiasShaderThreshold, this PRFmaskFormatBaseandVolumeGatherBase, feat(agc): scale unnormalized samples to the selected mip on multi-level 2D views #16935UnnormalizedScaledBase(merge-tree of 9ac49a7 with 74407aa, 01:08Z 11-08). Either order works: whichever lands second keeps all three lines and addsUnnormalizedScaledBaseto thestatic_assertchain, withSamplerLodBiasBase + ShaderInfo::MaxSamplers <= UnnormalizedScaledBaseandUnnormalizedScaledBase + ShaderInfo::MaxSamplers <= FmaskFormatBase.GatherLodBase(57856),GatherLodBiasBase(57920) andGatherImageMinLodBase(57984), 64 each. Its IDs no longer overlap this PR's ranges. Since fix(agc): apply a LOD bias beyond the device limit in the shader #14621 merged, fix(shader): gather a 2D image's image_gather4_l at its LOD #12790 conflicts withmainitself inPipelineSpecialization.hppandDescriptorBindingBuilder.cpp. Its ownstatic_assert(VolumeGatherBase + ShaderInfo::MaxImages <= GatherLodBase) fails to compile with this PR, whoseVolumeGatherBaseis now aboveGatherLodBase.MipCountBaserange (8320-8447): Amoenus's feat(agc): back extra guest mip levels with storage images #7085 addsLevelsPastViewBaseat 8384, one ID per image, the first free ID abovemain's 64-image range. feat(agc): back extra guest mip levels with storage images #7085 had it first (7f56df7, 10-19); this PR widenedMipCountBase's range in 3258617 (10-24). Git merges the two with no conflict inPipelineSpecialization.hpp, and nostatic_assertnames both bases, so in a shader with 65 or more images, image 64's mip count would share image 0'sLevelsPastViewBaseID. fdfawef324's draft fix(agc): keep texture images inside their extent's mip chain #6280 takes 8384 too, for its ownLevelsPastViewBase.DeviceSamplerClassBasethere, clear of this PR's ranges.The commits:
FmaskFormatBaseandVolumeGatherBaseto 58048 and 58176, above fix(agc): apply a LOD bias beyond the device limit in the shader #14621'sSamplerLodBiasBase.SamplerLodBiasBaseto thestatic_assertchain.Tested
agc_shader_image_limits(CPU,tests/ShaderMemory.cpp):agc_driver_many_images(Vulkan,tests/execution/ManyImages.cpp): 65 images, each a texture holding its own value, sampled and stored to its own output word, in both orders (a table image then 64 direct images, and the reverse). 128 on the device would take 84 s on a cold runner, so the 128-element binding is covered by the CPU test.ShaderInfo.hpp's constant and the tracker's message reverted,image limits: 65 images were not planned: image resource limit exceeded, and the device test refuses withimage resource limit exceeded.agc_shader_image_limitsfails before; after, 17 run, 16 pass, 1 skip (agc_driver_many_images, no Vulkan device), 0 fail.APS5_SKIP_TIMING_TESTS=1.agc_driver_sgpr_pattern_fill_keysload race;--repeat until-fail:20on the 33^agc_shader_and 7image_tabletests, all 20 of 20.agc_driver_many_images,agc_driver_many_direct_samplersand the 7agc_driver_image_table*tests: identical VUIDs on both trees, only the knownVUID-VkDeviceCreateInfo-pNext-pNextat device creation, and no newVUID-. On the base,agc_driver_many_imagesrefuses before it dispatches; on this PR all 9 pass.mainc9b2660. Against thatmain,ShaderDiskCache.hppdiffers only inFormatVersion, 47 to 54, and keepsmain'sLoadSharedPlan;ShaderDiskCache.cppand its test differ only in feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000's 64-bitimageSamplers. This head merges cleanly intomain30be9b4. On GitHub's runners, 10 runs (run) of the sampler, selected-record, image-sample and disk-cache sets (^.*sampler,^.*selected_records,^.*image_sample,^.*disk_cache) and the 12 other shader tests built from the changed files,agc_shader_image_limitsamong them: Linux 32 run, 32 pass, 0 skip, 0 fail. Windows 34 run, 22 pass, 12 skip (no Vulkan device), 0 fail. The libc and libkernel suites pass on both (123 and 204 tests on Linux, 150 and 217 on Windows), run withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.mainc9b2660 against e916c02 (CONTRIBUTING's AGC rule), on GitHub's Linux runner (llvmpipe, LLVM 20.1.2), withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V.main's arm runsmain's implementation of every file this stack changes, feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000's included.main; the layer was inserted 12 and 11 times.agc_driver_many_images,agc_driver_many_direct_samplersand the 7agc_driver_image_table*tests, with the other shader tests. 26 pass with this PR and 22 onmain; the layer was inserted 10 and 8 times.was not found but was requested, both trees report onlyVUID-VkDeviceCreateInfo-pNext-pNext, and this PR adds noVUID-message.agc_shader_image_limitsandagc_driver_many_images, and feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000'sagc_shader_sampler_limitsandagc_driver_many_direct_samplers, don't exist onmain, so only this PR's tree runs them.FormatVersionand the debt docs. It's the sameshader_200c520000.prepare.req, dumped onmain74acfad, and the sameagc_shader_replay --preparewithANYPS5_NO_SHADER_CACHE=1as their run without this PR. CPU replay only.image resource limit exceeded.sampler resource limit exceeded, the 64-sampler cap.srtIR (on the fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer #9969 stack): 1,047GetImageResourceand 941GetSamplerResource, 619 of them with distinct argument tuples. These are SSA tuples, not distinct memory locations.main(d82e3f9) (run). No conflict of its own; this PR's diff over feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000 is unchanged. The sampler, selected-record, disk-cache, image-table andagc_shader_image_limitstests pass 10 runs in a row. Linux: 27 run, 27 pass, 0 skip, 0 fail. Windows: 29 run, 23 pass, 6 skip (theagc_driver_image_tabletests, no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.mainaeff26b,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, no validation layer. The 64 image, sampler, record, disk-cache, image-table andagc_shader_entries pass on both GPUs; withShaderInfo::MaxImagesset back to 64,agc_shader_image_limitsandagc_driver_many_imagesfail on both. A local variant ofManyImages.cppwith 64 table T#s next to the 64 direct ones, in both orders, binds64 image table elements and 64 heap elementswith every output word holding its own image's texel and nothing written past them; 129 images refuse withimage resource limit exceeded (129 of 128). Of 253agc_entries the only failure, with and without this PR, isagc_driver_depth_plane_partial_store(AGC: imported depth-plane partial-store test fails refresh-proof assertion on Windows (NVIDIA and AMD) #10664).main85f8e11, and a trim of this PR's debt entry (run). In the Windowsset_tests_propertiesline ofcore/libs/prx/libSceAgcDriver/CMakeLists.txt, the merge keepsmain's three result-memo budget tests (fix(shader): bound the bytes the recompiler's result memos hold #9989) with feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000'sagc_shader_sampler_limitsand this PR'sagc_shader_image_limits; this PR's diff over feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000 is otherwise unchanged, andFormatVersionstays 54. 0fd6998 brings the image-table entry indocs/dev/debt/shader.mdunder thedebt-lengthlimit, from 1069 characters to 989, as the reply to wachi35676's run said it would: the masked-key case joins the sentence on the unevaluated key, and the reason clause goes; the behaviour it records is the same. Theagc_shader_tests with the tests built from the files the merge changes pass 10 runs in a row. Linux: 321 run, 311 pass, 10 skip (seven AGC tests on lavapipe and three video-out tests with no display or Vulkan device), 0 fail. Windows: 347 run, 260 pass, 87 skip (84 AGC tests and the same three video-out tests, no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (145 and 211) and on Windows (174 and 232). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.main0c5401d and its two test-only commits: the refusal checks @oneandonlydean listed on feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000 go, andagc_driver_many_direct_samplersskips on a device with fewer than 33 samplers per stage or set (@jotitadev's MoltenVK run). No conflicts;FormatVersionstays 54, and this PR's changed lines over feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000 are the same. The image-limit, sampler-limit, image-table, sample-order, shader and disk-cache tests ran 10 times with no failure. Linux: 26 run, 26 pass, 0 skip, 0 fail. Windows: 28 run, 25 pass, 3 skip (agc_driver_image_table,agc_driver_many_direct_samplersandagc_driver_sample_order; no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel passes 283 of 286: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 at 1829def (job). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.mainb87d3d8 with the macOS port PRs and one local patch (FormatVersionresolved to 54): MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVKmainwith SPIRV-Cross Ratchet & Clank: Rift Apart: SIGSEGV since #861, an address-less 64 GiB reservation now takes the addresses the title hints next #2704,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1.agc_driver_many_imagesandagc_shader_image_limitspass 3 of 3 on both drivers (MoltenVK'smaxPerStageDescriptorSampledImagesis 256).ShaderInfo::MaxImagesset back to 64, both fail 3 of 3 on both drivers withimage resource limit exceeded (65 of 64).VUID-vkCreateDescriptorSetLayout-support-09582(×2) inagc_driver_many_images, the image-table layout MoltenVK's layout-support query rejects (ThevkGetDescriptorSetLayoutSupportimplementation makes using bindless impossible KhronosGroup/MoltenVK#2573), as in the existing image-table tests on the base.^agc: the base's failures plusagc_driver_many_direct_samplers, from feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000, on MoltenVK's 16 samplers per stage; feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000's aa94587 now skips it on such a device. Oneagc_driver_lds_subword_store_branchfailure on MoltenVKmainpasses 5 of 5 alone and is the LDS-barrier test fix(agc): order wave LDS accesses with memory barriers on MoltenVK #10858 targets.main94fe1b5 and with it fix(agc): sample cube descriptors with fewer than six slices as six faces #11507'sFormatVersion49 (run). Clean:FormatVersionstays 54 (see What), and this PR's diff over feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000 is the same. The image-limit, sampler-limit, image-table and sample-order tests with the disk-cache, bindless and shader-memory tests and fix(agc): sample cube descriptors with fewer than six slices as six faces #11507'sagc_driver_image_sample_short_cuberan 10 times with no failure. Linux: 27 run, 27 pass, 0 skip, 0 fail. Windows: 29 run, 25 pass, 4 skip (the Vulkan device tests), 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 at 1829def (job). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.main0836dfd (run, on e7c5046, which has the same tree). build(agc): register each AGC test executable in its own CMake fragment #12862 movedlibSceAgcDriver's test registrations intotests/cmake/; the conflict inCMakeLists.txtis resolved withtools/agc_test_split.py resolve, which moves this PR's registration ofagc_shader_image_limitsintotests/cmake/agc_shader_memory_tests.cmake(+3 −2 against feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000's merge). Nothing else conflicted. Apart from the move, this PR's diff is unchanged. With-DBUILD_TESTING=ON,ctest -Ngives 3079 tests:main's 3075 plus this PR's and feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000's 4 tests, each listed once. The 11 tests of this PR's verify set pass 10 runs in a row. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 11 run, 8 pass, 3 skip (no Vulkan device), 0 fail. 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.main8a4fc62 against this head 1e5eb0c (CONTRIBUTING's AGC rule, refreshed for @MarcZX10's review), on GitHub's Linux runner (run).VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V.main8a4fc62 as a second parent, so the runner can check out both arms.agc_driver_many_images,agc_driver_many_direct_samplers,agc_driver_image_sample_reduction,agc_shader_disk_cache,agc_shader_memory,agc_shader_selected_records_*), plus the tests the harness maps from the files that differ between the two trees.mainand 3 times with this head, and neither log haswas not found.VUID-VkDeviceCreateInfo-pNext-pNext, which is onmain, so this head adds none. With this head, 31 run, 31 pass.main's arm passes the tests it has.main0836dfd, NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Linux. Passed: 2,450 passed, 0 new failures (4 fail onmaintoo, and 2 are unstable there), and no new validation IDs againstmainover 930 tests run on the GPU.main88e804b (run). feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000's merge brings Ondra97's fix(shader): split scalar-address descriptor phis #7694 and JJenkx's fix(agc): render layered mesh targets within device limits #6959 (see feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000). The conflicts were this PR's lines beside feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000's andmain's at the same places, and the merge keeps both: its--image-limitscase inShaderMemory.cppand itsagc_shader_image_limitsregistration inagc_shader_memory_tests.cmake, next to fix(shader): split scalar-address descriptor phis #7694'sagc_shader_descriptor_phis.FormatVersionstays 54, and this PR's diff over feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000 is unchanged. The image-limit, sampler-limit, selected-record, disk-cache and shader-memory tests, withagc_driver_image_sample_reduction,agc_driver_many_direct_samplersandagc_driver_many_images, pass 10 runs in a row. Linux: 13 run, 13 pass, 0 skip, 0 fail. Windows: 15 run, 12 pass, 3 skip (those threeagc_driver_tests; no Vulkan device), 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.main5cb015c. Both are clean.agc_shader_image_limitsintoagc_shader_image_limits_table(65 and 128 table images),agc_shader_image_limits_mixed(64 table and 64 direct images) andagc_shader_image_limits_refusals(129 images).FmaskFormatBaseits own range ofShaderInfo::MaxImagesIDs, with thestatic_asserts above.agc_shader_image_limits_mixedadds an FMASK direct image at index 64 beside a sampler that mirrors when unnormalized, and checks that no specialization ID is emitted twice.DescriptorBindingBuilder.cppandPipelineSpecialization.hppfailagc_shader_image_limits_mixedon both runners: "image limits: image 64's FMASK format shares a specialization ID with another constant, such as sampler 0's mirror axes".APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.agc_shader_image_limits_table13.2 s,agc_shader_image_limits_mixed8.8 s,agc_shader_image_limits_refusals0.1 s,agc_shader_sampler_limits10.2 s,agc_shader_selected_records_image_limit9.7 s,agc_shader_selected_records_direct_image_limit9.4 s,agc_shader_selected_records_pair_limit0.2 s andagc_shader_selected_records_direct_pair_limit0.2 s.main4f41f4c (run).main, left by merging feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000's ba833f4 (306ed92) before feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000 landed. GitHub showed them as a conflict, though git merges the branch withmaincleanly. No file needed a resolution (git show --remerge-diffis empty), so the merge adds no change of its own.agc_driver_image_sample_reduction,agc_driver_many_direct_samplers,agc_driver_many_images,agc_shader_sampler_limitsand every test matching^agc_shader_disk_cache,^agc_shader_selected_records_or^agc_shader_image_limits. Linux: 14 run, 14 pass, 0 skip, 0 fail. Windows: 16 run, 13 pass, 3 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.main4f41f4c: TechLevelZero's NVIDIA bot, RTX 2000 Ada, driver 595.99.02 (report): 2,766 passed, 7 failed, none new (3 also fail onmain, 4 unstable onmain), 48 skipped, with no new validation IDs (936 tests on the GPU). Its AMD bot, Radeon RX 6300 (RADV NAVI24, Mesa 25.2.8; report): 2,753 passed, 10 failed, none new (8 also fail onmain, 2 unstable onmain), 58 skipped, with no new validation IDs (936 tests on the GPU).main086c068, which brings fma-rc's fix(shader): gather a 3D image's image_gather4_lz from one slice as measured #9183 (×10).The conflict:
PipelineSpecialization.hpp, where fix(shader): gather a 3D image's image_gather4_lz from one slice as measured #9183 addsVolumeGatherBaseat 57664 next to this PR's movedFmaskFormatBase. The merge keeps it at 57856 (see What). It also changesDescriptorBindingBuilder.cpp, which didn't conflict:FmaskFormatBase'sstatic_assertnow ends atVolumeGatherBase, and a new one keepsVolumeGatherBase+ 128 at or belowImageComponentBase. This PR's other lines are unchanged.×10:
agc_driver_image_sample_reduction,agc_driver_many_direct_samplers,agc_driver_many_images,agc_shader_sampler_limitsand every test matching^agc_shader_disk_cache,^agc_shader_selected_records_,^agc_shader_image_limitsor^agc_driver_image_gather, which takes in fix(shader): gather a 3D image's image_gather4_lz from one slice as measured #9183's gather tests. Linux: 17 run, 17 pass, 0 skip, 0 fail. Windows: 19 run, 13 pass, 6 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 324 tests on Linux and 330 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.Every
agctest, once (run): Linux: 1,294 run, 1,209 pass, 84 skip, 1 fail. Windows: 1,331 run, 403 pass, 928 skip (no Vulkan device), 0 fail. The one failure isagc_driver_pipeline_journal's 120-second timeout (Test #1393: agc_driver_pipeline_journal ***Timeout 120.06 sec).That timeout is
main's own cold run, near the limit.main086c068 times out the same way underctest -V(run):Test #1392: agc_driver_pipeline_journal ***Timeout 120.06 sec. With a 300-second limit, 5 runs each on GitHub's Linux runner, both pass 5 of 5:agc_driver_pipeline_journalmain086c068 (run)In both, one slow step of the cold run is a journal reload that drops an unreadable tail (16 to 22 s in the verbose runs).
NVIDIA RTX 2000 Ada Generation at 54bd6f2, from TechLevelZero's NVIDIA bot (report): this head merged onto
main1c8c0ef, driver 595.99.02. 2,792 passed, 6 failed (none new: 3 also fail onmain, 3 unstable onmain), 50 skipped. This PR'sagc_shader_image_limits_table,agc_shader_image_limits_mixedandagc_shader_image_limits_refusalspassed on the GPU.AMD Radeon RX 6300 (RADV NAVI24) at 54bd6f2, from TechLevelZero's AMD bot (report): the same merge, Mesa 25.2.8. 2,778 passed, 9 failed (none new: 7 also fail on
main, 2 unstable onmain), 61 skipped. The same three tests passed on the GPU.mainc2eafe4, which brings yabanana's feat(shader): resolve nested image tables through runtime pointers #7223 (×10).FormatVersioninShaderDiskCache.hpp.mainreached 56 with feat(shader): resolve nested image tables through runtime pointers #7223, so this merge moves feat(shader): raise the image limit to 128 and name the counts in its refusals #10489 from 54 to 57, the next number no open PR holds. This PR's other lines are unchanged.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.main5b1d381, driver 595.99.02. 2,840 passed, 5 failed (none new: 3 also fail onmain, 2 unstable onmain), 50 skipped, with no new validation IDs (981 tests on the GPU).mainb611e63, Mesa 25.2.8. 2,872 passed, 10 failed (none new: 9 also fail onmain, 1 unstable onmain), 60 skipped, with no new validation IDs (992 tests on the GPU).agc_shader_image_limits_table,agc_shader_image_limits_mixedandagc_shader_image_limits_refusals, andagc_driver_many_images, ran with validation and passed. Both reports list the four as not inmain's validation baseline.windowscheck is red at this head on one test,avplayer_http_patched_modules, atAvPlayerHttpModules.cmake:155, where the owner executableavplayer_http_patched_modules_tests.exewasn't built for the selected test (job). JJenkx's fix(ci): build owners of wrappers around selected guest tests #15375, which builds the owners of wrappers around selected guest tests, has since merged (bfd14d1, 11-04 23:28Z). This PR changes no avplayer or HTTP file.mainea07ec8 (9c0f71e) and e626035, after danielhorngt's fix(agc): apply a LOD bias beyond the device limit in the shader #14621 (×10, validation).FmaskFormatBasefrom 57728 to 58048 andVolumeGatherBasefrom 57856 to 58176, so the merge itself keeps both sides.PipelineSpecialization.hpp, wheremain'sSamplerLodBiasBaseandSamplerLodBiasShaderThresholdlines now come before this PR's moved bases. fix(agc): apply a LOD bias beyond the device limit in the shader #14621's lines inDescriptorBindingBuilder.cppandSpirvImageEmitter.cppmerged without a conflict.FormatVersionstays 57.MinLodBase + ShaderInfo::MaxImages <= FmaskFormatBasebecomes<= SamplerLodBiasBase, followed bySamplerLodBiasBase + ShaderInfo::MaxSamplers <= FmaskFormatBase.agc_driver_image_sample_reduction,agc_driver_many_direct_samplersandagc_driver_many_images, with fix(agc): apply a LOD bias beyond the device limit in the shader #14621'sagc_driver_image_sample_lod_bias_sumandagc_driver_graphics. Linux: 17 run, 17 pass, 0 skip, 0 fail. Windows: 19 run, 15 pass, 4 skip (agc_driver_image_sample_lod_bias_sum,agc_driver_image_sample_reduction,agc_driver_many_direct_samplersandagc_driver_many_images, no Vulkan device), 0 fail. The libc and libkernel suites run 323 and 334 tests on Linux and 354 and 365 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.VK_LAYER_KHRONOS_validationon GitHub's Linux runner, llvmpipe (LLVM 20.1.2).main's tree ran 13 of these tests and passed 13. This head ran 17, the 13 plusagc_shader_image_limits_table,_mixedand_refusalsandagc_driver_many_images, whichmaindoesn't have, and passed 17. The only VUID isVUID-VkDeviceCreateInfo-pNext-pNext, on both, so this change adds none.main's implementation, whereagc_shader_image_limits_table,_mixedand_refusalsfail (image limits: 65 images were not planned: image resource limit exceeded). They pass here.main01f804b.main090f571, and the format commit d5b9ccd (×10).mainhas frankea's feat(agc): blend into 11_11_10 float color targets in the pixel shader #9020, which also changesFormatVersionfrom 56 to 57, so git took the line without a conflict and left this PR onmain's number.FormatVersionfrom 57 to 58 (see What) and changes no other line. This PR's other lines overmainare unchanged.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.FormatVersionfrom 58 to 60 (×10).APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)libSceAgcDriver/CMakeLists.txtandDescriptorBindingBuilder.cpp); this head keeps both. Any order with the others: fix(shader): serve ds_ordered_count in wave launch order #12944, feat(shader): decode more GCN instructions and take a GCN image's dimension from its T# #9889 and perf(agc): bound vertex-indexed guest buffers by the draw's vertex range #9897 holdFormatVersion57, nowmain's, and fix(shader): emit OpFmaKHR for f32 fma when VK_KHR_shader_fma is available #15343 (59) and feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508 (61) change the same line. fix(shader): gather a 2D image's image_gather4_l at its LOD #12790'sstatic_assertand the 8384 of feat(agc): back extra guest mip levels with storage images #7085 and fix(agc): keep texture images inside their extent's mip chain #6280 meet this PR's ranges (see What), so whichever lands second moves to a free number or base. fix(agc): apply a LOD bias beyond the device limit in the shader #14621, which took 57728, has merged, and this head's bases sit above it. savvaniss's perf(agc): bound vertex-indexed guest buffers by the draw's vertex range #9897 and ntamas94's perf(agc): bound instance-indexed guest buffers by the draw's instance range #14032 also add a test to the Windowsset_tests_propertiesline ofagc_shader_memory_tests.cmake; whichever lands second keeps bothsampler resource limit exceeded, the 64-sampler cap