fix(shader): normalize negative color compare wrap indices #1262
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1262"
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 MarcZX10 on 2026-10-07T20:15:08Z.
What
Normalize negative texel indices into the image extent when emulating color-texture comparison sampling with wrap addressing. Add point-filtered wrap coverage alongside the existing bilinear wrap checks.
Tested
agc_driver_emulated_color_compare_testswith GCC 12.2.agc_driver_emulated_color_compare: passed, including point and bilinear wrap, offsets, border modes, and unsupported-mode rejection checks.tools/check_conventions.py --base upstream/main: passed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T10:12:23Z.
Review: CHANGES_REQUESTED
Thanks for the PR. Two issues:
point, wraprow passes without the change: revertingSpirvImageEmitter.cppand rebuildingagc_driver_emulated_color_compare_tests, the test still passes on RADV and on the lavapipe CI installs (Mesa 25.2.8, LLVM 20). A test that passes onmaindoesn't cover the fix.OpSModas taking the sign of operand 2 (extent, always positive here), soOpSModand theOpSRem+ correction give the same result on any conformant driver. This reads as a workaround for a bug in llvmpipe/LLVM 15, not a semantic fix.Please show a conformant driver (version and output) where
OpSModreturns a wrong value for these inputs, and make the test fail onmainin Linux CI, or drop the PR. If it is a driver bug, say so in the TechnicalDebt entry instead of describing it as an unmeasured hardware behaviour.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-08T10:22:59Z.
Closing for now. The reported failure reproduces on llvmpipe LLVM 15.0.6, but the change is a workaround for that driver behavior rather than a SPIR-V semantic fix, and the added test passes on the current Linux CI driver without the change. I do not have evidence of incorrect OpSMod behavior on a conformant driver. I will reopen if that evidence becomes available or if this is retained explicitly as a driver-specific workaround.
Pull request closed