fixing descriptor sets population
All checks were successful
Build / build (push) Successful in 1m6s
Test / build (push) Successful in 4m55s

This commit is contained in:
2026-02-26 01:03:52 +01:00
parent 2409ec7269
commit e09a41754f
6 changed files with 43 additions and 51 deletions

View File

@@ -26,24 +26,21 @@ pub fn main() !void {
var ssbo: SSBO = .{};
try rt.writeDescriptorSet(allocator, std.mem.asBytes(&ssbo), 0, 0);
for (0..16) |i| {
for (0..16) |x| {
for (0..16) |y| {
const global_invocation_indices = [3]i32{
@as(i32, @intCast(i * 16 + x)),
@as(i32, @intCast(y)),
1,
};
const global_invocation_indices = [3]i32{
@as(i32, @intCast(i * 16 + x)),
1,
1,
};
try rt.writeBuiltIn(std.mem.asBytes(&global_invocation_indices), .GlobalInvocationId);
rt.callEntryPoint(allocator, entry) catch |err| switch (err) {
spv.Runtime.RuntimeError.OutOfBounds => continue,
else => return err,
};
try rt.readDescriptorSet(std.mem.asBytes(&ssbo), 0, 0);
}
try rt.writeBuiltIn(std.mem.asBytes(&global_invocation_indices), .GlobalInvocationId);
try rt.writeDescriptorSet(allocator, std.mem.asBytes(&ssbo), 0, 0);
rt.callEntryPoint(allocator, entry) catch |err| switch (err) {
spv.Runtime.RuntimeError.OutOfBounds => continue,
else => return err,
};
try rt.readDescriptorSet(std.mem.asBytes(&ssbo), 0, 0);
}
}