internal/shader: reduce shaderir.ConstType usages

Updates #2550
This commit is contained in:
Hajime Hoshi 2023-07-23 13:08:03 +09:00
parent a5af8f3b0b
commit 12e60b7273

View File

@ -58,7 +58,7 @@ func isValidForModOp(lhs, rhs *shaderir.Expr, lhst, rhst shaderir.Type) bool {
if s.Const == nil { if s.Const == nil {
return false return false
} }
if s.ConstType == shaderir.ConstTypeInt { if s.Const.Kind() == gconstant.Int {
return true return true
} }
if canTruncateToInteger(s.Const) { if canTruncateToInteger(s.Const) {