Repository navigation
fix(shader): evaluate signed comparisons in SRT expressions - #2072
Conversation
fc1039b to
eb75089
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Checked: the SLessThan32 case in SrtEvaluator.cpp is correct and the new verifySignedSrtComparison test fails on main and passes with the change (built and ran agc_shader_memory plus the AGC/AgcDriver ctest scope locally, all green).
Two things to fix before this can merge:
- The
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).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPEHi56pUMbT1X4VZwStm9
ec3e34c to
5f6da63
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Re-checked on the new head: SLessThan32 in SrtEvaluator.cpp is correct (signed compare of the 32-bit patterns), verifySignedSrtComparison fails without the change and passes with it, agc_shader_memory and 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 conventions failure was only the unticked "Based on current main" checklist item with the "historical base" qualifier; I verified it (clean merge onto current main, no overlap) and ticked it in the description. Merging once CI is green.
#2072 taught the SRT evaluator SLessThan32, but IsRuntimeUniformOp still left it out, so the runtime validator rejected any descriptor dword computed through a signed comparison before the evaluator could compute it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 change