adding some operators, working on example
Some checks failed
Build / build (push) Failing after 33s
Test / build (push) Failing after 3m0s

This commit is contained in:
2026-01-20 21:52:42 +01:00
parent 35099b33e1
commit df711a196a
11 changed files with 170 additions and 68 deletions

View File

@@ -159,15 +159,15 @@ pub fn init(allocator: std.mem.Allocator, source: []const SpvWord) ModuleError!S
capabilities,
entry_points,
});
//@import("pretty").print(allocator, self.results, .{
// .tab_size = 4,
// .max_depth = 0,
// .struct_max_len = 0,
// .array_max_len = 0,
//}) catch return ModuleError.OutOfMemory;
}
//@import("pretty").print(allocator, self.results, .{
// .tab_size = 4,
// .max_depth = 0,
// .struct_max_len = 0,
// .array_max_len = 0,
//}) catch return ModuleError.OutOfMemory;
return self;
}
@@ -205,6 +205,10 @@ fn populateMaps(self: *Self, allocator: std.mem.Allocator) ModuleError!void {
for (self.results, 0..) |result, id| {
if (result.variant == null or std.meta.activeTag(result.variant.?) != .Variable) continue;
switch (result.variant.?.Variable.storage_class) {
.Input => for (result.decorations.items) |decoration| switch (decoration.rtype) {
.Location => self.input_locations.append(allocator, @intCast(id)) catch return ModuleError.OutOfMemory,
else => {},
},
.Output => for (result.decorations.items) |decoration| switch (decoration.rtype) {
.Location => self.output_locations.append(allocator, @intCast(id)) catch return ModuleError.OutOfMemory,
else => {},