renderer: shadertoy convert to MSL

This commit is contained in:
Mitchell Hashimoto
2023-11-16 10:06:24 -08:00
parent 1bd92619b1
commit dba78b20ca
2 changed files with 78 additions and 5 deletions

View File

@@ -30,11 +30,11 @@ pub const Program = opaque {
return @intCast(c.glslang_program_SPIRV_get_size(@ptrCast(self)));
}
pub fn spirvGet(self: *Program, buf: []u8) void {
pub fn spirvGet(self: *Program, buf: []u32) void {
c.glslang_program_SPIRV_get(@ptrCast(self), buf.ptr);
}
pub fn spirvGetPtr(self: *Program) ![*]u8 {
pub fn spirvGetPtr(self: *Program) ![*]u32 {
return @ptrCast(c.glslang_program_SPIRV_get_ptr(@ptrCast(self)));
}