Repository navigation
feat(shader): follow pointer chains from image-table records to the T# - #6232
adriadam10 merged 1 commit into
Conversation
|
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.
|
|
Windows NVIDIA run, since the description lists lavapipe only. Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), AMD Ryzen 7 5800X, WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies,
As far as I can tell from the source, AI-assisted: yes (runs done with Claude Code). |
|
Title run on Guardians of the Galaxy (PPSA01748), the title this PR targets from #6191. Head
So the constant buffer → pointer → pointer → T# half of #6191 is covered on the title. Menu frame rate with a warm shader cache is the same on both builds, about 11–14 FPS. The next stop is in the draw path, not in this PR's code. A The stack, from a local print added for this run only: Details
Tested and written by Claude (AI assistant) on a contributor's machine. |
6b662dd to
486f306
Compare
Keeps this branch's tagVariantRuns declaration next to main's dumpRequest suffix parameter in Driver.hpp, and reads #6232's pointer-chain test words from its table's snapshot, where this branch keeps them.
What
Part of #6191: the Guardians of the Galaxy chain (constant buffer → pointer → pointer → T#). The Ratchet & Clank chain (record → pointer → V# → T# at a second
readfirstlaneindex) needs a second key and is not covered here.#4475 plans an image-table record that holds a pointer to the T#. When the pointer itself is loaded through another pointer, the column was refused:
TryMakeIndirectColumnwanted both pointer dwords to be scalar buffer reads, so the stop isGetImageResource dword 0 is not a valid runtime valuewith the chainLoadAddressU32(GetAddressResource(LoadAddressU32(GetAddressResource(ReadConstBuffer …)))).GetAddressResourcewhile both of its dwords are consecutiveLoadAddressU32reads (offsetnandn + 4, immediate offset, same or equivalent pointer). Each step is onePointerHop {offset, immediate}. The record at the end of the chain is matched as before. Any depth is accepted; a chain that does not end in a keyed record read is refused as before.column.pointerHopsin order. A hop that is unaligned, wraps, or reaches an unmapped page makes the recordUnmappedpoison, like an unreadable T#. Each link's 8 bytes are added to the table's ranges, so a changed link rebuilds the table.TableColumngainspointerHops; the plan encoder and decoder carry it, and theShaderDiskCachelayout asserts are updated. A column with no hops is planned and encoded as before.Tested
Amazon Linux 2023 (x86-64, GCC 14.2.1, Release),
maind92a8dad3. I have no GPU and no game, so I could not run Guardians or Ratchet.agc_shader_bindless: newverifyPointerChainImageTable. A compute shader reads a record pointer withs_buffer_load_dwordx2atkey * 16 + 8, loads a second pointer withs_load_dwordx2at+0x10, and the T# withs_load_dwordx8at+0x20. It checks the column (indirect, stride 16, offset 8,pointerHops == {{0, 0x10}}), that every scalar address load is planning-only and the shader does not use BDA, that two chains to the same T# share one element and a different T# gets its own, that records whose chain hits a null pointer areUnmappedpoison, that the links are in the captured regions and snapshot ranges, and that moving one record's second pointer changes its T#.GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x4c(GetAddressResource(LoadAddressU32@pc=0x44(GetAddressResource(ReadConstBuffer@pc=0x3c(…, the same shape as the Guardians report.agc_shader_disk_cache. The hand-built plan now has two pointer hops. It passes, and it fails ("the decoded hand-built plan differs…") when the hop encoding is removed.agc_driver_image_table: newRunPointerChainRecordTests(PointerChainRecordCode, which isIndirectRecordCodeplus ones_load_dwordx2). It checks texels per record, one element per distinct T#, and that moving record 1's second pointer changes what it samples. It passes on lavapipe (Mesa 24.2.6, CPU only, no hardware GPU). On the unchanged tracker it fails with the sameGetImageResource dword 0chain.agc_driver_image_tablebehaves the same with and without this change.RunAnisoOverrideTestsfails ("a direct pair changed its texels"), andRunGraphicsTestsdid not finish within 15 minutes. Each group was run on its own: the other groups pass, includingRunPointerRecordTests,RunSplitRecordTestsandRunPointerStorageWriteTests. I could not run the full suite on real hardware.agc_shader_memory,agc_shader_bindless,agc_shader_srt_read_patching,agc_shader_frontend_pair(_off),agc_shader_quad_mask_no_demote,agc_shader_layout_pair(_off)andagc_shader_disk_cachepass.python3 tools/check_conventions.py --base origin/mainreports no findings for the code.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 (none added).mdfiles or images added to the repository (attach them to this PR)