feat(shader): lower bounded PC-relative jump tables #141

Merged
SamG-Coder merged 1 commit from upstream-pr/141 into main 2026-10-01 18:16:15 +00:00
SamG-Coder commented 2026-09-29 01:49:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SamG-Coder on 2026-09-29T01:49:31Z.


What

Resolve bounded PC-relative shader jump tables and lower proven forward targets to structured branches. Preserve the two loaded destination words and SCC even if the selector is overwritten after the load.

Rebased directly onto upstream c7fb2575. #111 and the #134 control-flow foundation are now upstream; no unmerged dependency commits remain. One implementation commit: 1571ec69.

Support remains bounded: s_min_u32, eight-byte stride, PC-relative two-dword loads, forward instruction-boundary targets, at most 256 entries, and every table byte captured. Unsupported or invalid patterns are rejected.

Tested

Windows / RTX 5080, 1571ec69:

  • Full build and library packaging passed; 88/88 CTest tests passed.
  • 34/34 freshly converted original PS5-targeted jump-table/control demos passed: four direct controls, all 30 indirect cases, including all 16 entries of a larger table.
  • Independent pixel checks cover two frames per case: 15,232 interior samples, maximum channel error 1/255; incorrect image expectations rejected.
  • All 13 external graph guard checks passed, including 12 expected malformed/unsupported-input rejections.

No physical-console, complete-application, clean-exit or performance claim. The harness stops after capture. Demos, logs, binaries and captures remain outside Git; no application shader assets are included.

Checklist

  • Based on current upstream main; merged dependencies removed
  • One implementation topic; unsupported paths throw
  • No new code comments, third-party code, investigation documents or images
  • Generic behavior
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4671470121 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/141). Originally posted by [SamG-Coder](https://github.com/SamG-Coder) on 2026-09-29T01:49:31Z. --- ### What Resolve bounded PC-relative shader jump tables and lower proven forward targets to structured branches. Preserve the two loaded destination words and SCC even if the selector is overwritten after the load. Rebased directly onto upstream c7fb2575. #111 and the #134 control-flow foundation are now upstream; no unmerged dependency commits remain. One implementation commit: 1571ec69. Support remains bounded: s_min_u32, eight-byte stride, PC-relative two-dword loads, forward instruction-boundary targets, at most 256 entries, and every table byte captured. Unsupported or invalid patterns are rejected. ### Tested Windows / RTX 5080, 1571ec69: - Full build and library packaging passed; 88/88 CTest tests passed. - 34/34 freshly converted original PS5-targeted jump-table/control demos passed: four direct controls, all 30 indirect cases, including all 16 entries of a larger table. - Independent pixel checks cover two frames per case: 15,232 interior samples, maximum channel error 1/255; incorrect image expectations rejected. - All 13 external graph guard checks passed, including 12 expected malformed/unsupported-input rejections. No physical-console, complete-application, clean-exit or performance claim. The harness stops after capture. Demos, logs, binaries and captures remain outside Git; no application shader assets are included. ### Checklist - [x] Based on current upstream main; merged dependencies removed - [x] One implementation topic; unsupported paths throw - [x] No new code comments, third-party code, investigation documents or images - [x] Generic behavior - [x] Depends on: none - [x] AI-assisted: yes
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!141
No description provided.