shader: evaluate unsigned min in runtime descriptors

This commit is contained in:
nmzik
2026-08-15 17:10:09 +02:00
parent f453a752bb
commit f3cdf217ea
2 changed files with 40 additions and 1 deletions
@@ -85,6 +85,7 @@ bool IsRuntimeIntegerOp(ValueOpcode op) {
case ValueOpcode::ISub64:
case ValueOpcode::IMul32:
case ValueOpcode::IMul64:
case ValueOpcode::UMin32:
case ValueOpcode::ShiftLeftLogical32:
case ValueOpcode::ShiftLeftLogical64:
case ValueOpcode::ShiftRightLogical32:
@@ -639,6 +640,12 @@ private:
return true;
}
return false;
case ValueOpcode::UMin32:
if (binary()) {
result = std::min(static_cast<uint32_t>(a), static_cast<uint32_t>(b));
return true;
}
return false;
case ValueOpcode::BitwiseAnd32:
if (binary()) {
result = static_cast<uint32_t>(a & b);