-
Fix unsigned "less than zero" comparison · 8c12f564Sean Risser authored
From the SPIR-V spec: OpSMod's result is the remainder r of Operand 1 divided by Operand 2 where if r != 0, the sign of r is the same as the sign of Operand 2. The less than comparison here was trying to correct the cases where C's modulo had a different sign than SPIR-V's modulo. We can solve this by directly comparing the sign of the C modulo against Operand 2's sign. Bug chromium:973848 Change-Id: I27c88b7aaed35db5ba4df2cc0aac6061098f32c4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32868Tested-by:
Sean Risser <srisser@google.com> Presubmit-Ready: Sean Risser <srisser@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
8c12f564
×