sysgpu: spirv codegen fix (#1234)

This commit is contained in:
jack 2024-07-30 03:00:45 +08:00 committed by GitHub
parent 3ea364413b
commit 9148754b76
Failed to generate hash of commit

View file

@ -1608,6 +1608,7 @@ fn emitBinaryAir(spv: *SpirV, section: *Section, binary: Inst.Binary) !IdRef {
.equal => spv.emitBinary(section, .OpFOrdEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.not_equal => spv.emitBinary(section, .OpFOrdNotEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.less_than => spv.emitBinary(section, .OpFOrdLessThan, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.less_than_equal => spv.emitBinary(section, .OpFOrdLessThanEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.greater_than => spv.emitBinary(section, .OpFOrdGreaterThan, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.greater_than_equal => spv.emitBinary(section, .OpFOrdGreaterThanEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
else => unreachable,
@ -1641,6 +1642,7 @@ fn emitBinaryAir(spv: *SpirV, section: *Section, binary: Inst.Binary) !IdRef {
.div => spv.emitBinary(section, .OpSDiv, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.mod => spv.emitBinary(section, .OpSMod, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.less_than => spv.emitBinary(section, .OpSLessThan, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.less_than_equal => spv.emitBinary(section, .OpSLessThanEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.greater_than => spv.emitBinary(section, .OpSGreaterThan, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.greater_than_equal => spv.emitBinary(section, .OpSGreaterThanEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
else => unreachable,
@ -1649,6 +1651,7 @@ fn emitBinaryAir(spv: *SpirV, section: *Section, binary: Inst.Binary) !IdRef {
.div => spv.emitBinary(section, .OpUDiv, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.mod => spv.emitBinary(section, .OpUMod, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.less_than => spv.emitBinary(section, .OpULessThan, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.less_than_equal => spv.emitBinary(section, .OpULessThanEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.greater_than => spv.emitBinary(section, .OpUGreaterThan, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.greater_than_equal => spv.emitBinary(section, .OpUGreaterThanEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
else => unreachable,
@ -1676,6 +1679,7 @@ fn emitBinaryAir(spv: *SpirV, section: *Section, binary: Inst.Binary) !IdRef {
.equal => spv.emitBinary(section, .OpFOrdEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.not_equal => spv.emitBinary(section, .OpFOrdNotEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.less_than => spv.emitBinary(section, .OpFOrdLessThan, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.less_than_equal => spv.emitBinary(section, .OpFOrdLessThanEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.greater_than => spv.emitBinary(section, .OpFOrdGreaterThan, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
.greater_than_equal => spv.emitBinary(section, .OpFOrdGreaterThanEqual, result_ty, &lhs, &rhs, lhs_ty, rhs_ty),
else => unreachable,