spirv: implement @divFloor, @floor and @mod

This commit is contained in:
Ali Chraghi
2024-02-18 13:39:32 +03:30
parent 23f729aec9
commit 0f75143c62
5 changed files with 132 additions and 25 deletions

View File

@@ -429,8 +429,8 @@ pub fn constInt(self: *Module, ty_ref: CacheRef, value: anytype) !IdRef {
return try self.resolveId(.{ .int = .{
.ty = ty_ref,
.value = switch (ty.signedness) {
.signed => Value{ .int64 = @as(i64, @intCast(value)) },
.unsigned => Value{ .uint64 = @as(u64, @intCast(value)) },
.signed => Value{ .int64 = @intCast(value) },
.unsigned => Value{ .uint64 = @intCast(value) },
},
} });
}