Repository navigation
fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer - #9969
EagleBearerYS wants to merge 155 commits into
Conversation
…ed record pointer A T# loaded through a record pointer was still refused with "GetImageResource dword 0 is not a valid runtime value" when the pointer's low word passed ANDs with lane masks, as a waterfall loop that copies EXEC into the pointer's SGPR builds them, or when its high word was a Phi of the record's high word read under several keys. For a pointer-keyed column, the walk of the low word now takes an AND with a lane-mask operand (a Ballot word, or an AND or Phi of only Ballot words and immediates) and keeps walking its other operand, so its record reads must still match the column and anything else still refuses. The high word is walked the same way: its record reads must be the record word at the low word's offset plus 4. A high word that is one read still gives the column its table and record offset, as before. Otherwise the table comes from a record read whose V# words are defined before the descriptor load, and the record offset from the high word, which the GPU does not read for a pointer-keyed column. A high-word arm read from another buffer, such as one whose V# is loaded through a pointer, stays refused. A shader that planned before plans the same way, so the disk-cache format does not change.
… a pointer-keyed record pointer A T# loaded through a record pointer was still refused with "GetImageResource dword 0 is not a valid runtime value" when a Phi of the pointer's low word merged the record read, a zero, and the waterfall's lane mask with the handled lane's bit cleared, BitwiseAnd32(CompositeExtractU32x4(Ballot(...), 0), BitwiseNot32(ShiftLeftLogical32(1, index))), as s_ff1, s_lshl and s_not with s_and, or s_andn2, build it in the SGPR the pointer reuses. The walk took only Ballot words and ANDs of them as lane masks, so it walked into the NOT and refused. A lane-mask operand is now a Ballot word or the loop's lane bit, a shift of 1 by an index from FindILsb32, FindUMsb32 or ReadFirstLane (through the AND, add, subtract and select that s_ff1_i32_b64, s_bitset0 and the shift's own mask put around it), or an AND, OR, NOT or Phi of only those and immediates. An arm of the pointer that is entirely such an operand is skipped. An AND with a record read in it still has the read matched against the column, and anything else still refuses. agc_driver_pointer_phi_lane_not_table builds that shape in a wave64 waterfall: the low word's Phis merge the record read at +0, a zero and the lane mask without the handled lane's bit, cleared by s_not and s_and and by s_andn2, and the high word is one read at +4. Each lane samples the T# of its record, and every masked word faults outside the snapshot. agc_driver_pointer_vsharp_select_table reads a record keyed by ReadFirstLane(SelectU32(LogicalAnd, IAdd32, Phi)), a pointer from it, a V# through the pointer and the T# through the V#; it passes without this change and keeps that chain checked, including a record pointer moved to the other V# without a recompile. Shaders that planned before plan the same way, and a refusal is never cached, so the disk-cache format does not change.
…keyed records A pointer-keyed record pointer now also takes lane-mask ANDs, the waterfall loop's lane bit and its OR and NOT forms, and a high word merged from the record's next word. A high word read from a second buffer stays refused.
The low and high words of a pointer-keyed record pointer were walked separately, so a high-word arm on a path whose low word is a lane mask refused the plan even though that pair is no pointer. Ratchet & Clank: Rift Apart (PPSA01474) stops this way at LoadAddressU32@pc=0x9a30: one high-word arm reads a second buffer, and on that edge the low word is a lane mask, the waterfall loop reusing the SGPR pair. Walk the two words together. Where both are Phis of one block, each low-word edge takes the high word of the same predecessor. An edge whose low word is a constant or a lane mask is skipped with its high word. A record low word still needs every high word it can meet to be a constant, a lane mask or the same record column at offset + 4, so a second-buffer high word paired with the record word stays refused. agc_driver_pointer_phi_high_second_lane_table adds the lane-mask low word to the second-buffer arm: it plans, each group samples the T# its record selects, and that arm faults outside the snapshot.
…nter The two words of the pointer are now walked edge by edge, and an edge whose low word is a constant or a lane mask is skipped with its high word. A high word read from a second buffer stays refused on an edge whose low word is the record word.
…ane-masks Brings boykopovar#7395's merge of main bd4d801, with boykopovar#8991. It merged without conflicts.
TryMakeIndirectColumn refused every pointer hop once the record's pointer words were merged, so a T# read through a pointer loaded from a pointer-keyed record pointer stayed unplanned (Gran Turismo 7's World Map compute shaders, issue boykopovar#6191). Only buffer handles still refuse hops: the materializer keys the records by the innermost pointer before it follows the hops, and the plan's parent pointer is that innermost one.
…one-key child From hugodearaujo's change on boykopovar#8939 (Marvel's Spider-Man 2, PPSA03016).
Spider-Man 2's shape: a record keyed by a first-lane read, its dwords 2-3 a pointer, a V# loaded at that pointer plus 0xa0, and the T# read at offset 0 or 0x40 of that V#'s buffer with no second key. Two records point at V#s of different T#s; a moved record pointer and a moved V# must change the result without recompiling.
…andles as nested children Marvel's Spider-Man 2 (PPSA03016) stops at 131 s on boykopovar#9457 in a compute shader whose record pointer, at dwords 2-3 of a waterfall-keyed record with its low word merged by a Phi with a constant, leads to a V# that two GetBufferResource handles read: a T# at offset 0 and a T# at 0x4c0, each sampled. The nested branch of TryMakeTableColumn refused the first T# because the V#'s words also fed the second handle, whose reads belong to the other T#. A parent V# whose word reads feed several GetBufferResource handles is now accepted when every other handle has the same words and its uses are only reads whose users are T# or S# descriptor handles. Each descriptor plans its child column from its own handle; both walks reach the same reads, so the parent interns to one source, the materializer reads its records once (NestedColumn takes them from Column()), and each child keeps its own offset. A handle with any other use still refuses, and a sibling descriptor that cannot be planned still refuses the shader, as its words are not runtime values. T# or S# words that have other users stay refused. Planning keeps those reads in the program: PlanTableColumnPass marks a read planning-only only when every user is a planned handle (ResourceTracker.cpp:1770-1781). But they read through the V# handle, whose arguments Run() replaces with the column offset and the parent pointer words (:154-160), and whose own word loads become planning-only once every handle over them is planned, so LoadAddress emits nothing for them (SpirvMemoryInstructions.cpp:599-601). The kept read would address a V# that only the snapshot holds. Allowing those uses in this shape, where the second T#'s dwords 0 and 1 reach the pointer registers on one edge before a later s_load, crashes lavapipe in the dispatch. Taking it needs that V# kept alive for those reads: an unrewritten copy of the handle and real loads of its words through the record pointer. Shape from hugodearaujo's IR on boykopovar#8939 (issuecomment-6340144242).
…d other instructions Marvel's Spider-Man 2 (PPSA03016) still stops at pc 0x8fa0 with the shared-V# planning alone: its shader moves dwords 0 and 1 of the second T# read through the pointer-loaded V# into the record pointer's registers, so those reads have Phi users. The nested branch of TryMakeTableColumn refused that T#, and the first T# with it, because the sibling handle's reads were not only descriptor words. d132754 added the refusal after such a read crashed lavapipe: the read stayed in the program but went through the V# handle that Run() rewrites to the column offset and parent pointer words, while the V#'s own word loads became planning-only and were not emitted, so it read a garbage address. A planned nested child's T# or S# read with other users now goes through an unrewritten copy of the V# GetBufferResource. PlanTableColumnPass keeps a read real while any planned handle using it has a use that stays real, so the V#'s four loads through the record pointer are emitted for the copy, and the descriptor handles still take the snapshot. No kept read goes through a rewritten handle, so the other users read the guest's V# and descriptor words at dispatch. The copy needs the V#'s words to be loads through the record pointer that the program emits. Any other V#, and a data read through a handle on the V#'s words, remain refused. The shared-V# reuse test now checks both T#s per group and the word the later s_load reads behind T#2's dwords 0 and 1, which the test backs with a snapshot at that address. The T# and S# consumer cases that d132754 refused now check the real descriptor word. A data read through a third handle and a T# consumer whose V# comes from a keyed table record stay refused. Shape from hugodearaujo's IR on boykopovar#8939 (issuecomment-6340144242).
… the same buffer Marvel's Spider-Man 2 (PPSA03016) on boykopovar#9790 stops at 135 s in compute 0x11e2b40f00 at ReadConstBuffer@pc=0x9a50, a T# read through a pointer-loaded V# at (word >> 16) * 32, where the word is a data read through the same V#, next to an S# read through that V#. hugodearaujo's run: boykopovar#9790 (comment) On boykopovar#9790 the T# plans as a nested child with an unkeyed domain, but the S# is refused: the key read's handle shares the V#'s words with the S#'s handle, and DescriptorWordReads takes only descriptor words, so the S# falls to GetHandle and its dword 0 is not a valid runtime value. A sibling read is now taken as a child key word when it is a scalar read at an immediate offset through a rereadable V# and its uses only reach the offsets of T# or S# reads through the same V#, as scale * ((word >> s) & m) + c. The key read keeps its handle and the V#'s loads, so the dispatch reads the guest's word. The T# or S# column gets a child key domain (offset, shift, mask): the snapshot reads that word from each child buffer and maps only the entry it selects. possibleU32Bits follows a right shift by a constant, so the child table spans at most min(num_records / stride, the key's range), 65,536 entries for a 16-bit field. A key the dispatch reads differently from the snapshot faults outside the key domain, and a key past num_records reads a null T#, as s_buffer_load_dwordx8 does past num_records. A store through a handle on the V#'s words, keys from two words or from a word at a runtime offset, and other data reads through the V# stay refused. KeyDomain gains child, shift and mask, so the shader disk cache format moves to 50. The test reads a key word at 0x14 and an S# at 0x20 of each child buffer and checks keys 2, 5, 17, 30 and 47 (the last of the V#'s 48 T#s), both S#s, a moved record pointer, null T#s for keys 48 and 65535, a fault for a key the dispatch reads differently from the snapshot, and the refusals above. This does not make the title pass: the same IR also merges the 0x4c0 T#'s dwords 0 and 1 into the record pointer, which stays refused here.
…ed V#'s record pointer In hugodearaujo's IR for Marvel's Spider-Man 2 (PPSA03016), compute 0x11e2b40f00 reloads the V# at pc 0x9a3c through a record pointer whose two words are Phis: record dwords 2 and 3 on most edges, and dwords 0 and 1 of the T# read at 0x4c0 through the same V# on the edge from $353. boykopovar#9790 (comment) The T# read at ReadConstBuffer@pc=0x9a50 through that V# is refused with "GetImageResource dword 0 is not a valid runtime value", whatever its offset: TryMakeIndirectColumn walked a merged V# pointer with PointerRecordReads, which takes only the record read and constants on the low word, and it needed the high word to be the record read itself. A merged V# pointer now goes through PointerRecordPairs, the edge-paired walk that a pointer-keyed T# already uses, and a word read as part of a T# or S# is a pointer-free arm there, like a constant or a lane mask. The child is looked up by the actual 64-bit pointer, so that arm, which the snapshot never captures, faults outside the snapshot when a lane takes it instead of reading a T#. The record reads on every edge must still be one read per word for a V#. The test samples the T# at 0x4c0, moves its dwords 0 and 1 into the record pointer under a condition, reloads the V# behind that Phi, and reads the key word, the T# at the key and the S# through it, as the IR does. It checks the three reads per lane with the arm not taken, and a group that takes the arm faulting outside the snapshot. That last run replaces the key read with a constant: a data read through a V# loaded from an unmapped pointer crashes lavapipe on boykopovar#9790 as well, as its shared-V# reuse shader does with an unmapped record pointer. On boykopovar#9790, and with the previous commit alone, the test is refused with the text above. This does not claim the title passes.
|
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.
|
|
One integration point to coordinate before merge: this branch is based on #9790’s cache version 46 and advances it to 50, while open #10000 independently advances current main from 44 to 49. The changes can be sequenced, but the cache format number must remain monotonic and unique after rebasing the later branch (if #10000 lands first, #9790 and this stack need cumulative version bumps; if this stack lands first, #10000 must bump beyond 50). Please include #10000 in the version-order plan and validate the resulting format number against the merged base. This is sequencing feedback, not a request to close or drop either PR. |
MarcZX10
left a comment
There was a problem hiding this comment.
I found a cache-budget accounting gap in the new nested snapshot path. NestedColumn copies the parent descriptor readRanges and appends a range for each distinct child buffer; the indirect-buffer path also records a descriptor range per captured pointer. CopyRecords retains those ranges in ImageTableColumnSnapshot, and ResolutionMemoEntry stores the table snapshots. However, resolutionFootprint() counts map words, codes, descriptor words, and pointer words, but not table.readRanges.
These are 16-byte pairs, so omitting them undercounts by four 32-bit words per range. With up to 524,288 parent keys and up to 524,288 child buffers, the retained ranges can add roughly 16 MiB to an entry beyond the ResolutionMemoWords estimate. The LRU can therefore retain more than its declared 8M-word budget, especially across its four variants per shader. Please either include retained read-range storage in the footprint (and add a boundary regression) or avoid retaining ranges in resolution memo entries if they are not part of the cache key/result. This is a memory-bound issue introduced by the new nested-table path, not a queue-size concern.
I also checked pointer-map construction/search ordering, nested-key limits, decode validation, snapshot hashing, cache serialization and the SPIR-V lower-bound lookup; I found no additional confirmed issue. Current-main diff and conventions checks pass. Hosted eligibility, intake, conventions, labels and report pass, while native product jobs are skipped. I could not run the image-table runtime tests locally because this workspace has no matching build/test executable; the PR's reported Linux/Windows and validation-layer results remain author-reported.
|
@MarcZX10 Thanks, the order is already set so that either one can land first. #10000 moves
Both PRs' Depends on and Overlap lines will say this. The |
A scalar memory load ignores the two low bits of its address. The emitter cleared them in the offset and the immediate of an s_load through an SGPR pair, but kept them in the 64-bit base, so a base whose low word ends in 01, 10 or 11 read past the dword the hardware reads. A record pointer taken from a T#'s first word therefore read up to three bytes too far and faulted when those bytes were not mapped. The base pair's low word is now cleared like the offset's. A read through a user-data anchor translates from the cleared base, and ImageTableAbi::ScalarAddressDword, which the materializer uses to read the records behind such pointers and to plan their read ranges, clears the base the same way. The SRT walker already did. agc_driver_bda_anchor_reads runs two scalar loads through a user-data base with low bits 01, 10 and 11, and the scalar address rule in agc_shader_memory checks the same bases on the CPU. The pointer image table case that expected a table base off a dword boundary to leave every record unmapped now expects the records at its dword, the same as the aligned base.
# Conflicts: # core/shader/recompiler/ShaderDiskCache.hpp
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — comments
Material platform uncertainty remains because the new arm-table test fails on two Intel Windows iGPUs, and the cause is untraced.
What I ran
Reviewed head cc3592067ad9b9bf1ea9fc7a8c780f5e9039684e against the prepared description, commit list, manifest, diff, and targeted source ranges using repo_read.py. No tests or build commands were run.
Results
| Check | Result | Note |
|---|---|---|
| Prepared diff and changed code | passed | Targeted review completed |
| Tests and build | not run | No local execution available |
| Intel Windows arm-table case | not verified | Reported failure, cause unknown |
Findings
Blocking
None verified.
Non-blocking
core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp:2840— The arm-table test is reported to fail on two Intel Windows iGPUs, including a wrong-texel result in one run, while passing on NVIDIA, AMD RADV, and llvmpipe. The report does not establish whether this is a driver/compiler issue or a defect in the new pointer-pairing path. Please isolate the failing path and add a reproducer or document the confirmed cause before relying on this test as coverage for that behavior.
Not verified
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppfull text was excluded as too large; its changed hunks were present in the prepared diff.- No tests or builds were run in this review. Other author and CI test claims were not independently verified.
- The Intel-specific arm-table failure remains unexplained.
- The manifest marks all listed files as included except
ShaderMemory.cpp; targeted review covered the coreResourceTracker.cpp,ResourceMaterializer.cpp, andImageTable.cppranges relevant to the findings and changes described above, not every included file in full.
To get this to a good state
Nothing is required. Please share the cause or an isolated reproducer for the Intel Windows arm-table failure as an optional follow-up.
# Conflicts: # core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_table_tests.cmake
|
@EagleBearerYS this PR is now carried unchanged by #16812, with your commits and authorship kept, on top of #28483, which carries #9457 merged with current AI-assisted. |
What
With #9790, Marvel's Spider-Man 2 (PPSA03016) gets past
ReadConstBuffer@pc=0x8fa0. It then stops at 135 s, later in the same compute shader (hugodearaujo's run, RX 9070 XT, RADV):The shape (his IR, block $398):
(word >> 16) * 32is thes_buffer_load_dwordx8offset at 0x9a50.Two refusals, one per commit, both on #9790's head:
fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer.TryMakeTableColumn's nested branch,DescriptorWordReads).stride * key + addend, withkeyone of(word >> s) & m,(word & m) >> s,word >> s,word & morword.sandmare constants, and the stride is a constant multiple of 4.num_recordsas the hardware load returns, and maps only that record and key 0. If the word's page is unmapped or has a pending write, it maps the whole child, as other key domains do.min(num_records / stride, maxKey + 1)records, so at most 65,536 for a 16-bit field, within feat(shader): resolve nested image tables through runtime pointers #7223's caps.num_recordsreads a null T#, as the load does.fix(shader): take a T#'s words as an uncaptured arm of a pointer-loaded V#'s record pointer. This is the game's own text.TryMakeIndirectColumn/PointerRecordReads).PointerRecordPairs, the edge-paired walk that pointer-keyed T#s already use. Its new arm kind skips a T# or S# word like a constant.Not claimed: hugodearaujo's dump predates #9907, so it prints every scalar load's immediate as
0x0. The real offsets of the key word and the S# aren't known, and the tests use nonzero ones.Cost:
min(num_records / 32, 65536)T#s.FormatVersionto 99:KeyDomaingains three fields.fix(shader): count an image-table snapshot's read ranges in the resolution memo footprint(d01f290):resolutionFootprintnow adds 4 words per read range (readRanges) of each table and nested table, asColumnRecords::Footprint()does, so a resolution whose read ranges exceed the memo budget isn't memoized.main'sresolutionFootprintleaves out the same term.Tested
agc_driver_pointer_vsharp_child_key_table(new,tests/execution/ImageTable.cpp), commit 1's shape: a record pointer merged by a Phi, a key word at 0x14, the T# at(word >> 16) * 32, an S# at 0x20, then a sample.agc_driver_pointer_vsharp_child_key_arm_table(new), commit 2's shape: it samples the +0x4c0 T#, moves its dwords 0/1 into the record pointer under a condition, reloads the V#, then reads the key word, the T# and the S#.APS5_SKIP_TIMING_TESTS=1.agc_driver_pointer_vsharp_shared_table,…_shared_reuse_tableandagc_driver_nested_image_table.VUID-VkDeviceCreateInfo-pNext-pNext, so the change adds noVUID-message.ctest -R 'image_table|pointer|nested|table|sampler'passes 47/47, including fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's, fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457's and feat(shader): resolve nested image tables through runtime pointers #7223's nested-table tests and fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's "data read through a third handle" control.GALLIUM_OVERRIDE_CPU_CAPS=avx.agc_shader_disk_cacheresolves a materialized fixture snapshot twice, then with 2^21 read ranges on a table and on a nested table, exactly the memo's 8M-word budget: memoized without them, not shared with them.agc_shader_disk_cacheand_large_file) pass 10 runs in a row; on Windows, 4 of 4 (with_host_stderrand_long_paths); none skipped or failed. 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.main938812d (clean), Windows 11 Pro, WinLibs GCC 15.2.0, Release,ANYPS5_NO_SHADER_CACHE=1, with the Khronos validation layer (1.4.363) loaded. The 1,260 teststools/select_tests.pypicks for the PR's files, compared test by test with a full run of thatmainon the same GPU:main(theagc_driver_sample_ordertrio, test(agc): read the sample order tests' depth through a sampled copy #9056). The stack's 20 new nested and pointer tests pass. No newVUID-message.maintoo (AGC (Intel Arc, Windows): agc_storage_write_back fails; buffer-image copies of larger RGBA16F images canonicalize fp16 NaNs #10126, test(agc): skip the MSAA retirement storage promotion without shaderStorageImageMultisample #8604 and AGC (Intel Arc, Windows): agc_driver_alias_copy_label fails about 1 in 3 runs; the label lands before the alias copy's destination store, APS5_STORE_AT_LABEL=1 hides it #10199's intermittent one). The other two are feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395's sampler tests,agc_driver_nested_sampler_tableandagc_driver_pointer_phi_sampler_table, with the lines they fail with on Intel's Linux driver, where the cause is Gfx12 EU fusion (Mesa issue 16622, fixed in Mesa 25.3). @BKlaasWerkman's rerun on the same Intel Arc, of this head (d01f290) merged intomain938812d (comment), and feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395 alone merged 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). No newVUID-message.main294db26. Of the 2,529 teststools/select_tests.pypicks, 2,516 pass, 12 skip and 1 fails,agc_driver_quad_pixel_mask(AGC: agc_driver_quad_pixel_mask samples the wrong mip level under a partial quad mask on Windows (RTX 5060 Ti and Radeon 860M) #14237), which fails on thatmaintoo, so 0 are new. WithVK_LAYER_KHRONOS_validation, no test logs an ID thatmaindoesn't log for it.agc_driver_pointer_vsharp_child_key_arm_tablefails on two Intel iGPUs on Windows; the cause isn't traced.agc_driver_pointer_vsharp_child_key_table, spills on its two-lane pipeline too (384 bytes) and passes 3 of 3 on the same GPU and build, so spilling alone doesn't explain the failure (comment). With synchronization validation, and separately GPU-assisted validation, mrfelek's runs log no message on the Intel UHD or the RTX A2000 (comment).APS5_SINGLE_LANE=all, which our first reply cited as ruling out the spanned-wave lowering, never reaches the arm dispatch, so it doesn't bear on this test (comment).check_conventions.py: passes. No comment lines are added.test/sm2-9790-child-key(ac5f6f8) carries this PR's two commits unchanged on his test branch. With it, Marvel's Spider-Man 2 gets pastReadConstBuffer@pc=0x9a50and runs to 133 s. It then stops on an S# read at 0x9a9c through the V# loaded at 0x9a20, the load that also gives the key word:compute shader 0x11e2b31800: GetSamplerResource dword 0 is not a valid runtime value. This PR doesn't plan that shape; it's for a later change. The branch builds on GitHub's Linux and Windows runners, and its tests pass on Linux (run).main3a0a54b with feat(agc): render layered draws into a depth view of several slices #7256, feat(agc): scale unnormalized samples to the selected mip on multi-level 2D views #16935 and fix(agc): retire a multisampled color target a write-only storage image overwrites #10049, and this PR at 239ae90.0x120aea1900to0x120aef8b00) are all refused without this PR. With it, 28 of the 29 prepare offline inagc_shader_replay;0x120aed7f00is still refused, on theLoadAddressU32chain at pc0x19f8.0x120aea4f00, which runs every frame, hangs the GPU (NVIDIA Xid 109). Whether this PR is behind the hang isn't known.0x120aec1a00and0x120aef8b00then stop on the call table limit (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).mainc9b2660. Two conflicts:ShaderDiskCache.hpp'sFormatVersionline:mainis at 48, and this PR takes 58 (see Overlap).ResourceTracker.cpp, wheremain's fix(shader): resolve table column pointers through Phi nodes #7880 resolves table column pointers through Phi nodes: it counts a pointer as merged only whenUnwrapTableReadcan't resolve it, reads a merged buffer column's low words withPointerRecordReads, and its high word throughUnwrapTableRead. This PR reads both words of every merged pointer withPointerRecordPairsand requires a buffer column's arms to read equivalent low and high words. The merge keeps fix(shader): resolve table column pointers through Phi nodes #7880's test for a merged pointer and itsUnwrapTableReadfor the others, and this PR's pairs and arm check for merged ones. The high-word line takes a pointer-keyed record's word directly, a merged buffer column's from the pairs, and any other pointer's throughUnwrapTableRead.^agc_driver_pointer_,^agc_driver_nested_,^agc_driver_image_table,^agc_shader_) pass 10 runs in a row on Linux: 60 run, 60 pass, 0 skip, 0 fail. On Windows: 67 run, 40 pass, 27 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.^agcsweep (run): Linux 996 run, 932 pass, 64 skip, 0 fail. Windows 1,020 run, 282 pass, 734 skip, 4 fail:agc_submit_progress,agc_submit_progress_no_timeline,agc_driver_pipelined_metadata_passandagc_driver_pipelined_metadata_pass_draw_pipeline, which also fail onmainc9b2660 (run).mainc8d34aa). Clean:FormatVersionstays at 53, and this PR's own diff is unchanged: the merge brings in exactly what fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's merge did (249 files). 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: 44 run, 44 pass, 0 skip, 0 fail. Windows: 46 run, 20 pass, 26 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.main0db47b2. The only conflict wasShaderDiskCache.hpp'sFormatVersionline:mainmoved to 45 (fix(shader): normalize offset perspective barycentrics after interpolation #7831), and this branch keeps its 50. On GitHub's runners (run), the pointer, nested, image-table and disk-cache sets (29 tests) pass 10 runs in a row on Linux. On Windows the set has 31, with two Windows-only disk-cache tests: they build, 5 pass 10 runs in a row, and the other 26, 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.A limit found on the way, not fixed here: on llvmpipe, a read through a V# whose words come from an unmapped record pointer crashes instead of reporting the fault. llvmpipe does this for any scalar BDA load that misses, and the files that emit those loads are
main's, unchanged by #9790 and by this PR. #9790's limits describe it, with its unmapped-pointer probe faulting through the image table on an NVIDIA GPU instead.Overlap:
FormatVersion:mainis at 88 since Pipodi's fix(agc): give storage image table elements UINT views when their kind needs one #18455. Ours take one number each: feat(agc): look up table images at run time through a device image table on the GPU heap (APS5_GPU_PATH) #7642 62 (a draft, held; it takes a free number at its refresh), feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395 93, fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 94, fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457 95, fix(shader): follow a conditional pointer chase through a V# behind a pointer-keyed record pointer #9633 96, fix(shader): read a chased pointer's high word at its own offset #9749 97, fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790 98 and fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer #9969 99. The other open PRs changing it hold 89 (feat(shader): flatten oversized 1D image arrays to 2D #14871, fix(shader): preserve runtime-proven formatted buffer read extents #19852, fix(shader): keep the destination of a buffer load through a TYPE 2 or 3 V# #21199 and fix(shader): evaluate float-to-signed conversions in runtime SRT values #21240), 90 (fix(shader): keep faulting invocations in their wave and mask their later writes #6416, and 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, both stacked on fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer #9969), 91 (feat(agc): export stencil operation values through an attachment #10351) and 92 (fix(shader): skip a bit-field low word in a pointer-keyed table's Phi #14853), and the rest hold numbers at or belowmain's, from a check of every open PR's head on 11-16. This PR moved from 73 to 89 at the merge of fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's a8ad90a (see Tested). Whichever lands second on a number takes the next free one.possibleU32Bitsdepth-limited (possibleU32BitsDepth), and the merge of fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's f031b24 has this PR'sShiftRightLogical32case recurse through it withdepth - 1u, as its siblings do (see Tested).ResourceTracker.cpp,ShaderDiskCache.cpp,FormatVersionand the image-table test lists. Whichever of fix(shader): follow a conditional pointer chase through a V# behind a pointer-keyed record pointer #9633 and this PR merges first, the other takes the resolution on test/d10195-9633-15555-18107 (fecb7dd9b0, fix(shader): follow a conditional pointer chase through a V# behind a pointer-keyed record pointer #9633's ae857cc with fix(shader): plan several descriptors read by one load through a re-read nested V# #18107, which carries this PR):PointerRecordPairswith fix(shader): follow a conditional pointer chase through a V# behind a pointer-keyed record pointer #9633'schasesandchaseDeptharguments, keeps this PR's same-read check, and refuses a buffer record reached through a chase, which neither PR covers;DescriptorSourceandTableColumnand this PR'sKeyDomain;FormatVersion(each has its own number, see above) and the test lists keep both.On that branch every fix(shader): follow a conditional pointer chase through a V# behind a pointer-keyed record pointer #9633 and fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer #9969 test passes 3 of 3 on Linux; on Windows the GPU tests skip (no Vulkan device on the runner) and nothing fails (run). The run's one red is fix(shader): plan several descriptors read by one load through a re-read nested V# #18107's
agc_driver_pointer_vsharp_sampler_pair_spill_table, which fails the same way on fix(shader): plan several descriptors read by one load through a re-read nested V# #18107 without fix(shader): follow a conditional pointer chase through a V# behind a pointer-keyed record pointer #9633 (run).pc=0xb9f8T#. It sits on fix(shader): read a chased pointer's high word at its own offset #9749, the stack's other branch, and a merge-tree of this head and its cebac8d onmain8eaf82f conflicts inResourceTracker.cpp,ShaderDiskCache.cpp,ShaderDiskCache.hpp'sFormatVersion(75 there, 73 here),tests/cmake/agc_driver_image_table_tests.cmakeanddocs/dev/debt/shader.md. Whichever lands second keeps both sides.ResourceTracker.cpp, its child-key helpers also sit aboveTryMakeTableColumn, and its!plan.keyDomain->childcondition goes after feat(agc): opt-in bindless image heap for sampled image tables #20519'sKeepBindlessWordscall. The encoder'sKeyDomainchecks sit next toTableColumn's and keep both. Its own test options keep both, and itsFormatVersionconflict keeps this PR's number, above feat(agc): opt-in bindless image heap for sampled image tables #20519's 89. Merge order: this stack first, as proposed in feat(agc): opt-in bindless image heap for sampled image tables #20519's thread (comment). If feat(agc): opt-in bindless image heap for sampled image tables #20519 lands first, a merge ofmainresolves it here.main: clean.main, by @hugodearaujo (comment): this head merged intomainf95acfc (clean), Linux 7.2.11, RX 9070 XT, RADV Mesa 26.2.5, Release, a fresh shader cache, X pressed every 30 s, 480 s limit, one run. No recompile error; the run ends at 223 s when his VRAM guard stops the game (free VRAM 8.5 GB to 0.6 GB within 7 s), as fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's head does on the samemain.agc_shader_replayon this tree refuses the four.prepare.reqfiles from the earlier stops atReadConstBuffer@pc=0x9a9c(GetSamplerResource dword 0 is not a valid runtime value), where fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's head alone refuses them at 0x9a50, so this PR still takes them past 0x9a50 on currentmain. In his dump run of fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's head, the title's own first dispatch of that shader, at 206 s, prepares without error.main0cd07dc (run).refusedhelper and its four cases, the assertions @oneandonlydean listed for this PR; the cases that check a real answer stay.ImageTable.cpponly (1 line in, 27 out).main0cd07dc, which carries fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457's resolution of mrfelek's fix(shader): plan an image table for a T# read at a first-lane offset #10228. Clean here, and this PR's changed lines are the same.tests/execution,agc_driver_pipelined_metadata_passfails atvkCreateInstance(-9) on GitHub's device-less runner, before this PR's code;mainfails it the same way there (run), and upstream's Windows job builds it as a skipped stub.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.tests/execution,agc_driver_pipelined_metadata_passfails atvkCreateInstance(-9) on GitHub's device-less runner, before this PR's code;mainfails it the same way there (run), and upstream's Windows job builds it as a skipped stub. 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.main38ccd50 and with it fix(agc): sample cube descriptors with fewer than six slices as six faces #11507'sFormatVersion49, and a format-only commit (run). The merge is clean, and this PR's diff over fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790 is the same. ba29729 movesFormatVersionfrom 58 to 60: 58 is also held by feat(agc): serve lane-keyed, pointer and runtime image-table columns #10193 (Celegans12), which carries our feat(agc): look up table images at run time through a device image table on the GPU heap (APS5_GPU_PATH) #7642's commits, so if feat(agc): serve lane-keyed, pointer and runtime image-table columns #10193 landed first, this PR's identical 58 would merge cleanly over it and the number wouldn't move. No open PR uses 60. An earlier reply here named only feat(agc): look up table images at run time through a device image table on the GPU heap (APS5_GPU_PATH) #7642 at 58. The child-key, shared, nested, pointer-Phi sampler, sample-order and pipelined metadata 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_cube. Linux ran them 10 times with no failure: 30 run, 30 pass, 0 skip, 0 fail. Windows: 32 run, 23 pass, 8 skip (the Vulkan device tests), 1 fail: on our verify's Windows build, which compilestests/execution,agc_driver_pipelined_metadata_passfails atvkCreateInstance(-9) on GitHub's device-less runner, before this PR's code;mainfails it the same way there (run), and upstream's Windows job builds it as a skipped stub. 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.agc_driver_nested_image_table's two checks that a valid shader is refused (a V# with another buffer consumer and a T# with another consumer), feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395's merge of feat(shader): resolve nested image tables through runtime pointers #7223's 0dbf547 (yabanana's merge ofmainf7e84c4) and the format commits below this PR. The one conflict wasFormatVersion, which stays 60, one above fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's 59. Apart from that line's old value, this PR's diff over fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790 is unchanged.agc_shader_bindless,agc_shader_memoryand 17 otheragc_shader_tests (table snapshots, selected records, memo budgets and pair layouts) ran 10 times with no failure. Linux: 48 run, 48 pass, 0 skip, 0 fail. Windows: 50 run, 25 pass, 25 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.docs/dev/debt/shader.mdto lead with what stays refused and the key that faults, and says the snapshot maps the selected entry and the entry at key 0 (Narrowstarts its key list at 0). The image-table, nested, pointer, disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 48 run, 48 pass, 0 skip, 0 fail. Windows: 50 run, 25 pass, 25 skip, 0 fail; the 25 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.mainb08c539 into fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457 (run).CMakeLists.txt, from build(agc): register each AGC test executable in its own CMake fragment #12862's split, resolved withtools/agc_test_split.py resolve. It moves this PR's registrations intotests/cmake/agc_driver_image_table_tests.cmake, next to the stack's (+4 −2 against a5efbc3).FormatVersionmerged cleanly and stays this PR's own. Apart from the move, this PR's diff is unchanged.-DBUILD_TESTING=ON,ctest -Ngives 3100 tests:mainb08c539's 3081 plus the stack's 19 tests (fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457's 15, fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's 2 and this PR's 2), each listed once.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.VK_LAYER_KHRONOS_validationon GitHub's Linux runner (run),mainb08c539 against this merge, for the same tests. The loader inserted the layer 2 times on main and 21 with this merge. The only VUID in either arm isVUID-VkDeviceCreateInfo-pNext-pNext, so this merge adds none.agc_driver_image_tablefails in that mode in both arms, because the mode treats thatmainmessage as a failure.maindc9dc7e, 2,540 of 3,119 tests selected.main, and 2 are unstable onmain.VK_LAYER_KHRONOS_validation, over 949 tests on the GPU, there are no new validation IDs againstmain. 19 of the stack's nested and pointer table tests ran with the layer but aren't inmain's baseline, so they weren't compared.FormatVersion, which the format commit moves from 60 to 73, above fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's 71 and fix(shader): read a chased pointer's high word at its own offset #9749's 72. This PR'sKeyDomainchange (24 bytes, 7 fields) merges cleanly with fix(shader): split scalar-address descriptor phis #7694'sDescriptorSourcechange. This PR's own diff is otherwise unchanged. The image-table, disk-cache, BDA anchor-read, shader-memory, nested and pointer tests, with fix(shader): split scalar-address descriptor phis #7694'sagc_shader_descriptor_phis, pass 10 runs in a row. Linux: 34 run, 34 pass, 0 skip, 0 fail. Windows: 36 run, 10 pass, 26 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. TechLevelZero's NVIDIA bot ran this head merged ontomain88e804b on an RTX 2000 Ada (report): 2,572 passed, 5 failed, none new (3 also fail onmain, 2 unstable onmain), 45 skipped, with no new validation IDs (992 tests on the GPU).main4f64f81 (run). The one conflict was the footprint line inResourceMaterializer.cpp: this PR'stable.readRanges.size() * 4uterm is kept on the first line of feat(agc): sample 1D arrays past maxImageArrayLayers as rows of a 2D image #12246's loop, after feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395's pointer term.FormatVersionstays 73, and this PR's own diff is otherwise unchanged. TheResourceMaterializer.cppresolution, with feat(agc): sample 1D arrays past maxImageArrayLayers as rows of a 2D image #12246's view loop moved back intoSnapshot, comes from feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395's merge (see feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395). The image-table, disk-cache, BDA anchor-read, shader-memory, nested and pointer tests, with fix(shader): split scalar-address descriptor phis #7694'sagc_shader_descriptor_phis, pass 10 runs in a row. Linux: 34 run, 34 pass, 0 skip, 0 fail. Windows: 36 run, 10 pass, 26 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, once (run): Linux: 1,261 run, 1,182 pass, 78 skip, 1 fail. Windows: 1,297 run, 390 pass, 907 skip (no Vulkan device), 0 fail. The one failure isagc_driver_pipeline_journal's 120-second timeout, whichmain88e804b's own run of every test hits too (run).main4f41f4c (×10, the PR's own tests ×10).ShaderDiskCache.hpp'sFormatVersion, wheremainis now at 52 (feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks #10000) and this PR keeps its 73; 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: 19 run, 19 pass, 0 skip, 0 fail. Windows: 19 run, 0 pass, 19 skip (no Vulkan device), 0 fail.mainc2eafe4 with yabanana's feat(shader): resolve nested image tables through runtime pointers #7223 through fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457, fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 and feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395 (×10).ShaderDiskCache.hpp'sFormatVersion, which stays 73 (mainis at 56 since feat(shader): resolve nested image tables through runtime pointers #7223), anddocs/dev/debt/shader.md, which keeps this PR's three entries, with fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's "Nested image table children" entry after "Nested image tables". 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: 34 run, 34 pass, 0 skip, 0 fail. Windows: 36 run, 10 pass, 26 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.mainb8efa62, driver 595.99.02, Ubuntu 26.04.1, 2,911 of 3,878 tests selected. 2,854 passed, 7 failed and 50 skipped. None of the failures is new: 3 also fail onmain, and 4 are unstable onmain. WithVK_LAYER_KHRONOS_validation, there are no new validation IDs againstmain, over 989 tests on the GPU.agc_shader_nested_sampler_snapshot_retryran with the layer but isn't inmain's baseline, so it wasn't compared.APS5_DUMP_SHADERS), throughagc_shader_replay. Thepc=0xb600GetSamplerResourcestop is gone; fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457, below this PR, plans that S# at a fixed offset of its V#. The same request then stops at a T# atpc=0xb9f8(GetImageResource dword 0), whose pointer is a Phi of the record's pointer and a pointer read from the record's data.pc=0xb600and stops 148 s in at thepc=0xb9f8T#. With fix(shader): follow a conditional pointer chase through a V# behind a pointer-keyed record pointer #9633 and fix(shader): read a chased pointer's high word at its own offset #9749 also merged on, the replay stops at the same place.pc=0xb9f8(see Overlap); the stops after it are in feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395's description.-lvl underwater_aerial_garden, no input, headless, default settings, a warm shader cache; RTX 3080 Ti 12 GB, NVIDIA 615.71.09, Linux, Ryzen 9 5950X. The builds aremain4c03784 andmainwith this PR's c147aa8 (a clean merge, 228475a4a5); onlylibSceAgcDriver.prxdiffers.snapshot did not stabilize.main0.165, this PR 0.650, this PR 0.635,main0.404. They put the gain at 1.6–3.9 times, sincemainvaries between its runs, and haven't found which of the stack's changes saves the time. Clocks weren't reported, and they didn't compare the picture.main8eaf82f through fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457, fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 and feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395 (×10).docs/dev/debt/shader.md, where JJenkx's docs(debt): record that an unstable runtime resource snapshot ends the title #15305's "runtime resource snapshot" entry, which comes withmain, sits right above "Nested image tables", which this PR rewrites. Both stay, docs(debt): record that an unstable runtime resource snapshot ends the title #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: 35 run, 35 pass, 0 skip, 0 fail. Windows: 37 run, 10 pass, 27 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.main006d11f through fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457, fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 and feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395 (×10).main, frankea's feat(agc): blend into 11_11_10 float color targets in the pixel shader #9020'sFormatVersion57, andFormatVersionstays 73 here. 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: 35 run, 35 pass, 0 skip, 0 fail. Windows: 37 run, 10 pass, 27 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.main0bae53f into fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790 (×10).docs/dev/debt/shader.md, where this PR's wording of the pointer-keyed image-table entry sits next to feat(shader): raise the image limit to 128 and name the counts in its refusals #10489's rewording of the image-table entry (the image limit is now 128). Both are kept.FormatVersionstays 73, and 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: 49 run, 49 pass, 0 skip, 0 fail. Windows: 51 run, 10 pass, 41 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 344 and 346 tests on Linux, with 0 failed, and 375 and 373 on Windows, whereguest_standard_streamsfails:main0bae53f has feat(libc): implement getdelim and getline #12920, whose Windows abort is I#17423 (oneandonlydean's revert is revert(libc): revert getdelim (#12920), red Windows guest_standard_streams #17531). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.main3eb7a74 into fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790 (×10, everyagctest).main, fix(shader): narrow a goto junction Phi to the arm its branch allows #14636'sFormatVersion68, and keeps fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's 71.FormatVersionstays 73 here, and this PR's own lines are unchanged.mainwithout fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457's last three commits, so fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790'sFormatVersion71 sits below fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457's new 81. It is re-picked when fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457 lands.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: 49 run, 49 pass, 0 skip, 0 fail. Windows: 51 run, 10 pass, 41 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 onmain7259cce alone (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, once, since fix(shader): narrow a goto junction Phi to the arm its branch allows #14636 is itself a recompiler change. The first attempt had two failures that the rerun of both jobs cleared: on Linux,agc_driver_frame_replay_rewind_copy(1 of 1,547), which fix(main): release parked waits one queue at a time when a replayed capture delta is applied #17921 reports failing once onmaintoo; and on Windows, the build stopped whenguest_np_web_api_initialize_testscopied the unpatchedlibSceNpWebApi.prxbefore it was built. The rerun: Linux 1,547 run, 1,452 pass, 95 skip, 0 fail; Windows 1,590 run, 482 pass, 1,108 skip (no Vulkan device), 0 fail.ShaderDiskCache.hpp'sFormatVersionline. The format commit gives this PR 89, above fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790's new 88 (see Overlap). This PR's own lines are unchanged apart from that line.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: 49 run, 49 pass, 0 skip, 0 fail. Windows: 51 run, 10 pass, 41 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 onmain7259cce alone (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.maine22c5fb through fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790, fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457, fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 and feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395 (×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: 50 run, 50 pass, 0 skip, 0 fail. Windows: 52 run, 11 pass, 41 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.maine22c5fb against this head, withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1underctest -V, over the focused tests above:mainpasses its 32 tests and the head its 49, 3 of 3 runs each, with noVUID-line in either arm. No run printed "was not found but was requested", and every test that creates a Vulkan instance loggedInsert instance layer "VK_LAYER_KHRONOS_validation".mainand 43 on the head. The only VUID in either log isVUID-VkDeviceCreateInfo-pNext-pNext, which that layer logs atvkCreateDeviceonmaintoo, for a structure newer than its 1.3.275 header (VkStructureType1000574000), so the head adds none. That message fails the same 14 tests in both arms,agc_driver_image_tableand its 13_packedvariants, because the run's failure regex matches anyVUID-; the other tests pass, 19 onmainand 36 on the head. The run counts 14 "was not found but was requested" matches per arm, and each is ctest printing that failure regex for one of the 14; no loader line in either log says the layer was missing.mainbd278f3 through fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790, fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457, fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 and feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395 (×10, everyagctest).possibleU32Bitsdepth-limited (possibleU32BitsDepth); this PR'sShiftRightLogical32case now recurses through it withdepth - 1u, as its siblings do. Without that line the merge doesn't build, sincepossibleU32Bitsis now defined afterpossibleU32BitsDepth. This PR's other changed lines are unchanged.FormatVersion:main's 69, this PR's 89. feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395's merge takes perf(shader): read a pass-through input that the pixel shader reads only at P0 as a flat input #19530's move ofmainfrom 68 to 69.APS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.agc_driver_image_tablein the first attempt (attempt 1): it timed out at 30.05 s in its first repetition, againstmain'sTIMEOUT 30, and the set's other 49 tests passed 10 of 10. In the rerun it took 24.70 s in its first repetition and 6.64 to 7.03 s after that. On GitHub's Linux runner the first repetition, from a cold start, is the slow one across the stack: 27.44 s on feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395's e9ddd12, 28.05 s on this PR's previous head 239ae90, 23.84 s on fix(shader): read a chased pointer's high word at its own offset #9749, 18.29 s on fix(shader): follow a conditional pointer chase through a V# behind a pointer-keyed record pointer #9633 and 14.10 s on fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790, with 4 to 7 s after that.mainbd278f3 alone on the same runner (run) takes 16.01 s in its first repetition and 3.30 and 3.33 s after that, with only that test running; the ×10 runs share the runner with the set's other tests.agctest, once: Linux: 1,708 run, 1,600 pass, 106 skip, 2 fail. Windows: 1,747 run, 506 pass, 1,241 skip (no Vulkan device), 0 fail. The two Linux failures aremain's:agc_driver_global_atomic_csub: "AGC graphics: global atomic csub without glc: wave64 byte 644 is 146, expected 0";agc_driver_coherent_atomic_loads_enabled: a 60-second timeout.main's own Linux job fails both, with the same message and the same timeout, at d2949cd (job) and at 67ec0f7 (job), covered by test(agc): skip the csub and coherent atomic load runs on subgroups narrower than 32 lanes #19332._putenv_stest fix (#19899) on top, becausemain's Windows test build breaks without it ("'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp, from perf(agc): reuse read-only guest buffer uploads #18037); it isn't on this branch.main328cbf6 through fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790, fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457, fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 and feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395 (×10, with #21255's test change).FormatVersion, where fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790 now takes 98, above this PR's 89. The merge moves this PR to 99. This PR's own lines are unchanged apart from theFormatVersionline.APS5_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 at e249fc4 (job). fernandomcrsilva's open test(agc): keep the packed image table guard programs at different addresses #21255 changes that test. With test(agc): keep the packed image table guard programs at different addresses #21255's test change on top of this head (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,main0694c4c alone 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 perf(agc): reuse read-only guest buffer uploads #18037); it isn't on this branch.ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1. This head 20b045a merged ontomaine4caa07 (their merge 83e91ce933, clean), againstmaine4caa07 alone,ctest -R 'pointer|image_table|nested|agc_shader_disk_cache|agc_shader_memory|bda_anchor'.main: 78 of 78 pass. This PR: 95 of 95 pass, including the 17 testsmaindoesn't have: this PR's two (agc_driver_pointer_vsharp_child_key_tableand_child_key_arm_table) and the 15 of fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790, fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457, fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 and feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395.agc_driver_pointer_vsharp_child_key_arm_table, which fails on two Intel iGPUs on Windows (above), passes here. No test skips on either side. The layer was inserted 43 times onmainand 59 times with this PR; the tests without an insert are CPU-only. NoVUID-line on either side, and every test that creates a device selected the RTX 4090.tests/execution/ImageTable.cpp), for fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939'sagc_driver_pointer_phi_lane_and_tableandagc_driver_pointer_phi_lane_not_table. @frankea's Windows 11 RTX 4090 run (comment) failed them here too, at 20b045a, withselected the descriptor at 0x0: unmapped. The cause, the fix and a verify-only Linux run with the records mapped at 1 GiB, red before the fix and green after, are in fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939's Tested: the records sat below 4 GiB, so an arm whose low word is 0 selected a null pointer. old..new touches onlyImageTable.cpp.^agc_driver_pointer_and^agc_driver_nested_tests pass, none skipped._putenv_sfix (#19899) merged for the run only: the build passes, the libc and libkernel suites run 421 and 417 tests with 0 failed, and the 19 tests skip (no Vulkan device). The Windows GPU case itself can only be re-run by a tester.main33876d3 with feat(agc): blend into 11_11_10 float color targets in the pixel shader #9020, feat(agc): render layered draws into a depth view of several slices #7256 andmain's 0cbbcfd, plus each PR's diff against 328cbf6. On that base and with fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457 (d896ff4), fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790 (aadbb73) and fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer #9969 (20b045a), every run (2 of 2 each) stops at compute shader0x120aed7f00, 127 to 166 s after the press, withGetImageResource dword 0 is not a valid runtime value, chainLoadAddressU32@pc=0x19a0←LoadAddressU32@pc=0x198c←ReadConstBuffer@pc=0xac8. An offline replay of the dumped request refuses the same way onmain328cbf6 and on each head. That matches @freneza's offline result above, where0x120aed7f00is still refused.maind89f265 through fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790, without conflicts (×10, with #21255's test change).FormatVersionstays 99, and its 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: 57 run, 56 pass, 0 skip, 1 fail. Windows: 59 run, 11 pass, 48 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 onmaind89f265 alone 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 at 244b338 (job). fernandomcrsilva's open test(agc): keep the packed image table guard programs at different addresses #21255 changes that test. With test(agc): keep the packed image table guard programs at different addresses #21255's test change on top of fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer #9969's 630bbb0, this PR's own head (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,main0694c4c alone 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 perf(agc): reuse read-only guest buffer uploads #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. This head 630bbb0 merged ontomaine1ab104 (their merge 2c9689c0c3, clean), againstmaine1ab104 alone.main: 39 tests, 38 pass, 1 skip in each run. This PR: 56 tests, 55 pass, 1 skip in each run; the counts include the tests of feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395, fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939, fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #9457 and fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790, which this head carries. 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).agc_driver_pointer_vsharp_child_key_arm_table, the test that fails on the two Intel iGPUs above, passes 3 of 3. 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.maind50640e through fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790, without conflicts (×10, with #21255's test change).FormatVersionstays 99, and its 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: 57 run, 56 pass, 0 skip, 1 fail. Windows: 59 run, 11 pass, 48 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. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners. The Windows job ran in a second attempt, because the first reached the job time limit while building on an AMD EPYC 7763 runner, before any test ran.agc_driver_image_table_packed_guards, also fails onmaind89f265 alone 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 at 244b338 (job). fernandomcrsilva's open test(agc): keep the packed image table guard programs at different addresses #21255 changes that test. With test(agc): keep the packed image table guard programs at different addresses #21255's test change on top of fix(shader): index a pointer-loaded V#'s T# array by a word read from the same buffer #9969's dc97c68, this PR's own head (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 test(agc): keep the packed image table guard programs at different addresses #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 test(libkernel): compare Windows thread CPU clocks with the process cycle time #23756 reports this test failing intermittently on Windows onmained1def4 under load and changes it. It merged aftermaind50640e, so these runs don't have it. 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 perf(agc): reuse read-only guest buffer uploads #18037); it isn't on this branch.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)ReadConstBuffer@pc=0x9a50after fix(shader): plan several T#s read through one pointer-loaded V#, keeping the V# real for their other uses #9790, as hugodearaujo's run shows; its next stop is an S# at 0x9a9c (see Tested)