Experiment with subpasses

This commit is contained in:
Przemysław Gasiński 2024-09-01 19:20:41 +02:00
parent 27689b8cda
commit bd725421b6
12 changed files with 1848 additions and 41 deletions

View file

@ -329,7 +329,7 @@ pub inline fn boolx16(
// zig fmt: on
pub inline fn veclen(comptime T: type) comptime_int {
return @typeInfo(T).Vector.len;
return @typeInfo(T).vector.len;
}
pub inline fn splat(comptime T: type, value: f32) T {
@ -413,14 +413,14 @@ pub inline fn storeArr4(arr: *[4]f32, v: F32x4) void {
}
pub inline fn arr3Ptr(ptr: anytype) *const [3]f32 {
comptime assert(@typeInfo(@TypeOf(ptr)) == .Pointer);
comptime assert(@typeInfo(@TypeOf(ptr)) == .pointer);
const T = std.meta.Child(@TypeOf(ptr));
comptime assert(T == F32x4);
return @as(*const [3]f32, @ptrCast(ptr));
}
pub inline fn arrNPtr(ptr: anytype) [*]const f32 {
comptime assert(@typeInfo(@TypeOf(ptr)) == .Pointer);
comptime assert(@typeInfo(@TypeOf(ptr)) == .pointer);
const T = std.meta.Child(@TypeOf(ptr));
comptime assert(T == Mat or T == F32x4 or T == F32x8 or T == F32x16);
return @as([*]const f32, @ptrCast(ptr));