yes
All checks were successful
Build / build (push) Successful in 2m1s
Test / build (push) Successful in 8m28s

This commit is contained in:
2026-03-20 16:39:06 +01:00
parent fe47277468
commit c18deb432f
2 changed files with 10 additions and 7 deletions

View File

@@ -93,7 +93,7 @@ pub const Value = union(Type) {
i32_ptr: *i32, //< For vector specializations
u32_ptr: *u32,
},
runtime_array_window: ?[]u8 = null,
uniform_slice_window: ?[]u8 = null,
},
pub inline fn getCompositeDataOrNull(self: *const Self) ?[]Self {
@@ -440,7 +440,7 @@ pub const Value = union(Type) {
pub fn flushPtr(self: *Self, allocator: std.mem.Allocator) RuntimeError!void {
switch (self.*) {
.Pointer => |*p| {
if (p.runtime_array_window) |window| {
if (p.uniform_slice_window) |window| {
switch (p.ptr) {
.common => |ptr| {
_ = try ptr.read(window);
@@ -450,7 +450,7 @@ pub const Value = union(Type) {
else => {},
}
}
p.runtime_array_window = null;
p.uniform_slice_window = null;
},
else => {},
}

View File

@@ -516,7 +516,10 @@ fn CondOperator(comptime T: ValueType, comptime Op: CondOp) type {
}
return switch (Op) {
.IsFinite => std.math.isFinite(a),
.IsInf => std.math.isInf(a),
.IsInf => blk: {
std.debug.print("test {s} - {d} - {s}\n", .{ @typeName(TT), a, if (std.math.isInf(a)) "true" else "false" });
break :blk std.math.isInf(a);
},
.IsNan => std.math.isNan(a),
.IsNormal => std.math.isNormal(a),
else => RuntimeError.InvalidSpirV,
@@ -1186,7 +1189,7 @@ fn opAccessChain(allocator: std.mem.Allocator, word_count: SpvWord, rt: *Runtime
.AccessChain = .{
.target = var_type,
.value = blk: {
var runtime_array_window: ?[]u8 = null;
var uniform_slice_window: ?[]u8 = null;
for (0..index_count) |index| {
const is_last = (index == index_count - 1);
@@ -1213,7 +1216,7 @@ fn opAccessChain(allocator: std.mem.Allocator, word_count: SpvWord, rt: *Runtime
.RuntimeArray => |*arr| {
value_ptr = try arr.createValueFromIndex(if (is_last) allocator else arena_allocator, rt.results, i.value.uint32);
if (is_last)
runtime_array_window = arr.data[(try arr.getOffsetOfIndex(i.value.uint32))..];
uniform_slice_window = arr.data[(try arr.getOffsetOfIndex(i.value.uint32))..];
},
.Vector4f32 => |*v| {
if (i.value.uint32 > 4) return RuntimeError.OutOfBounds;
@@ -1260,7 +1263,7 @@ fn opAccessChain(allocator: std.mem.Allocator, word_count: SpvWord, rt: *Runtime
break :blk .{
.Pointer = .{
.ptr = .{ .common = value_ptr },
.runtime_array_window = runtime_array_window,
.uniform_slice_window = uniform_slice_window,
},
};
},