feat(agc): image-table records that hold a pointer to the T# or split it over two loads #4475

Merged
Pipodi merged 2 commits from upstream-pr/4475 into main 2026-10-14 17:46:12 +00:00
Pipodi commented 2026-10-12 12:59:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pipodi on 2026-10-12T12:59:10Z.


What

Two more record layouts for #758's image-table columns, both from Ghost of Yōtei (PPSA26344):

  • Records that hold a pointer to the T#. The shader reads a 64-bit pointer from each record (two dwords at key * stride + addend + offset of a buffer) and then the T# (or S#) at an immediate offset behind that pointer. The column is planned only when the descriptor is read at an immediate offset from a GetAddressResource whose two dwords are consecutive reads of one buffer at the same affine offset. The materializer reads each record's pointer when it builds the table, reads the descriptor behind it, and records one read range per record. Pointer columns take their own path ahead of #757's batched record reader, since a descriptor's address is known only once its record's pointer is read. Compute shader 0x8000333c00 picks a record per lane in a waterfall loop and samples the image behind the record's pointer.
  • A T# spread over two loads of its record. When a descriptor's dwords come from two scalar buffer loads of the same record, and one load's offset carries an immediate addend, the column used to be refused: it wanted one offset expression and one buffer node for every dword. It now peels the immediate addend off each read's offset, compares effective offsets (memory offset plus addend) and the remaining base expressions, and accepts distinct buffer nodes that are equivalent. Dword 0 keeps its offset expression, so columns that were already planned are planned the same way. Pixel shader 0x8000296000 reads T# dwords 0-3 with an s_buffer_load_dwordx16 at key * 0x88 and dwords 4-7 with an s_buffer_load_dwordx4 at 48 + key * 0x88.
    Folding a second load into the first changes where its offset wraps. At a dynamic offset of 0xfffffff0, a second load at +16 wraps to the start of the buffer, but the folded read lands past 4 GiB. So a column folds a load only when its addend is no smaller than dword 0's and its immediate is small. The column records dword 0's addend and the largest extra addend. A record whose offset would carry past 32 bits between the two loads is not read; it becomes OffsetCarry poison.

Tested

Windows 11, RTX 4090.

  • agc_driver_image_table. Each commit adds an execution test to ImageTable.cpp.
    • RunPointerRecordTests (IndirectRecordCode): records hold pointers to three T#s of different classes, in reverse order. It checks the texels per record, one table element per distinct T#, and that changing the T# behind one record's pointer changes what that record samples.
    • RunSplitRecordTests (SplitRecordCode): a 256-bit T# read by an s_buffer_load_dwordx8 and an s_buffer_load_dwordx4 at +0x20 of its record. It checks the texels per record and one table element per distinct T#.
  • agc_shader_bindless: verifyPointerTableOffsetCarry.
    • A pointer table whose T# is read by two s_load_dwordx4 at key * 32 + 0xffffff10 and key * 32 + 0xffffff20, with memory mapped on both sides of 4 GiB. Record 7's offset is 0xfffffff0, so only its second load wraps.
    • It checks the column's fold fields, that record 7 is OffsetCarry poison and is never read, and that records 6 and 8 still resolve to their T#s.
    • It fails without the guard.
  • Rebased onto main e34c47921 (#757 and #758 merged). On Windows (RTX 4090), agc_driver_image_table, agc_driver_image_table_cache, agc_driver_image_table_reuse, agc_shader_memory, agc_shader_bindless and agc_driver_graphics pass.
  • Without the changes. On #758 alone the pointer test fails with GetImageResource dword 0 is not a valid runtime value (chain LoadAddressU32 ← GetAddressResource(ReadConstBuffer …)). With only the first commit, the split test fails with the same error at the record's first load. With both, both pass.
  • Full suite (ctest, Windows, RTX 4090): of 1198 tests, 1183 pass and 14 hardware- or display-dependent tests skip. check_main_sync fails test_paths_with_spaces_and_unicode_are_reported_verbatim because this machine's console code page prints é as é; it does not touch this change.
  • Ghost of Yōtei: in our local build with these changes, 0x8000333c00 is planned and dispatched without a refusal, and the title reaches its title scene.
  • The three table shaders, replayed offline with agc_shader_replay on this head:
    • Compute shaders 0x800027c200 and 0x8000333c00 recompile from their captured requests.
    • Pixel shader 0x8000296000 prepares with --prepare. Its capture lacks the SRT memory needed for a full recompile. On main (2a5eca11c, checked on 10-12) all three failed planning with GetImageResource dword 0 is not a valid runtime value.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt (none added)
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none)
  • Generic behaviour, not specific to one title
  • Depends on: none (#757 and #758 are merged)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4829758772 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4475). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-10-12T12:59:10Z. --- ### What Two more record layouts for #758's image-table columns, both from Ghost of Yōtei (PPSA26344): - **Records that hold a pointer to the T#.** The shader reads a 64-bit pointer from each record (two dwords at `key * stride + addend + offset` of a buffer) and then the T# (or S#) at an immediate offset behind that pointer. The column is planned only when the descriptor is read at an immediate offset from a `GetAddressResource` whose two dwords are consecutive reads of one buffer at the same affine offset. The materializer reads each record's pointer when it builds the table, reads the descriptor behind it, and records one read range per record. Pointer columns take their own path ahead of #757's batched record reader, since a descriptor's address is known only once its record's pointer is read. Compute shader `0x8000333c00` picks a record per lane in a waterfall loop and samples the image behind the record's pointer. - **A T# spread over two loads of its record.** When a descriptor's dwords come from two scalar buffer loads of the same record, and one load's offset carries an immediate addend, the column used to be refused: it wanted one offset expression and one buffer node for every dword. It now peels the immediate addend off each read's offset, compares effective offsets (memory offset plus addend) and the remaining base expressions, and accepts distinct buffer nodes that are equivalent. Dword 0 keeps its offset expression, so columns that were already planned are planned the same way. Pixel shader `0x8000296000` reads T# dwords 0-3 with an `s_buffer_load_dwordx16` at `key * 0x88` and dwords 4-7 with an `s_buffer_load_dwordx4` at `48 + key * 0x88`. Folding a second load into the first changes where its offset wraps. At a dynamic offset of `0xfffffff0`, a second load at `+16` wraps to the start of the buffer, but the folded read lands past 4 GiB. So a column folds a load only when its addend is no smaller than dword 0's and its immediate is small. The column records dword 0's addend and the largest extra addend. A record whose offset would carry past 32 bits between the two loads is not read; it becomes `OffsetCarry` poison. ### Tested Windows 11, RTX 4090. - **`agc_driver_image_table`.** Each commit adds an execution test to `ImageTable.cpp`. - `RunPointerRecordTests` (`IndirectRecordCode`): records hold pointers to three T#s of different classes, in reverse order. It checks the texels per record, one table element per distinct T#, and that changing the T# behind one record's pointer changes what that record samples. - `RunSplitRecordTests` (`SplitRecordCode`): a 256-bit T# read by an `s_buffer_load_dwordx8` and an `s_buffer_load_dwordx4` at `+0x20` of its record. It checks the texels per record and one table element per distinct T#. - **`agc_shader_bindless`: `verifyPointerTableOffsetCarry`.** - A pointer table whose T# is read by two `s_load_dwordx4` at `key * 32 + 0xffffff10` and `key * 32 + 0xffffff20`, with memory mapped on both sides of 4 GiB. Record 7's offset is `0xfffffff0`, so only its second load wraps. - It checks the column's fold fields, that record 7 is `OffsetCarry` poison and is never read, and that records 6 and 8 still resolve to their T#s. - It fails without the guard. - **Rebased onto `main` `e34c47921`** (#757 and #758 merged). On Windows (RTX 4090), `agc_driver_image_table`, `agc_driver_image_table_cache`, `agc_driver_image_table_reuse`, `agc_shader_memory`, `agc_shader_bindless` and `agc_driver_graphics` pass. - **Without the changes.** On #758 alone the pointer test fails with `GetImageResource dword 0 is not a valid runtime value` (chain `LoadAddressU32 ← GetAddressResource(ReadConstBuffer …)`). With only the first commit, the split test fails with the same error at the record's first load. With both, both pass. - **Full suite** (`ctest`, Windows, RTX 4090): of 1198 tests, 1183 pass and 14 hardware- or display-dependent tests skip. `check_main_sync` fails `test_paths_with_spaces_and_unicode_are_reported_verbatim` because this machine's console code page prints `é` as `é`; it does not touch this change. - **Ghost of Yōtei:** in our local build with these changes, `0x8000333c00` is planned and dispatched without a refusal, and the title reaches its title scene. - **The three table shaders, replayed offline with `agc_shader_replay` on this head:** - Compute shaders `0x800027c200` and `0x8000333c00` recompile from their captured requests. - Pixel shader `0x8000296000` prepares with `--prepare`. Its capture lacks the SRT memory needed for a full recompile. On `main` (`2a5eca11c`, checked on 10-12) all three failed planning with `GetImageResource dword 0 is not a valid runtime value`. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt (none added) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none) - [x] Generic behaviour, not specific to one title - [x] Depends on: none (#757 and #758 are merged) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
blawesom commented 2026-10-12 15:10:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-12T15:10:09Z.


Heads-up before review: this PR now collides architecturally with main — a plain rebase is not possible, and I want to save whoever attempts one a confusing hour.

main has evolved a runtime image-metadata mechanism of its own while this PR was in flight (indirectRoot / registrationModules: RuntimeImageDword, RuntimeImageMode, RuntimeImageSwizzle, runtime image counts and state dwords in the binding allocator, plus registration-module plumbing through the serializer and cache key). This PR implements the same goal through a different design — image/sampler tables indexed at runtime offsets (image.table, state.tableAccess, tableSelector).

The two designs meet head-on in at least 8 files (ShaderResources.cpp, ShaderValidation.cpp, DescriptorBindingBuilder.hpp/.cpp, BindingAllocator.cpp, ShaderDiskCache.cpp, SpirvImageEmitter.cpp, SpirvDescriptors.cpp), and both sides changed the serialized artifact structs (CompiledShaderArtifact, ShaderInvocation, RecompileResult, DescriptorBinding — the disk-cache size asserts diverge), so the encoders would need re-deriving for a merged layout even after the semantics are unified.

As I see it the options are: port this PR's table concept on top of main's indirect-image scheme, argue for the table design as the replacement (in which case the maintainers should weigh the two first), or narrow the PR to whatever the table design adds that indirectRoot doesn't cover. Happy to attempt the port onto main's scheme if the table design is what should win — but that's a redesign decision, not a rebase.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6127036991 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4475#issuecomment-6127036991). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-12T15:10:09Z. --- **Heads-up before review: this PR now collides architecturally with `main`** — a plain rebase is not possible, and I want to save whoever attempts one a confusing hour. `main` has evolved a runtime image-metadata mechanism of its own while this PR was in flight (`indirectRoot` / `registrationModules`: `RuntimeImageDword`, `RuntimeImageMode`, `RuntimeImageSwizzle`, runtime image counts and state dwords in the binding allocator, plus registration-module plumbing through the serializer and cache key). This PR implements the same goal through a different design — image/sampler **tables indexed at runtime offsets** (`image.table`, `state.tableAccess`, `tableSelector`). The two designs meet head-on in at least 8 files (`ShaderResources.cpp`, `ShaderValidation.cpp`, `DescriptorBindingBuilder.hpp/.cpp`, `BindingAllocator.cpp`, `ShaderDiskCache.cpp`, `SpirvImageEmitter.cpp`, `SpirvDescriptors.cpp`), and both sides changed the serialized artifact structs (`CompiledShaderArtifact`, `ShaderInvocation`, `RecompileResult`, `DescriptorBinding` — the disk-cache size asserts diverge), so the encoders would need re-deriving for a merged layout even after the semantics are unified. As I see it the options are: port this PR's table concept on top of main's indirect-image scheme, argue for the table design as the replacement (in which case the maintainers should weigh the two first), or narrow the PR to whatever the table design adds that `indirectRoot` doesn't cover. Happy to attempt the port onto main's scheme if the table design is what should win — but that's a redesign decision, not a rebase.
Pipodi commented 2026-10-12 16:45:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pipodi on 2026-10-12T16:45:49Z.


@blawesom thanks for the heads-up, that saves a confusing hour.

A data point on whether main's runtime-image path already covers these shaders: I replayed the captured recompile requests for Ghost of Yōtei's three table shaders against current main (2a5eca11c), offline with agc_shader_replay. All three still fail resource analysis with GetImageResource dword 0 is not a valid runtime value:

compute 0x800027c200: the T# comes from a buffer record whose index is itself loaded from another buffer (the title's first large dispatch, ~30 s after launch);
compute 0x8000333c00: the record holds a 64-bit pointer to the T#, picked per lane in a waterfall loop (the first layout this PR adds);
pixel 0x8000296000: the T# is read from a record at key * 0x88 (the second layout this PR adds).
So indirectRoot doesn't plan T#s read from buffer records at runtime offsets yet, and that is what #758 and this PR do.

This PR only adds two record layouts on top of #758 and follows its design, so the design question belongs to #758: @Celegans12 and the maintainers. I'll keep this as a draft and redo the two layouts on top of whichever design #758 ends up with, including a port onto main's scheme if that's the route.

(AI-assisted: written with Claude.)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6128612232 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4475#issuecomment-6128612232). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-10-12T16:45:49Z. --- @blawesom thanks for the heads-up, that saves a confusing hour. A data point on whether main's runtime-image path already covers these shaders: I replayed the captured recompile requests for Ghost of Yōtei's three table shaders against current main (2a5eca11c), offline with agc_shader_replay. All three still fail resource analysis with GetImageResource dword 0 is not a valid runtime value: compute 0x800027c200: the T# comes from a buffer record whose index is itself loaded from another buffer (the title's first large dispatch, ~30 s after launch); compute 0x8000333c00: the record holds a 64-bit pointer to the T#, picked per lane in a waterfall loop (the first layout this PR adds); pixel 0x8000296000: the T# is read from a record at key * 0x88 (the second layout this PR adds). So indirectRoot doesn't plan T#s read from buffer records at runtime offsets yet, and that is what #758 and this PR do. This PR only adds two record layouts on top of #758 and follows its design, so the design question belongs to #758: @Celegans12 and the maintainers. I'll keep this as a draft and redo the two layouts on top of whichever design #758 ends up with, including a port onto main's scheme if that's the route. (AI-assisted: written with Claude.)
Mouhand-Kaddo commented 2026-10-13 07:10:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Mouhand-Kaddo on 2026-10-13T07:10:48Z.


Tested on Linux at e3080a9060907458b988831d851ca552478966b4 using a captured Demon's Souls PPSA01342 descriptor-load pattern: two four-dword scalar address loads, with the second offset equal to the first plus 16.

The added positive regression runs through CompileTable and checks captured descriptor codes and consumed read ranges against the equivalent eight-dword load. With the parent tracker (e8e599b), agc_shader_memory_tests --bindless fails at GetImageResource dword 0 is not a valid runtime value (LoadAddressU32@pc=0x00000034). With this PR's tracker, the same check passes. Built Release with SPIRV-Tools enabled. This is a focused shader test, not a title or full-suite result.

One address-semantics gap from source inspection, not yet a failing title observation: at dynamic offset 0xfffffff0, the second load's IAdd32(offset, 16) wraps to zero before adding its scalar-load metadata displacement. Folding that into the first load's increasing immediate makes ScalarAddressDword(base, 0xfffffff0, 0x50) yield base + 0x100000040, while the second load should start at base + 0x40. Keeping the per-load offset arithmetic would preserve this case.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6140300135 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4475#issuecomment-6140300135). Originally posted by [Mouhand-Kaddo](https://github.com/Mouhand-Kaddo) on 2026-10-13T07:10:48Z. --- Tested on Linux at `e3080a9060907458b988831d851ca552478966b4` using a captured Demon's Souls PPSA01342 descriptor-load pattern: two four-dword scalar address loads, with the second offset equal to the first plus 16. The added positive regression runs through `CompileTable` and checks captured descriptor codes and consumed read ranges against the equivalent eight-dword load. With the parent tracker (`e8e599b`), `agc_shader_memory_tests --bindless` fails at `GetImageResource dword 0 is not a valid runtime value` (`LoadAddressU32@pc=0x00000034`). With this PR's tracker, the same check passes. Built Release with SPIRV-Tools enabled. This is a focused shader test, not a title or full-suite result. One address-semantics gap from source inspection, not yet a failing title observation: at dynamic offset `0xfffffff0`, the second load's `IAdd32(offset, 16)` wraps to zero before adding its scalar-load metadata displacement. Folding that into the first load's increasing immediate makes `ScalarAddressDword(base, 0xfffffff0, 0x50)` yield `base + 0x100000040`, while the second load should start at `base + 0x40`. Keeping the per-load offset arithmetic would preserve this case.
Pipodi commented 2026-10-13 09:46:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pipodi on 2026-10-13T09:46:31Z.


@Celegans12 I've rebased this onto the reworked #757/#758 (#758 head 6ac700240), so no need to do it for me. The split-load commit applied unchanged. In the pointer-record commit, pointer columns now take their own path ahead of #757's batched record reader, since a descriptor's address is known only once its record's pointer is read; plain and address columns go through the batched reader untouched. New head 21fe1d172. On Windows (RTX 4090), agc_driver_image_table, agc_driver_image_table_cache, agc_driver_image_table_reuse, agc_shader_memory, agc_shader_bindless and agc_driver_graphics pass. Still a draft until #758 settles.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6142834977 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4475#issuecomment-6142834977). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-10-13T09:46:31Z. --- @Celegans12 I've rebased this onto the reworked #757/#758 (#758 head `6ac700240`), so no need to do it for me. The split-load commit applied unchanged. In the pointer-record commit, pointer columns now take their own path ahead of #757's batched record reader, since a descriptor's address is known only once its record's pointer is read; plain and address columns go through the batched reader untouched. New head `21fe1d172`. On Windows (RTX 4090), `agc_driver_image_table`, `agc_driver_image_table_cache`, `agc_driver_image_table_reuse`, `agc_shader_memory`, `agc_shader_bindless` and `agc_driver_graphics` pass. Still a draft until #758 settles. *Tested and written by Claude (AI assistant) on a contributor's machine.*
adriadam10 commented 2026-10-14 13:56:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T13:56:27Z.

Review: CHANGES_REQUESTED


Thanks for the work here. Not mergeable yet, for these reasons:

  • This branch is stacked on #758 6ac700240, but #758 now has head a5c63d5249 (restacked on #757 e7faf20683); the old base is no longer an ancestor. Merging the two commits of this PR (9d99a1416, 21fe1d172) onto the current #758 conflicts in core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp (the pointer-column path ahead of the batched record reader), so it needs a logic-aware restack rather than a mechanical rebase.
  • #757 and #758 themselves still conflict with main, and this PR can only land after both. Please restack onto #758's current head, rerun agc_driver_image_table, agc_driver_image_table_cache, agc_driver_image_table_reuse, agc_shader_memory, agc_shader_bindless and agc_driver_graphics, and re-push once the bases are merged (then onto main).
  • blawesom's note about main's own runtime-image mechanism (indirectRoot / registrationModules) applies to the whole stack; please confirm the pointer-record and split-load columns still plan the three Ghost of Yōtei shaders after the rebase.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5519079264 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4475#pullrequestreview-5519079264). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-14T13:56:27Z. **Review:** CHANGES_REQUESTED --- Thanks for the work here. Not mergeable yet, for these reasons: - This branch is stacked on #758 `6ac700240`, but #758 now has head `a5c63d5249` (restacked on #757 `e7faf20683`); the old base is no longer an ancestor. Merging the two commits of this PR (`9d99a1416`, `21fe1d172`) onto the current #758 conflicts in `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` (the pointer-column path ahead of the batched record reader), so it needs a logic-aware restack rather than a mechanical rebase. - #757 and #758 themselves still conflict with `main`, and this PR can only land after both. Please restack onto #758's current head, rerun `agc_driver_image_table`, `agc_driver_image_table_cache`, `agc_driver_image_table_reuse`, `agc_shader_memory`, `agc_shader_bindless` and `agc_driver_graphics`, and re-push once the bases are merged (then onto `main`). - blawesom's note about `main`'s own runtime-image mechanism (`indirectRoot` / `registrationModules`) applies to the whole stack; please confirm the pointer-record and split-load columns still plan the three Ghost of Yōtei shaders after the rebase.
Pipodi commented 2026-10-14 15:06:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pipodi on 2026-10-14T15:06:09Z.


@adriadam10 Restacked onto #758 a5c63d524. New head e354f9a61.

  • Pointer records: re-ported onto #757's batched record reader. Pointer columns take their own path ahead of it, because a descriptor's address is known only once its record's pointer is read. The plan codec carries the new column fields, and its size asserts are updated.
  • Split loads: now has a wrap guard for the case @Mouhand-Kaddo raised (and @Celegans12 asked about earlier).
    • The column folds a second load into the first load's offset only when the second load's addend is no smaller than the first's, with a small positive immediate. It records the first load's addend and the largest extra addend.
    • At materialization, a record whose offset would carry past 32 bits between the two loads is not read. It becomes OffsetCarry poison. Example: dynamic offset 0xfffffff0 with the second load at +16, where the guest's IAdd32 wraps to the start of the buffer and the fold would read past 4 GiB.
    • The new verifyPointerTableOffsetCarry (in agc_shader_memory_tests --bindless) builds such a two-load pointer table, with records on both sides of 4 GiB. It checks that the record at offset 0xfffffff0 is OffsetCarry poison and is never read, and that its neighbours still resolve. It fails without the guard.

Windows, RTX 4090: agc_driver_image_table, agc_driver_image_table_cache, agc_driver_image_table_reuse, agc_shader_memory, agc_shader_bindless and agc_driver_graphics pass, and the full suite has no failures (1140 pass, 9 skip). Conventions pass.

On indirectRoot: the three Ghost of Yōtei table shaders, replayed offline with agc_shader_replay on this head, still plan. Compute 0x800027c200 and 0x8000333c00 recompile from their captured requests. Pixel 0x8000296000 prepares (its capture lacks the SRT memory needed for a full recompile). On main (2a5eca11c, checked on 10-12) all three failed planning with GetImageResource dword 0 is not a valid runtime value.

As before, this lands after #757 and #758. I'll restack onto main once they are merged.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6171482228 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4475#issuecomment-6171482228). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-10-14T15:06:09Z. --- @adriadam10 Restacked onto #758 `a5c63d524`. New head `e354f9a61`. - **Pointer records:** re-ported onto #757's batched record reader. Pointer columns take their own path ahead of it, because a descriptor's address is known only once its record's pointer is read. The plan codec carries the new column fields, and its size asserts are updated. - **Split loads:** now has a wrap guard for the case @Mouhand-Kaddo raised (and @Celegans12 asked about earlier). - The column folds a second load into the first load's offset only when the second load's addend is no smaller than the first's, with a small positive immediate. It records the first load's addend and the largest extra addend. - At materialization, a record whose offset would carry past 32 bits between the two loads is not read. It becomes `OffsetCarry` poison. Example: dynamic offset `0xfffffff0` with the second load at +16, where the guest's `IAdd32` wraps to the start of the buffer and the fold would read past 4 GiB. - The new `verifyPointerTableOffsetCarry` (in `agc_shader_memory_tests --bindless`) builds such a two-load pointer table, with records on both sides of 4 GiB. It checks that the record at offset `0xfffffff0` is `OffsetCarry` poison and is never read, and that its neighbours still resolve. It fails without the guard. Windows, RTX 4090: `agc_driver_image_table`, `agc_driver_image_table_cache`, `agc_driver_image_table_reuse`, `agc_shader_memory`, `agc_shader_bindless` and `agc_driver_graphics` pass, and the full suite has no failures (1140 pass, 9 skip). Conventions pass. On `indirectRoot`: the three Ghost of Yōtei table shaders, replayed offline with `agc_shader_replay` on this head, still plan. Compute `0x800027c200` and `0x8000333c00` recompile from their captured requests. Pixel `0x8000296000` prepares (its capture lacks the SRT memory needed for a full recompile). On `main` (`2a5eca11c`, checked on 10-12) all three failed planning with `GetImageResource dword 0 is not a valid runtime value`. As before, this lands after #757 and #758. I'll restack onto `main` once they are merged. *Tested and written by Claude (AI assistant) on a contributor's machine.*
Pipodi commented 2026-10-14 16:31:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pipodi on 2026-10-14T16:31:33Z.


Rebased onto main e34c47921 now that #757 and #758 are merged. New head 55eefe9c5, with the same two commits; the rebase applied cleanly.

On Windows (RTX 4090):

  • The six tests pass, with verifyPointerTableOffsetCarry.
  • Full suite: 1183 pass and 14 skip. The one failure is check_main_sync's unicode-path case, from this machine's console code page.
  • The three Ghost of Yōtei table shaders still plan when replayed offline: 0x800027c200 and 0x8000333c00 recompile, and 0x8000296000 prepares.
  • Conventions pass.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6173198118 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4475#issuecomment-6173198118). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-10-14T16:31:33Z. --- Rebased onto `main` `e34c47921` now that #757 and #758 are merged. New head `55eefe9c5`, with the same two commits; the rebase applied cleanly. On Windows (RTX 4090): - The six tests pass, with `verifyPointerTableOffsetCarry`. - Full suite: 1183 pass and 14 skip. The one failure is `check_main_sync`'s unicode-path case, from this machine's console code page. - The three Ghost of Yōtei table shaders still plan when replayed offline: `0x800027c200` and `0x8000333c00` recompile, and `0x8000296000` prepares. - Conventions pass. *Tested and written by Claude (AI assistant) on a contributor's machine.*
adriadam10 commented 2026-10-14 17:05:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T17:05:33Z.

Review: APPROVED


Re-checked on the current head: the restack points from the previous review are resolved (#757/#758 merged, clean rebase onto main). Built and ran agc_shader_memory, agc_driver_image_table, _cache, _cache_bounds and _reuse on the merged tree: all pass. The OffsetCarry test fails when the guard in ResourceMaterializer.cpp is disabled. Merging once the full Build is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5521672483 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4475#pullrequestreview-5521672483). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-14T17:05:33Z. **Review:** APPROVED --- Re-checked on the current head: the restack points from the previous review are resolved (#757/#758 merged, clean rebase onto `main`). Built and ran `agc_shader_memory`, `agc_driver_image_table`, `_cache`, `_cache_bounds` and `_reuse` on the merged tree: all pass. The `OffsetCarry` test fails when the guard in `ResourceMaterializer.cpp` is disabled. Merging once the full Build is green.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!4475
No description provided.