feat(shader): read table-call callee addresses at run time for boot-stable linking #24906

Closed
tablefrogpillow wants to merge 3 commits from upstream-pr/24906 into main
tablefrogpillow commented 2026-11-21 10:16:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tablefrogpillow on 2026-11-21T10:16:34Z.


What

Boot-stable table-call linking, so the driver shader cache can hit across boots.

Authored by @Dark3581 (two commits, root-cause analysis in #24525); I rebased onto current main, reconciled the serializer, and verified it on AMD hardware.

Today LinkCalls bakes the absolute callee address into the linked code as the s_cmp_lg_u32 literal (GraphBuilder.cpp). The callee shaders move between boots, so the linked code, the SPIR-V and the pipeline differ every boot and the driver cache can never hit; large Unreal compute modules (1.2–2.6 M words) then rebuild cold on every launch.

This change:

  • LinkCalls writes a 0 placeholder for each callee-address literal and records its provenance in GuestContext::linkedTableLiterals (table-entry offset + descriptor source: user-data descriptor, user-data/constant pointer, nested descriptor).
  • The translator lowers each placeholder to a run-time read of that table entry (CompareInstructions.cpp), and callees are ordered by table entry rather than by address.
  • A changed table is still caught, because the table words are already a link dependency.

The linked module, SPIR-V and pipeline are then identical across boots, so the cross-process driver cache hits (measured elsewhere: 105 s cold → 217 ms warm once the module is identical).

Scope / honesty: this is the determinism half only. It is necessary but not sufficient to close #24525: even with a boot-stable module, the first encounter still compiles the 1.2–2.6 M-word module cold (105–1632 s), past Unreal's 120 s render-thread watchdog. Keeping the title under the watchdog on a cold cache (startup journal-replay warm path) is a separate follow-up. Not yet verified in game.

Serializer version: adds format version 64, written only when linkedTableLiterals is non-empty. This overlaps with #15343, which also uses version 64 — whichever lands second should take version 65. Flagged so they do not collide.

Tested

Linux, AMD Vega 56 (RADV VEGA10, GCN5), Mesa 26.2.6. 12 related tests pass; the compute table-call GPU tests ran with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, the loader confirmed inserting the validation layer, and none logged a VUID- error:

  • request_serializer, scalar_call (determinism: LinkCalls of two different callee-address sets produces byte-identical code, tableLiterals and fallbacks)
  • agc_driver_compute_table_calls, agc_driver_compute_nested_table_call, agc_driver_compute_fs_table_calls (GPU, 0 validation errors)
  • agc_shader_replay_requests, agc_driver_split_table_call_run, agc_split_table_call, agc_split_table_call_full, agc_split_table_call_none, agc_driver_scalar_swappc, agc_driver_scalar_swappc_fetch

Not verified in game (see scope note). The two-boot module hash on a real RADV module is covered at unit level by scalar_call; an end-to-end in-game two-boot hash still wants the title.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none (coordinates with #15343 on the serializer version — see note)
  • Fixes: none
  • Unblocks: PPSA07783 #24525
  • GPUs tested: AMD Vega 56 (RADV VEGA10, GCN5), Mesa 26.2.6, Linux
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5426783519 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24906). Originally posted by [tablefrogpillow](https://github.com/tablefrogpillow) on 2026-11-21T10:16:34Z. --- ### What Boot-stable table-call linking, so the driver shader cache can hit across boots. Authored by @Dark3581 (two commits, root-cause analysis in #24525); I rebased onto current `main`, reconciled the serializer, and verified it on AMD hardware. Today `LinkCalls` bakes the absolute callee address into the linked code as the `s_cmp_lg_u32` literal (`GraphBuilder.cpp`). The callee shaders move between boots, so the linked code, the SPIR-V and the pipeline differ every boot and the driver cache can never hit; large Unreal compute modules (1.2–2.6 M words) then rebuild cold on every launch. This change: - `LinkCalls` writes a `0` placeholder for each callee-address literal and records its provenance in `GuestContext::linkedTableLiterals` (table-entry offset + descriptor source: user-data descriptor, user-data/constant pointer, nested descriptor). - The translator lowers each placeholder to a run-time read of that table entry (`CompareInstructions.cpp`), and callees are ordered by table entry rather than by address. - A changed table is still caught, because the table words are already a link dependency. The linked module, SPIR-V and pipeline are then identical across boots, so the cross-process driver cache hits (measured elsewhere: 105 s cold → 217 ms warm once the module is identical). **Scope / honesty:** this is the determinism half only. It is necessary but **not sufficient** to close #24525: even with a boot-stable module, the first encounter still compiles the 1.2–2.6 M-word module cold (105–1632 s), past Unreal's 120 s render-thread watchdog. Keeping the title under the watchdog on a cold cache (startup journal-replay warm path) is a separate follow-up. Not yet verified in game. **Serializer version:** adds format version 64, written only when `linkedTableLiterals` is non-empty. This overlaps with #15343, which also uses version 64 — whichever lands second should take version 65. Flagged so they do not collide. ### Tested Linux, AMD Vega 56 (RADV VEGA10, GCN5), Mesa 26.2.6. 12 related tests pass; the compute table-call GPU tests ran with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, the loader confirmed inserting the validation layer, and none logged a `VUID-` error: - `request_serializer`, `scalar_call` (determinism: `LinkCalls` of two different callee-address sets produces byte-identical code, `tableLiterals` and `fallbacks`) - `agc_driver_compute_table_calls`, `agc_driver_compute_nested_table_call`, `agc_driver_compute_fs_table_calls` (GPU, 0 validation errors) - `agc_shader_replay_requests`, `agc_driver_split_table_call_run`, `agc_split_table_call`, `agc_split_table_call_full`, `agc_split_table_call_none`, `agc_driver_scalar_swappc`, `agc_driver_scalar_swappc_fetch` Not verified in game (see scope note). The two-boot module hash on a real RADV module is covered at unit level by `scalar_call`; an end-to-end in-game two-boot hash still wants the title. ### 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 and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical debt file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none (coordinates with #15343 on the serializer version — see note) - [x] Fixes: none - [x] Unblocks: PPSA07783 #24525 - [x] GPUs tested: AMD Vega 56 (RADV VEGA10, GCN5), Mesa 26.2.6, Linux - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-21 10:34:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T10:34:00Z.

Review: COMMENTED


Reviewed — no blocking findings

The review is incomplete, so a formal approval is not justified; no blocking defect was verified in the portions read.

What I ran

  • Inspected the prepared bundle for head c4249c5d25b006dcdbd15070cbe4dd69b827c1ae and read relevant source ranges through repo_read.py.
  • No tests or build commands were run.

Results

Check Result Note
Change and targeted source review not run Partial review only
Tests and build not run No commands run

Findings

Blocking

None verified in the portions read.

Non-blocking

  • The description notes that serializer version 64 is also used by #15343. Coordinate the version assignment before merging both changes; this review did not verify that PR's state.

Not verified

  • Did not read every changed file or the complete contents of the changed files. Files read in targeted ranges: core/shader/recompiler/ControlFlow/src/GraphBuilder.cpp, core/shader/recompiler/ControlFlow/include/ControlFlow/GraphBuilder.hpp, core/shader/recompiler/Translation/src/CompareInstructions.cpp, core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp, core/shader/recompiler/Recompiler.cpp, and core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp.
  • The other changed files listed in manifest.json were not read: core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hpp, core/libs/tests/ScalarCall.cpp, core/shader/recompiler/CacheKey.hpp, core/shader/recompiler/ControlFlow/include/ControlFlow/RequestSerializer.hpp, core/shader/recompiler/Recompiler.hpp, core/shader/recompiler/Translation/include/Translation/InstructionTranslator.hpp, core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp, core/shader/recompiler/Translation/src/InstructionTranslator.cpp, and core/shader/recompiler/tests/RequestSerializerTests.cpp.
  • Test claims in the PR description and in-game behavior were not independently verified.

To get this to a good state

Nothing is required. Optional: finish reviewing the unread changed files and confirm serializer version coordination with #15343 before merge.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6004673615 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24906#pullrequestreview-6004673615). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T10:34:00Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The review is incomplete, so a formal approval is not justified; no blocking defect was verified in the portions read. ## What I ran - Inspected the prepared bundle for head `c4249c5d25b006dcdbd15070cbe4dd69b827c1ae` and read relevant source ranges through `repo_read.py`. - No tests or build commands were run. ## Results | Check | Result | Note | |---|---|---| | Change and targeted source review | not run | Partial review only | | Tests and build | not run | No commands run | ## Findings ### Blocking None verified in the portions read. ### Non-blocking - The description notes that serializer version 64 is also used by #15343. Coordinate the version assignment before merging both changes; this review did not verify that PR's state. ## Not verified - Did not read every changed file or the complete contents of the changed files. Files read in targeted ranges: `core/shader/recompiler/ControlFlow/src/GraphBuilder.cpp`, `core/shader/recompiler/ControlFlow/include/ControlFlow/GraphBuilder.hpp`, `core/shader/recompiler/Translation/src/CompareInstructions.cpp`, `core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp`, `core/shader/recompiler/Recompiler.cpp`, and `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp`. - The other changed files listed in `manifest.json` were not read: `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hpp`, `core/libs/tests/ScalarCall.cpp`, `core/shader/recompiler/CacheKey.hpp`, `core/shader/recompiler/ControlFlow/include/ControlFlow/RequestSerializer.hpp`, `core/shader/recompiler/Recompiler.hpp`, `core/shader/recompiler/Translation/include/Translation/InstructionTranslator.hpp`, `core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp`, `core/shader/recompiler/Translation/src/InstructionTranslator.cpp`, and `core/shader/recompiler/tests/RequestSerializerTests.cpp`. - Test claims in the PR description and in-game behavior were not independently verified. ## To get this to a good state Nothing is required. Optional: finish reviewing the unread changed files and confirm serializer version coordination with #15343 before merge.
MarcZX10 commented 2026-11-21 11:36:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T11:36:38Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change based on the source reviewed; the excluded test file and unrun checks leave the review incomplete, so this is a comment rather than an approval.

What I ran

  • Reviewed head 82160181325fee239c61472330c0e1dd2d39d640 using repo_read.py.
  • No build or test commands were run. No merged-preview check was run.

Results

Check Result Note
Source review passed Core linking and translation paths inspected
Tests not run Author-reported tests were not independently run
Full changed-file coverage not run ShaderMemory.cpp was excluded from the review bundle

Findings

Blocking

None identified in the code read.

Non-blocking

None.

Not verified

  • core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp was excluded because it was too large for the review folder; its changed line was not read.
  • No build, tests, physical console behavior, or in-game two-boot cache behavior were independently verified.
  • Read changed lines and targeted context in ShaderRegistry.hpp, ShaderRegistry.cpp, ScalarCall.cpp, CacheKey.hpp, GraphBuilder.hpp, RequestSerializer.hpp, GraphBuilder.cpp, RequestSerializer.cpp, Recompiler.cpp, Recompiler.hpp, InstructionTranslator.hpp, TranslationContext.hpp, CompareInstructions.cpp, InstructionTranslator.cpp, and RequestSerializerTests.cpp. Also read the review description, commits, manifest, diff, and README. ShaderMemory.cpp was the only changed file excluded by the bundle.

To get this to a good state

Nothing is required. Optional follow-up: independently run the stated checks and inspect the excluded ShaderMemory.cpp change before making a formal approval decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6004961716 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24906#pullrequestreview-6004961716). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T11:36:38Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change based on the source reviewed; the excluded test file and unrun checks leave the review incomplete, so this is a comment rather than an approval. ## What I ran - Reviewed head `82160181325fee239c61472330c0e1dd2d39d640` using `repo_read.py`. - No build or test commands were run. No merged-preview check was run. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Core linking and translation paths inspected | | Tests | not run | Author-reported tests were not independently run | | Full changed-file coverage | not run | `ShaderMemory.cpp` was excluded from the review bundle | ## Findings ### Blocking None identified in the code read. ### Non-blocking None. ## Not verified - `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` was excluded because it was too large for the review folder; its changed line was not read. - No build, tests, physical console behavior, or in-game two-boot cache behavior were independently verified. - Read changed lines and targeted context in `ShaderRegistry.hpp`, `ShaderRegistry.cpp`, `ScalarCall.cpp`, `CacheKey.hpp`, `GraphBuilder.hpp`, `RequestSerializer.hpp`, `GraphBuilder.cpp`, `RequestSerializer.cpp`, `Recompiler.cpp`, `Recompiler.hpp`, `InstructionTranslator.hpp`, `TranslationContext.hpp`, `CompareInstructions.cpp`, `InstructionTranslator.cpp`, and `RequestSerializerTests.cpp`. Also read the review description, commits, manifest, diff, and README. `ShaderMemory.cpp` was the only changed file excluded by the bundle. ## To get this to a good state Nothing is required. Optional follow-up: independently run the stated checks and inspect the excluded `ShaderMemory.cpp` change before making a formal approval decision.
Superseabas commented 2026-11-22 12:58:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Superseabas on 2026-11-22T12:58:50Z.

Review: APPROVED


Windows check of head 8216018132 with GCC 16 on an NVIDIA and an AMD GPU, merged onto main e493612311 (clean merge).

Setup: Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (x86_64-ucrt-posix-seh, r3), Release full build, run from PowerShell; GPU tests with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. GPUs, each picked with ANYPS5_GPU: NVIDIA GeForce RTX 5070 Ti (621.01) and the Ryzen 7 7700X's integrated AMD Radeon (1002:164e, Adrenalin 26.10.2). This was built together with #19100, which touches other files.

  • request_serializer and scalar_call: 2 of 2 on main and with this PR, in 3 of 3 runs.
  • The description's GPU set plus agc_shader_memory and agc_shader_memory_coherent_atomic_loads, whose fixture this PR bumps (agc_driver_compute_table_calls, _nested_table_call, _fs_table_calls, agc_driver_split_table_call_run, agc_split_table_call, _full, _none, agc_driver_scalar_swappc, _fetch, agc_shader_replay_requests): every one passes on both GPUs, on main and with this PR, in 3 of 3 runs. No VUID- lines.
  • Red check: with LinkCalls baking the callee address again (const bool fromTable = false;), scalar_call fails, so its two-boot determinism check does catch an address-dependent link.

I read the ShaderMemory.cpp change the earlier review couldn't open: it's the one-line move of the unsupported-version example past 64 (8216018132).

The version-64 overlap with #23818 that Haembina raised still stands. Both are open, and each merges cleanly on its own, so whichever lands second needs 65.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6012384405 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24906#pullrequestreview-6012384405). Originally posted by [Superseabas](https://github.com/Superseabas) on 2026-11-22T12:58:50Z. **Review:** APPROVED --- Windows check of head `8216018132` with GCC 16 on an NVIDIA and an AMD GPU, merged onto `main` `e493612311` (clean merge). **Setup:** Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (`x86_64-ucrt-posix-seh`, r3), Release full build, run from PowerShell; GPU tests with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`. GPUs, each picked with `ANYPS5_GPU`: NVIDIA GeForce RTX 5070 Ti (621.01) and the Ryzen 7 7700X's integrated AMD Radeon (`1002:164e`, Adrenalin 26.10.2). This was built together with #19100, which touches other files. - `request_serializer` and `scalar_call`: 2 of 2 on `main` and with this PR, in 3 of 3 runs. - The description's GPU set plus `agc_shader_memory` and `agc_shader_memory_coherent_atomic_loads`, whose fixture this PR bumps (`agc_driver_compute_table_calls`, `_nested_table_call`, `_fs_table_calls`, `agc_driver_split_table_call_run`, `agc_split_table_call`, `_full`, `_none`, `agc_driver_scalar_swappc`, `_fetch`, `agc_shader_replay_requests`): every one passes on both GPUs, on `main` and with this PR, in 3 of 3 runs. No `VUID-` lines. - **Red check:** with `LinkCalls` baking the callee address again (`const bool fromTable = false;`), `scalar_call` fails, so its two-boot determinism check does catch an address-dependent link. I read the `ShaderMemory.cpp` change the earlier review couldn't open: it's the one-line move of the unsupported-version example past 64 (`8216018132`). The version-64 overlap with #23818 that Haembina raised still stands. Both are open, and each merges cleanly on its own, so whichever lands second needs 65. AI-assisted: yes (Claude Code)
malekaifa commented 2026-11-23 14:30:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-11-23T14:30:24Z.

Review: APPROVED


Reviewed exact head 82160181325fee239c61472330c0e1dd2d39d640 and all 16 changed-file patches.

The linked-table path now records the table entry provenance beside zero placeholders instead of baking absolute callee addresses into the linked code. Translation replaces only those annotated SOPC literal operands with runtime reads from the original descriptor/pointer/table entry; legacy/non-table callees keep their address literals. The provenance is owned, serialized, restored, and included in the recompile cache key, while split-table parts clear it. The scalar-call regression verifies that moving callees between boots leaves linked code and provenance identical, and a red control that bakes addresses again breaks that determinism check.

The exact head has terminal green hosted checks and independent Windows/Linux GPU coverage on NVIDIA and AMD with no validation errors. Superseabas also exercised the current head with a red fromTable=false control and approved it.

One integration constraint is intentionally still conditional: #23818 is also open and independently uses request format 64. Whichever PR lands second must rebase and assign its new layout version 65 (with fixtures updated); neither branch should pre-emptively bump while both are open.

No blocking finding on this exact head.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6023421318 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24906#pullrequestreview-6023421318). Originally posted by [malekaifa](https://github.com/malekaifa) on 2026-11-23T14:30:24Z. **Review:** APPROVED --- Reviewed exact head `82160181325fee239c61472330c0e1dd2d39d640` and all 16 changed-file patches. The linked-table path now records the table entry provenance beside zero placeholders instead of baking absolute callee addresses into the linked code. Translation replaces only those annotated SOPC literal operands with runtime reads from the original descriptor/pointer/table entry; legacy/non-table callees keep their address literals. The provenance is owned, serialized, restored, and included in the recompile cache key, while split-table parts clear it. The scalar-call regression verifies that moving callees between boots leaves linked code and provenance identical, and a red control that bakes addresses again breaks that determinism check. The exact head has terminal green hosted checks and independent Windows/Linux GPU coverage on NVIDIA and AMD with no validation errors. Superseabas also exercised the current head with a red `fromTable=false` control and approved it. One integration constraint is intentionally still conditional: #23818 is also open and independently uses request format 64. Whichever PR lands second must rebase and assign its new layout version 65 (with fixtures updated); neither branch should pre-emptively bump while both are open. No blocking finding on this exact head. AI-assisted: yes
Superseabas commented 2026-11-25 12:35:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Superseabas on 2026-11-25T12:35:34Z.

Review: COMMENTED


The hold reproduces on Windows on both vendors. My approval of 8216018132 on 11-22 predates these tests, so it doesn't cover current main.

Setup: Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (x86_64-ucrt-posix-seh, r3), Release full build, run from PowerShell with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. GPUs: NVIDIA GeForce RTX 5070 Ti (621.01) and the Ryzen 7 7700X's integrated AMD Radeon (1002:164e, Adrenalin 26.10.2). main c3aae2e8fb, and this head merged onto it (clean merge, built together with #24781 and #21948, which touch other files).

  • agc_driver_split_table_call_driver, _cpu_rounds and _gpu_rounds, each run alone 3 times: 3 of 3 on main, and 0 of 3 with this PR, on both GPUs.
  • The rest of the earlier set (request_serializer, scalar_call, the table-call and split-table-call tests, agc_shader_memory*) passes: 11 of 14 with this PR in 2 of 2 runs, only those three failing.

The assertion: the "host imports at shutdown" line is only the end-of-run statistics. The failure before it is

split table call driver: invocation 0 holds 0x9e3779b9, expected 0x9e3779be

and _gpu_rounds then misses its a batch of N rounds ran ... line.

Where the tests come from: efe46a01df added them, merged with #25848 (GPU-selected split table call rounds) on 11-24. So they're new on main since this PR's last runs, not something this PR changed.

A guess, not traced: the invocation is missing exactly the callee's part of the result. This PR links a table callee through a run-time literal (tableLiterals, filled per request in ShaderRegistry.cpp). A continued split part run through the driver's rounds may not get those literals, so its s_cmp against the callee address never matches.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6057690621 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24906#pullrequestreview-6057690621). Originally posted by [Superseabas](https://github.com/Superseabas) on 2026-11-25T12:35:34Z. **Review:** COMMENTED --- The hold reproduces on Windows on both vendors. My approval of `8216018132` on 11-22 predates these tests, so it doesn't cover current `main`. **Setup:** Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (`x86_64-ucrt-posix-seh`, r3), Release full build, run from PowerShell with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`. GPUs: NVIDIA GeForce RTX 5070 Ti (621.01) and the Ryzen 7 7700X's integrated AMD Radeon (`1002:164e`, Adrenalin 26.10.2). `main` `c3aae2e8fb`, and this head merged onto it (clean merge, built together with #24781 and #21948, which touch other files). - `agc_driver_split_table_call_driver`, `_cpu_rounds` and `_gpu_rounds`, each run alone 3 times: 3 of 3 on `main`, and 0 of 3 with this PR, on both GPUs. - The rest of the earlier set (`request_serializer`, `scalar_call`, the table-call and split-table-call tests, `agc_shader_memory*`) passes: 11 of 14 with this PR in 2 of 2 runs, only those three failing. **The assertion:** the "host imports at shutdown" line is only the end-of-run statistics. The failure before it is ``` split table call driver: invocation 0 holds 0x9e3779b9, expected 0x9e3779be ``` and `_gpu_rounds` then misses its `a batch of N rounds ran ...` line. **Where the tests come from:** `efe46a01df` added them, merged with #25848 (GPU-selected split table call rounds) on 11-24. So they're new on `main` since this PR's last runs, not something this PR changed. **A guess, not traced:** the invocation is missing exactly the callee's part of the result. This PR links a table callee through a run-time literal (`tableLiterals`, filled per request in `ShaderRegistry.cpp`). A continued split part run through the driver's rounds may not get those literals, so its `s_cmp` against the callee address never matches. AI-assisted: yes (Claude Code)
malekaifa commented 2026-11-30 10:28:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-11-30T10:28:19Z.

Review: CHANGES_REQUESTED


Request changes on head 82160181325fee239c61472330c0e1dd2d39d640.

Current main already serializes splitState at version 64. This branch also assigns version 64 to linkedTableLiterals and does not carry main's splitState field/encoding, so it conflicts in RequestSerializer.hpp and RequestSerializer.cpp and cannot be merged without losing serialization compatibility.

For the agreed dependency order #24906 -> #23818, please rebase onto current main, preserve splitState at version 64, and move linkedTableLiterals to version 65. Then #23818 must be rebased on top and move verticesPerPrimitive to version 66. Update the compatibility fixtures and run the serializer round-trip/backward-compatibility tests on the stacked result before requesting re-review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6110477969 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24906#pullrequestreview-6110477969). Originally posted by [malekaifa](https://github.com/malekaifa) on 2026-11-30T10:28:19Z. **Review:** CHANGES_REQUESTED --- Request changes on head `82160181325fee239c61472330c0e1dd2d39d640`. Current main already serializes `splitState` at version 64. This branch also assigns version 64 to `linkedTableLiterals` and does not carry main's `splitState` field/encoding, so it conflicts in `RequestSerializer.hpp` and `RequestSerializer.cpp` and cannot be merged without losing serialization compatibility. For the agreed dependency order `#24906` -> `#23818`, please rebase onto current main, preserve `splitState` at version 64, and move `linkedTableLiterals` to version 65. Then #23818 must be rebased on top and move `verticesPerPrimitive` to version 66. Update the compatibility fixtures and run the serializer round-trip/backward-compatibility tests on the stacked result before requesting re-review.

Pull request closed

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!24906
No description provided.