fix(shader): evaluate signed comparisons in SRT expressions #2072
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2072"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by STUPIDCONTEM on 2026-10-09T06:51:54Z.
Evidence review (2026-10-09)
Game/title evidence has not been established. Validation below is host regression/build evidence only; it does not establish title compatibility. Older checked items and test results describe their stated revisions, not current merge readiness.
Game/title ID: none verified. No PS5 title execution is claimed.
What
The generic shader-resource evaluator cannot resolve descriptor expressions containing
SLessThan32, even though the IR translator and SPIR-V backend support that comparison. Add signed 32-bit comparison of the operand bit patterns, returning the existing Boolean encoding.This implements the specific missing operation identified by johnmaia in the EVO PLAYER report. Semantics follow the normative SPIR-V OpSLessThan instruction, which the existing
EmitSLessThan32backend emits. No new instruction decoding or shader fallback is introduced.Tested
Windows 10 Pro 19045, WinLibs GCC 15.2.0 UCRT posix SEH r7, Release, BUILD_TESTING=ON. Independent branch from
f145139676a48306681d3a4d5fabf83938759daf.agc_shader_memorycalls the actual runtime descriptor evaluator with signed comparisons beneathSelectU32descriptor dwords. Inputs INT_MIN, -1, 0 and INT_MAX exercise both signed order and equality boundaries for x<0, INT_MIN<x and x<INT_MAX.libsbuilds passed; full CTest: 488/488, 27.59 seconds. Committed-head conventions, whitespace and test-registration checks passed.No native RDNA2/PS5 measurement or title run was performed. The hardware-validation limitation is recorded in TechnicalDebt. This is a narrow evaluator fix, not a claim that EVO PLAYER renders end to end.
Open #1341 adds a compiled SRT-expression path but does not whitelist this signed opcode; this remains available through its generic fallback. #757 changes image-table offsets and #2071 prepares combined shader layouts; neither implements this operator.
Checklist
main; no other open PR implements the same changeImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T05:59:20Z.
Review: CHANGES_REQUESTED
Checked: the
SLessThan32case inSrtEvaluator.cppis correct and the newverifySignedSrtComparisontest fails onmainand passes with the change (built and ranagc_shader_memoryplus the AGC/AgcDriver ctest scope locally, all green).Two things to fix before this can merge:
conventionscheck fails: the checklist item "Based on currentmain; no other open PR implements the same change" is unchecked. Please verify it against currentmainand tick it, and drop the "(historical base; current readiness not asserted)" qualifier, which the check reads as unchecked.docs/dev/TechnicalDebt.md:259sits right after line 258, which #1873 and #1924 also edit, so it will conflict as soon as one of them lands. Move it a few lines away from that spot (not at the end of the section).Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T08:07:27Z.
Review: APPROVED
Re-checked on the new head:
SLessThan32inSrtEvaluator.cppis correct (signed compare of the 32-bit patterns),verifySignedSrtComparisonfails without the change and passes with it,agc_shader_memoryand the AGC/AgcDriver ctest scope are green, no other open PR adds this opcode, and the TechnicalDebt line is now clear of #1873/#1924.The
conventionsfailure was only the unticked "Based on currentmain" checklist item with the "historical base" qualifier; I verified it (clean merge onto currentmain, no overlap) and ticked it in the description. Merging once CI is green.