shader: evaluate unsigned min in runtime descriptors

This commit is contained in:
nmzik committed 2026-08-18 03:53:42 +02:00
1 parent f453a752bb
commit f3cdf217ea
2 files changed
+40 -1

No files matched your search

@@ -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);