fix(recompiler): defer the TYPE check of a guarded read-only static V# #6412

Open
fdfawef324 wants to merge 5 commits from upstream-pr/6412 into main
fdfawef324 commented 2026-10-15 14:15:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-15T14:15:59Z.


What

A guarded read-only static V# of nonzero TYPE currently rejects a whole compute dispatch during capture even when no lane runs its load. This change captures that descriptor with a status and faults only an active lane that executes the invalid load, using the existing InvalidDescriptor completion contract.

Eligibility remains limited to compute shaders without LDS/shared accesses or barriers, plain DWORD loads under changed EXEC, no continue-block load, and the BDA fault ABI. Stores, atomics, scalar/formatted/typed reads and entry-EXEC loads retain capture rejection. Valid descriptors keep existing completion and recipe paths; invalid captured descriptors force fault polling and prevent resource reuse/moved-buffer recipes. MarcZX10's fragment/Kena follow-up #7689 addresses #5879 separately and lists this PR as a dependency; it is not included here.

This rebase retains main's SharedValues/table memo, buffer extents, depth-remap plan and serializer fields. It moves the cache to format 41 (pinned main 40), serializes bufferExtent before bufferDescriptorStatus, and preserves all ten shader-key flag vectors including samplerCoordinatesIgnored before the added descriptor-status block. Active invalid-TYPE hardware behavior remains unmeasured and documented as debt.

Nearby #6177 has a source-supported future-composition risk: its robust-direct fast path can evaluate a faulting descriptor outside the active-lane guard. This is not a reproduced defect in #6177 alone. Combining the branches must retain that guard or exclude deferred descriptors from the fast path and rerun skipped/taken fixtures in robust mode. Proposed order is this PR first; coordination is pending, so this update is a draft. No combined build or landing-order agreement is claimed. Other shared cache/reuse changes must retain the descriptor status in identity and the deferred-fault nonreuse guards.

Tested

Exact candidate c050c17557af9c9dd4275b97c8adcb9586a66c5c on pinned main 676d423968a1a8fcc79c6247020ce22090a8e0d4, Windows Server 2025 10.0.26100, MinGW-w64 GCC Release -O3.

Nine CPU/mock CTest registrations passed in 14.83 seconds: agc_shader_memory, agc_shader_bindless, agc_shader_deferred_static_planning_reads, agc_shader_disk_cache, agc_shader_control_flow (ordinary, iteration-selection-off and forced-fallback), agc_driver_key_miss, and agc_driver_graphics including BdaResources mocks. No case skipped. All twelve requested targets complete in Release -O3; the final incremental continuation passed in 93.29 seconds after a preserved 900-second capped partial chunk. The integrated disk-cache test also passed separately before the full build, confirming source version 9a919d1fcfb2ebe4, format 41 and all 17 plan round trips. CPU checks and the continuation used the independently reviewed and runtime-probed four-core CPU partition with the same 4 GiB job cap; this is not a title speed measurement.

The actual-header Windows layout probe reports ShaderInfo 24 fields, BufferResource 13, ImageResource 39, DescriptorBinding 680 bytes, ShaderInvocation 208 bytes and RecompileResult 480 bytes. It is separate from the integrated codec and runtime checks, and is not a Linux execution result. Conventions and diff checks pass against the pinned base.

Independent adversarial source review passed at this exact head after checking all24 source pins and the complete rebase range diff. The prior published head 9585842db passed nine CPU/mock and eight managed-slot Vulkan registrations; those are historical after this rebase. Original selective CPU red controls are also historical and were not rerun on this head. Synthetic project fixtures are retained; no game shader payload is attached.

Demon's Souls (PPSA01342 #1283) motivated the static-descriptor investigation. The previous public body at 6b9410b92bbd9d74bf3f32ebbbd2b91a0be08f18 records a historical offline comparison on main b3f9f89e62979d7328ff0dec2d14b006f8c2c0ab: main refused capture, while an earlier PR stack materialized successfully in three runs. That report does not record the full integration-stack head, and used a replay-tool option from #5959 that is not part of this PR. It is historical preparation/materialization evidence, not current-head or GPU verification. No request or shader payload is attached.

Current-head managed-slot Vulkan checks passed all eight registrations / seven unique executables in 20.65 seconds without skips: guarded_null_pointer, bda_device, bda_span_reads, buffer_descriptor_runtime, gated_dispatch_capture (ordinary and short-timeout), loop_ending_exits and subvector_loop. ANYPS5_REQUIRE_VULKAN=1 was set; exact runtime hashes were verified before and after. The guarded fixture exercised skipped/taken unsupported static-TYPE reads and the expected InvalidDescriptor reason8 completion faults. A clean merge into later main 72a3d9f2a49d was checked separately; that merged tree was not executed. No current title milestone or performance improvement is claimed.

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 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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 3060 12 GB, driver 591.86 (32.0.15.9186), Vulkan 1.4.325, Windows Server 2025 10.0.26100 (current exact c050c1755 Vulkan8 verification; historical results qualified above)
  • AI-assisted: yes (Claude Code, Codex)

🤖 Generated with Claude Code

Co-Authored-By: Codex [email protected]

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4874706756 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6412). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-15T14:15:59Z. --- ### What A guarded read-only static V# of nonzero TYPE currently rejects a whole compute dispatch during capture even when no lane runs its load. This change captures that descriptor with a status and faults only an active lane that executes the invalid load, using the existing InvalidDescriptor completion contract. Eligibility remains limited to compute shaders without LDS/shared accesses or barriers, plain DWORD loads under changed EXEC, no continue-block load, and the BDA fault ABI. Stores, atomics, scalar/formatted/typed reads and entry-EXEC loads retain capture rejection. Valid descriptors keep existing completion and recipe paths; invalid captured descriptors force fault polling and prevent resource reuse/moved-buffer recipes. MarcZX10's fragment/Kena follow-up #7689 addresses #5879 separately and lists this PR as a dependency; it is not included here. This rebase retains main's SharedValues/table memo, buffer extents, depth-remap plan and serializer fields. It moves the cache to format 41 (pinned main 40), serializes bufferExtent before bufferDescriptorStatus, and preserves all ten shader-key flag vectors including samplerCoordinatesIgnored before the added descriptor-status block. Active invalid-TYPE hardware behavior remains unmeasured and documented as debt. Nearby #6177 has a source-supported future-composition risk: its robust-direct fast path can evaluate a faulting descriptor outside the active-lane guard. This is not a reproduced defect in #6177 alone. Combining the branches must retain that guard or exclude deferred descriptors from the fast path and rerun skipped/taken fixtures in robust mode. Proposed order is this PR first; [coordination is pending](https://github.com/boykopovar/AnyPS5/pull/6177#issuecomment-6256405387), so this update is a draft. No combined build or landing-order agreement is claimed. Other shared cache/reuse changes must retain the descriptor status in identity and the deferred-fault nonreuse guards. ### Tested Exact candidate `c050c17557af9c9dd4275b97c8adcb9586a66c5c` on pinned main `676d423968a1a8fcc79c6247020ce22090a8e0d4`, Windows Server 2025 10.0.26100, MinGW-w64 GCC Release `-O3`. Nine CPU/mock CTest registrations passed in 14.83 seconds: `agc_shader_memory`, `agc_shader_bindless`, `agc_shader_deferred_static_planning_reads`, `agc_shader_disk_cache`, `agc_shader_control_flow` (ordinary, iteration-selection-off and forced-fallback), `agc_driver_key_miss`, and `agc_driver_graphics` including BdaResources mocks. No case skipped. All twelve requested targets complete in Release `-O3`; the final incremental continuation passed in 93.29 seconds after a preserved 900-second capped partial chunk. The integrated disk-cache test also passed separately before the full build, confirming source version `9a919d1fcfb2ebe4`, format 41 and all 17 plan round trips. CPU checks and the continuation used the independently reviewed and runtime-probed four-core CPU partition with the same 4 GiB job cap; this is not a title speed measurement. The actual-header Windows layout probe reports ShaderInfo 24 fields, BufferResource 13, ImageResource 39, DescriptorBinding 680 bytes, ShaderInvocation 208 bytes and RecompileResult 480 bytes. It is separate from the integrated codec and runtime checks, and is not a Linux execution result. Conventions and diff checks pass against the pinned base. Independent adversarial source review passed at this exact head after checking all24 source pins and the complete rebase range diff. The prior published head `9585842db` passed nine CPU/mock and eight managed-slot Vulkan registrations; those are historical after this rebase. Original selective CPU red controls are also historical and were not rerun on this head. Synthetic project fixtures are retained; no game shader payload is attached. Demon's Souls (PPSA01342 #1283) motivated the static-descriptor investigation. The previous public body at `6b9410b92bbd9d74bf3f32ebbbd2b91a0be08f18` records a historical offline comparison on main `b3f9f89e62979d7328ff0dec2d14b006f8c2c0ab`: main refused capture, while an earlier PR stack materialized successfully in three runs. That report does not record the full integration-stack head, and used a replay-tool option from #5959 that is not part of this PR. It is historical preparation/materialization evidence, not current-head or GPU verification. No request or shader payload is attached. Current-head managed-slot Vulkan checks passed all eight registrations / seven unique executables in 20.65 seconds without skips: guarded_null_pointer, bda_device, bda_span_reads, buffer_descriptor_runtime, gated_dispatch_capture (ordinary and short-timeout), loop_ending_exits and subvector_loop. ANYPS5_REQUIRE_VULKAN=1 was set; exact runtime hashes were verified before and after. The guarded fixture exercised skipped/taken unsupported static-TYPE reads and the expected InvalidDescriptor reason8 completion faults. A clean merge into later main `72a3d9f2a49d` was checked separately; that merged tree was not executed. No current title milestone or performance improvement is claimed. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/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: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> NVIDIA GeForce RTX 3060 12 GB, driver 591.86 (32.0.15.9186), Vulkan 1.4.325, Windows Server 2025 10.0.26100 (current exact c050c1755 Vulkan8 verification; historical results qualified above) - [x] AI-assisted: <!-- yes / no --> yes (Claude Code, Codex) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Codex <[email protected]>
fdfawef324 commented 2026-10-16 19:53:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-16T19:53:46Z.


We rebased this PR onto main c84249186. The old head was 6e89aba9e; the new head is 6b9410b92, the three original commits plus one new one on top.

  • Rebase: the conflicts were the shader disk cache size assertions in ShaderDiskCache.cpp and one docs/dev/ARCHITECTURE.md line. Nothing else changed in the three commits; the cache format stays at 37 (main is still at 36).
  • New commit fix(agc): label the buffer descriptor status word in shader key diffs: this PR adds a word per binding to the content key (the buffer descriptor status count and entries), and LabelShaderKey did not know about it, so a key diff (APS5_TRACE_RESOURCE_KEY_MISSES) read every later binding from the wrong offset. The parser now labels the word and tests/KeyMiss.cpp builds its keys like the real layout. agc_driver_key_miss failed without the parser change (equal keys were not comparable) and passes with it. Diagnostics only; nothing in the shader or the cache changed.

Tests, CPU: agc_shader_memory, agc_shader_deferred_static_planning_reads, agc_shader_disk_cache, agc_shader_control_flow (3 variants) and agc_driver_key_miss pass, and tools/check_conventions.py --base upstream/main passes. With the capture deferral, the planning-only skip or the disk-cache fields reverted, the matching tests fail again.

GPU, on the RTX 3060 (driver 591.86, Windows Server 2025), run on the build of 677b9af40 (before the label commit, which touches no GPU path): agc_driver_guarded_null_pointer, agc_driver_graphics, agc_driver_bda_device, agc_driver_bda_span_reads (4 of 4) and agc_driver_buffer_descriptor_runtime, agc_driver_gated_dispatch_capture, agc_driver_gated_dispatch_capture_short_timeout, agc_driver_loop_ending_exits, agc_driver_subvector_loop (5 of 5) pass.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6223518276 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6412#issuecomment-6223518276). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-16T19:53:46Z. --- We rebased this PR onto `main` c84249186. The old head was 6e89aba9e; the new head is 6b9410b92, the three original commits plus one new one on top. - Rebase: the conflicts were the shader disk cache size assertions in `ShaderDiskCache.cpp` and one `docs/dev/ARCHITECTURE.md` line. Nothing else changed in the three commits; the cache format stays at 37 (`main` is still at 36). - New commit `fix(agc): label the buffer descriptor status word in shader key diffs`: this PR adds a word per binding to the content key (the buffer descriptor status count and entries), and `LabelShaderKey` did not know about it, so a key diff (`APS5_TRACE_RESOURCE_KEY_MISSES`) read every later binding from the wrong offset. The parser now labels the word and `tests/KeyMiss.cpp` builds its keys like the real layout. `agc_driver_key_miss` failed without the parser change (`equal keys were not comparable`) and passes with it. Diagnostics only; nothing in the shader or the cache changed. Tests, CPU: `agc_shader_memory`, `agc_shader_deferred_static_planning_reads`, `agc_shader_disk_cache`, `agc_shader_control_flow` (3 variants) and `agc_driver_key_miss` pass, and `tools/check_conventions.py --base upstream/main` passes. With the capture deferral, the planning-only skip or the disk-cache fields reverted, the matching tests fail again. GPU, on the RTX 3060 (driver 591.86, Windows Server 2025), run on the build of 677b9af40 (before the label commit, which touches no GPU path): `agc_driver_guarded_null_pointer`, `agc_driver_graphics`, `agc_driver_bda_device`, `agc_driver_bda_span_reads` (4 of 4) and `agc_driver_buffer_descriptor_runtime`, `agc_driver_gated_dispatch_capture`, `agc_driver_gated_dispatch_capture_short_timeout`, `agc_driver_loop_ending_exits`, `agc_driver_subvector_loop` (5 of 5) pass. AI-assisted: yes
MarcZX10 commented 2026-10-17 02:34:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T02:34:13Z.


Coordination question from #5879: the Kena capture is a fragment-stage case with stale, unwritten user-data registers; #6412 is explicitly compute-only and its current eligibility excludes pixel programs. I found no other open PR that defers this path. If #6412 lands, would you prefer a separate follow-up to extend the planner/materializer/fault handling to fragment shaders, or are you already considering that scope? I will avoid opening overlapping work until the boundary is clear. The fragment case would need its own regression for an inactive guarded read and an active read that faults, and must preserve the current failure behavior for stores/atomics and unsupported formats.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6228563054 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6412#issuecomment-6228563054). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T02:34:13Z. --- Coordination question from #5879: the Kena capture is a fragment-stage case with stale, unwritten user-data registers; #6412 is explicitly compute-only and its current eligibility excludes pixel programs. I found no other open PR that defers this path. If #6412 lands, would you prefer a separate follow-up to extend the planner/materializer/fault handling to fragment shaders, or are you already considering that scope? I will avoid opening overlapping work until the boundary is clear. The fragment case would need its own regression for an inactive guarded read and an active read that faults, and must preserve the current failure behavior for stores/atomics and unsupported formats.
fdfawef324 commented 2026-10-18 23:00:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-18T23:00:57Z.


Please keep the fragment-stage/Kena case from #5879 as a separate follow-up. #6412 remains compute-only: changed-EXEC plain buffer loads, no LDS/barrier, and the existing BDA fault and dispatch-reuse restrictions. I am keeping that eligibility boundary while rebasing this PR.

You can proceed with the fragment work independently. It needs its own active/inactive-lane and completion-fault coverage; the compute tests here do not establish fragment behavior.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256247577 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6412#issuecomment-6256247577). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-18T23:00:57Z. --- Please keep the fragment-stage/Kena case from #5879 as a separate follow-up. #6412 remains compute-only: changed-EXEC plain buffer loads, no LDS/barrier, and the existing BDA fault and dispatch-reuse restrictions. I am keeping that eligibility boundary while rebasing this PR. You can proceed with the fragment work independently. It needs its own active/inactive-lane and completion-fault coverage; the compute tests here do not establish fragment behavior. AI-assisted: yes
fdfawef324 commented 2026-10-18 23:31:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-18T23:31:49Z.


Rebased the compute-only change onto fc623324a; exact head 9585842db6b7d62a387fe7d696652fef69050513. The serializer retains current main fields, uses cache format 39, and the shader-key diagnostic preserves all ten existing flag vectors before descriptor status. Eligibility, EXEC guarding, fault completion, planning-only reads and nonreuse/recipe exclusions remain unchanged.

Fresh results: all twelve Release targets built, nine CPU/mock CTests passed in 19.35 seconds, and eight real Vulkan registrations passed in 24.39 seconds with Vulkan required and no skips. The latter includes skipped/taken invalid static-TYPE loads and expected fault completion. Root hash-checked the exact executables and runtime dependencies before and after. Conventions pass and the merge into main 84c1a4d9a is clean. Tests ran on the pinned candidate, not the merge tree. Older red controls and offline preparation evidence remain historical; there is no new title or performance measurement.

@MarcZX10, fragment-stage/Kena #5879 remains a separate follow-up as discussed. The PR is a draft while the #6177 shared-area landing order is coordinated; that future fast-path composition must preserve active-lane evaluation of the faulting descriptor. No combined runtime result is claimed.

AI-assisted: yes.

Co-Authored-By: Codex [email protected]

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256532661 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6412#issuecomment-6256532661). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-18T23:31:49Z. --- Rebased the compute-only change onto `fc623324a`; exact head `9585842db6b7d62a387fe7d696652fef69050513`. The serializer retains current main fields, uses cache format 39, and the shader-key diagnostic preserves all ten existing flag vectors before descriptor status. Eligibility, EXEC guarding, fault completion, planning-only reads and nonreuse/recipe exclusions remain unchanged. Fresh results: all twelve Release targets built, nine CPU/mock CTests passed in 19.35 seconds, and eight real Vulkan registrations passed in 24.39 seconds with Vulkan required and no skips. The latter includes skipped/taken invalid static-TYPE loads and expected fault completion. Root hash-checked the exact executables and runtime dependencies before and after. Conventions pass and the merge into main `84c1a4d9a` is clean. Tests ran on the pinned candidate, not the merge tree. Older red controls and offline preparation evidence remain historical; there is no new title or performance measurement. @MarcZX10, fragment-stage/Kena #5879 remains a separate follow-up as discussed. The PR is a draft while the #6177 shared-area landing order is coordinated; that future fast-path composition must preserve active-lane evaluation of the faulting descriptor. No combined runtime result is claimed. AI-assisted: yes. Co-Authored-By: Codex <[email protected]>
MarcZX10 commented 2026-10-18 23:44:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T23:44:51Z.


I opened #7689 as the separate fragment-stage follow-up for #5879, as you suggested. It adds fragment active/inactive EXEC coverage. I listed #6412 as a dependency because the descriptor-fault API and completion path share implementation points; after #6412 merges, I will rebase the fragment change and preserve the cache format version.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256650612 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6412#issuecomment-6256650612). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T23:44:51Z. --- I opened #7689 as the separate fragment-stage follow-up for #5879, as you suggested. It adds fragment active/inactive EXEC coverage. I listed #6412 as a dependency because the descriptor-fault API and completion path share implementation points; after #6412 merges, I will rebase the fragment change and preserve the cache format version.
fdfawef324 commented 2026-10-19 05:23:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-19T05:23:08Z.


Rebased the five-commit stack onto pinned main 676d423968a1a8fcc79c6247020ce22090a8e0d4 as c050c17557af9c9dd4275b97c8adcb9586a66c5c. The conflict resolution retains current buffer extents, SharedValues/table memo and depth-remap fields, adds the deferred status after bufferExtent, keeps all ten shader-key flag vectors, and advances the disk cache to format 41. Compute eligibility, InvalidDescriptor completion, nonreuse/recipe exclusions and planning-only behavior remain unchanged.

Nine CPU/mock CTest registrations passed in 14.83 seconds: agc_shader_memory, agc_shader_bindless, agc_shader_deferred_static_planning_reads, agc_shader_disk_cache, agc_shader_control_flow (ordinary, iteration-selection-off and forced-fallback), agc_driver_key_miss, and agc_driver_graphics including BdaResources mocks. No case skipped. All twelve requested targets complete in Release -O3; the final incremental continuation passed in 93.29 seconds after a preserved 900-second capped partial chunk. The integrated disk-cache test also passed separately before the full build, confirming source version 9a919d1fcfb2ebe4, format 41 and all 17 plan round trips. CPU checks and the continuation used the independently reviewed and runtime-probed four-core CPU partition with the same 4 GiB job cap; this is not a title speed measurement.

Current-head managed-slot Vulkan checks passed all eight registrations / seven unique executables in 20.65 seconds without skips: guarded_null_pointer, bda_device, bda_span_reads, buffer_descriptor_runtime, gated_dispatch_capture (ordinary and short-timeout), loop_ending_exits and subvector_loop. ANYPS5_REQUIRE_VULKAN=1 was set; exact runtime hashes were verified before and after. The guarded fixture exercised skipped/taken unsupported static-TYPE reads and the expected InvalidDescriptor reason8 completion faults. A clean merge into later main 72a3d9f2a49d was checked separately; that merged tree was not executed. No current title milestone or performance improvement is claimed.

@MarcZX10, thanks for keeping the fragment follow-up in #7689 separate and recording the dependency. This update remains a draft while the future composition with #6177 is coordinated: its robust-direct path must preserve the active-lane guard or exclude deferred descriptors, with skipped/taken robust-mode fixtures when the branches combine. No combined build or landing-order agreement is claimed.

Co-Authored-By: Codex [email protected]

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6260302457 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6412#issuecomment-6260302457). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-19T05:23:08Z. --- Rebased the five-commit stack onto pinned main `676d423968a1a8fcc79c6247020ce22090a8e0d4` as `c050c17557af9c9dd4275b97c8adcb9586a66c5c`. The conflict resolution retains current buffer extents, SharedValues/table memo and depth-remap fields, adds the deferred status after bufferExtent, keeps all ten shader-key flag vectors, and advances the disk cache to format 41. Compute eligibility, InvalidDescriptor completion, nonreuse/recipe exclusions and planning-only behavior remain unchanged. Nine CPU/mock CTest registrations passed in 14.83 seconds: `agc_shader_memory`, `agc_shader_bindless`, `agc_shader_deferred_static_planning_reads`, `agc_shader_disk_cache`, `agc_shader_control_flow` (ordinary, iteration-selection-off and forced-fallback), `agc_driver_key_miss`, and `agc_driver_graphics` including BdaResources mocks. No case skipped. All twelve requested targets complete in Release `-O3`; the final incremental continuation passed in 93.29 seconds after a preserved 900-second capped partial chunk. The integrated disk-cache test also passed separately before the full build, confirming source version `9a919d1fcfb2ebe4`, format 41 and all 17 plan round trips. CPU checks and the continuation used the independently reviewed and runtime-probed four-core CPU partition with the same 4 GiB job cap; this is not a title speed measurement. Current-head managed-slot Vulkan checks passed all eight registrations / seven unique executables in 20.65 seconds without skips: guarded_null_pointer, bda_device, bda_span_reads, buffer_descriptor_runtime, gated_dispatch_capture (ordinary and short-timeout), loop_ending_exits and subvector_loop. ANYPS5_REQUIRE_VULKAN=1 was set; exact runtime hashes were verified before and after. The guarded fixture exercised skipped/taken unsupported static-TYPE reads and the expected InvalidDescriptor reason8 completion faults. A clean merge into later main `72a3d9f2a49d` was checked separately; that merged tree was not executed. No current title milestone or performance improvement is claimed. @MarcZX10, thanks for keeping the fragment follow-up in #7689 separate and recording the dependency. This update remains a draft while the future composition with #6177 is coordinated: its robust-direct path must preserve the active-lane guard or exclude deferred descriptors, with skipped/taken robust-mode fixtures when the branches combine. No combined build or landing-order agreement is claimed. Co-Authored-By: Codex <[email protected]>
DavidAmsellem commented 2026-10-19 17:22:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-19T17:22:11Z.


First AMD-on-Linux (RADV) run of this PR (and the first non-NVIDIA one, as far as I can see). Merged onto main dbac9fa15 (clean merge), built in full and compared with the same main, on the same machine.

AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release.

Full suite (ANYPS5_REQUIRE_VULKAN=1 ctest -j8): 1639/1641 with this PR, against 1638/1640 on main. The failures are the same two on both, so this PR adds none: agc_driver_image_table_vouched_lookups (#7766, fixed by #7916) and agc_driver_guest_memory_lifetime (#7784).

The new agc_shader_deferred_static_planning_reads passes, and so do the touched agc_driver_guarded_null_pointer, agc_driver_key_miss, agc_shader_memory, agc_shader_disk_cache and agc_shader_disk_cache_large_file. No test is skipped or removed compared with main.

GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273050207 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6412#issuecomment-6273050207). Originally posted by [DavidAmsellem](https://github.com/DavidAmsellem) on 2026-10-19T17:22:11Z. --- First AMD-on-Linux (RADV) run of this PR (and the first non-NVIDIA one, as far as I can see). Merged onto `main` `dbac9fa15` (clean merge), built in full and compared with the same `main`, on the same machine. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite (`ANYPS5_REQUIRE_VULKAN=1 ctest -j8`): **1639/1641 with this PR, against 1638/1640 on `main`**. The failures are the same two on both, so this PR adds none: `agc_driver_image_table_vouched_lookups` (#7766, fixed by #7916) and `agc_driver_guest_memory_lifetime` (#7784). The new `agc_shader_deferred_static_planning_reads` passes, and so do the touched `agc_driver_guarded_null_pointer`, `agc_driver_key_miss`, `agc_shader_memory`, `agc_shader_disk_cache` and `agc_shader_disk_cache_large_file`. No test is skipped or removed compared with `main`. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes
DavidAmsellem commented 2026-10-19 18:17:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-19T18:17:00Z.


First AMD-on-Linux (RADV) run of this PR. Merged onto main dbac9fa15 (clean merge), built in full and compared with the same main, on the same machine.

AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release.

Full suite (ANYPS5_REQUIRE_VULKAN=1 ctest -j8) at c2af8644f: 1639/1641 with this PR, against 1638/1640 on main. The two failures are the same on both, so this PR adds none: agc_driver_image_table_vouched_lookups (#7766, fixed by #7916) and agc_driver_guest_memory_lifetime (#7784).

The PR's new ctest entry, agc_shader_deferred_static_planning_reads, runs and passes here. No other ctest entry is added, skipped or removed compared with main.

This checks correctness only; I did not measure performance.

GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6274108146 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6412#issuecomment-6274108146). Originally posted by [DavidAmsellem](https://github.com/DavidAmsellem) on 2026-10-19T18:17:00Z. --- First AMD-on-Linux (RADV) run of this PR. Merged onto `main` `dbac9fa15` (clean merge), built in full and compared with the same `main`, on the same machine. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite (`ANYPS5_REQUIRE_VULKAN=1 ctest -j8`) at `c2af8644f`: **1639/1641 with this PR**, against 1638/1640 on `main`. The two failures are the same on both, so this PR adds none: `agc_driver_image_table_vouched_lookups` (#7766, fixed by #7916) and `agc_driver_guest_memory_lifetime` (#7784). The PR's new ctest entry, `agc_shader_deferred_static_planning_reads`, runs and passes here. No other ctest entry is added, skipped or removed compared with `main`. This checks correctness only; I did not measure performance. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes
MarcZX10 commented 2026-11-14 11:20:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T11:20:53Z.

Review: COMMENTED


Reviewed — comments

The cache documentation names format 37 while the implementation uses format 41; I did not complete the full changed-line review, so a formal decision is not justified.

What I ran

Reviewed head c050c17557af9c9dd4275b97c8adcb9586a66c5c using repo_read.py. No tests or build commands were run; test results in the description are author-reported.

Results

Check Result Note
Source review not run Full changed-line review incomplete
Tests and build not run Description reports author-run checks
Negative control not run No control executed

Negative control

No negative control was run.

Findings

Blocking

None identified in the portions inspected.

Non-blocking

  • docs/dev/ARCHITECTURE.md:114 says this change is stored in cache format 37 and formats 31–36 are rejected, but the changed cache header sets FormatVersion to 41. Update the documentation to match the implementation. Cache header at the reviewed commit

Sources

Reviewed source excerpts at head c050c17557af9c9dd4275b97c8adcb9586a66c5c: ResourceMaterializer.cpp, DescriptorBindingBuilder.cpp, SpirvRuntimeBuffer.cpp, ShaderAddressResources.cpp, ShaderResources.cpp, and ShaderDiskCache.hpp. Prepared review documents read: description.md, commits.md, manifest.json, diff.patch, and README.md.

Not verified

The full changed-line set was not read. In particular, I did not inspect all additions in CMakeLists.txt, ShaderResources.hpp, BdaResources.cpp, KeyMiss.cpp, ShaderDiskCache.cpp tests, ResourcePlan.hpp, Resources.hpp, ShaderInfo.hpp, ResourceMaterializer.hpp, Recompiler.cpp, Recompiler.hpp, ShaderDiskCache.cpp, ShaderDiskCache.hpp, StaticBufferDescriptorAbi.hpp, or the debt documentation. ShaderMemory.cpp was read only in the added test areas. The prepared bundle lists that file as excluded from files/ because it is too large, but it was available through the reader. No files.json was available through the reader.

To get this to a good state

Nothing is required. Optional: correct the cache format numbers in docs/dev/ARCHITECTURE.md:114.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5904056737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6412#pullrequestreview-5904056737). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T11:20:53Z. **Review:** COMMENTED --- # Reviewed — comments The cache documentation names format 37 while the implementation uses format 41; I did not complete the full changed-line review, so a formal decision is not justified. ## What I ran Reviewed head `c050c17557af9c9dd4275b97c8adcb9586a66c5c` using `repo_read.py`. No tests or build commands were run; test results in the description are author-reported. ## Results | Check | Result | Note | |---|---|---| | Source review | not run | Full changed-line review incomplete | | Tests and build | not run | Description reports author-run checks | | Negative control | not run | No control executed | ## Negative control No negative control was run. ## Findings ### Blocking None identified in the portions inspected. ### Non-blocking - `docs/dev/ARCHITECTURE.md:114` says this change is stored in cache format 37 and formats 31–36 are rejected, but the changed cache header sets `FormatVersion` to 41. Update the documentation to match the implementation. [Cache header at the reviewed commit](https://github.com/boykopovar/AnyPS5/blob/c050c17557af9c9dd4275b97c8adcb9586a66c5c/core/shader/recompiler/ShaderDiskCache.hpp#L16) ## Sources Reviewed source excerpts at head `c050c17557af9c9dd4275b97c8adcb9586a66c5c`: `ResourceMaterializer.cpp`, `DescriptorBindingBuilder.cpp`, `SpirvRuntimeBuffer.cpp`, `ShaderAddressResources.cpp`, `ShaderResources.cpp`, and `ShaderDiskCache.hpp`. Prepared review documents read: `description.md`, `commits.md`, `manifest.json`, `diff.patch`, and `README.md`. ## Not verified The full changed-line set was not read. In particular, I did not inspect all additions in `CMakeLists.txt`, `ShaderResources.hpp`, `BdaResources.cpp`, `KeyMiss.cpp`, `ShaderDiskCache.cpp` tests, `ResourcePlan.hpp`, `Resources.hpp`, `ShaderInfo.hpp`, `ResourceMaterializer.hpp`, `Recompiler.cpp`, `Recompiler.hpp`, `ShaderDiskCache.cpp`, `ShaderDiskCache.hpp`, `StaticBufferDescriptorAbi.hpp`, or the debt documentation. `ShaderMemory.cpp` was read only in the added test areas. The prepared bundle lists that file as excluded from `files/` because it is too large, but it was available through the reader. No `files.json` was available through the reader. ## To get this to a good state Nothing is required. Optional: correct the cache format numbers in `docs/dev/ARCHITECTURE.md:114`.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/6412:upstream-pr/6412'
git switch 'upstream-pr/6412'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/6412'
git switch 'upstream-pr/6412'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/6412'
git switch 'upstream-pr/6412'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/6412'
git switch 'main'
git merge --squash 'upstream-pr/6412'
git switch 'main'
git merge --ff-only 'upstream-pr/6412'
git switch 'main'
git merge 'upstream-pr/6412'
git push origin 'main'
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!6412
No description provided.