fix(shader): evaluate signed minimum in runtime SRT expressions #2790

Merged
tototomate123 merged 1 commit from upstream-pr/2790 into main 2026-10-11 07:23:59 +00:00
tototomate123 commented 2026-10-10 15:00:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tototomate123 on 2026-10-10T15:00:37Z.


What

Split from #1616, following its review. Evaluate SMin32 in runtime SRT expressions with signed comparison, matching the existing IR/GPU lowering. No new GPU opcode is introduced.

Tested

Linux x86-64, GCC 16.2.1, Release. agc_shader_memory passes, including signed-min cases around zero, INT_MIN and INT_MAX. Conventions and whitespace checks pass on current main (5edae353).

Depends on

None for build. HFW integration also needs #2785 (relinker), #2786 (loader), #2787 (filesystem), #2788 (http), #2789 (apr). #1269 (media), #1339 (VRR), #1586 (unwind) and #1436 (imports) are now on main. Local image-table experiments are excluded; open #757 → #758 overlaps them, and #920 is closed without merging. Earlier combined integration reached menu/loading UI; these isolated branches have not been game-tested and gameplay is unverified.

Checklist

  • Based on current main; no duplicate implementation found beyond superseded #1616
  • One topic per PR
  • No code comments except technical debt
  • Unimplemented paths throw; offline HTTP limitations documented
  • No investigation notes, logs or images committed
  • No new third-party dependencies
  • Generic behavior; no title-specific dispatch
  • Depends on: none for build; HFW integration requirements listed above
  • AI-assisted: yes, Codex
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4812130538 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2790). Originally posted by [tototomate123](https://github.com/tototomate123) on 2026-10-10T15:00:37Z. --- ### What Split from #1616, following its review. Evaluate `SMin32` in runtime SRT expressions with signed comparison, matching [the existing IR/GPU lowering](https://github.com/boykopovar/AnyPS5/blob/5edae35361e9b7f7061f28c6e80ed075312b8105/core/shader/recompiler/SpirvBackend/src/SpirvAlu/SpirvAluEmitterMath.cpp). No new GPU opcode is introduced. ### Tested Linux x86-64, GCC 16.2.1, Release. `agc_shader_memory` passes, including signed-min cases around zero, INT_MIN and INT_MAX. Conventions and whitespace checks pass on current main (`5edae353`). ### Depends on None for build. HFW integration also needs #2785 (relinker), #2786 (loader), #2787 (filesystem), #2788 (http), #2789 (apr). #1269 (media), #1339 (VRR), #1586 (unwind) and #1436 (imports) are now on main. Local image-table experiments are excluded; open #757 → #758 overlaps them, and #920 is closed without merging. Earlier combined integration reached menu/loading UI; these isolated branches have not been game-tested and gameplay is unverified. ### Checklist - [x] Based on current `main`; no duplicate implementation found beyond superseded #1616 - [x] One topic per PR - [x] No code comments except technical debt - [x] Unimplemented paths throw; offline HTTP limitations documented - [x] No investigation notes, logs or images committed - [x] No new third-party dependencies - [x] Generic behavior; no title-specific dispatch - [x] Depends on: none for build; HFW integration requirements listed above - [x] AI-assisted: yes, Codex
github-actions[bot] commented 2026-10-10 15:01:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T15:01:56Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6098844342 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2790#issuecomment-6098844342). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T15:01:56Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
adriadam10 commented 2026-10-11 07:23:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T07:23:56Z.


Checked the build and agc_shader_memory on Linux (GCC) with the PR merged onto main, and the new test fails without the evaluator change. SMin32 now matches the signed lowering in EmitSMin32 and the constant folder; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106644982 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2790#issuecomment-6106644982). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T07:23:56Z. --- Checked the build and `agc_shader_memory` on Linux (GCC) with the PR merged onto main, and the new test fails without the evaluator change. `SMin32` now matches the signed lowering in `EmitSMin32` and the constant folder; merging.
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!2790
No description provided.