[Flint] moving ir gen specific code to separate file
Mirror Gitea refs to GitHub / mirror (push) Successful in 17s
Test / build_and_test (push) Successful in 3m52s
Build / build (push) Canceled after 4m13s

This commit is contained in:
2026-08-14 03:19:36 +02:00
parent a4ee2a8bd2
commit b4954da909
23 changed files with 2076 additions and 2394 deletions
+4
View File
@@ -39,12 +39,16 @@ scratch: []u32,
pub fn init(allocator: std.mem.Allocator, program: *const Program) !Self {
const registers = try allocator.alloc(u32, program.register_count);
errdefer allocator.free(registers);
const scratch = try allocator.alloc(u32, program.scratch_count);
errdefer allocator.free(scratch);
@memset(registers, 0);
@memset(scratch, 0);
for (program.initializers) |initializer|
registers[initializer.register] = initializer.value;
return .{ .allocator = allocator, .registers = registers, .scratch = scratch };
}
-3
View File
@@ -1,7 +1,4 @@
//! Software bytecode interpreter for the backend-agnostic shader IR.
//!
//! This first slice supports allocation-free scalar execution of 32-bit scalar
//! and vector arithmetic, interface I/O, control flow, and block parameters.
pub const bytecode = @import("bytecode.zig");
pub const Program = @import("Program.zig");