removing spirv headers dependencies, reworking architecture

This commit is contained in:
2025-12-24 18:09:16 +01:00
parent b4ff6f559b
commit 885919952c
15 changed files with 2969 additions and 140 deletions

26
src/opcodes.zig git.filemode.normal_file
View File

@@ -0,0 +1,26 @@
const std = @import("std");
const spv = @import("spv.zig");
const Module = @import("Module.zig");
const Runtime = @import("Runtime.zig");
const SpvVoid = spv.SpvVoid;
const SpvByte = spv.SpvByte;
const SpvWord = spv.SpvWord;
const SpvBool = spv.SpvBool;
pub const OpCodeSetupFunc = *const fn (SpvWord, *Module) void;
pub const OpCodeExecFunc = *const fn (SpvWord, *Runtime) void;
pub const SetupDispatcher = block: {
@setEvalBranchQuota(65535);
break :block std.EnumMap(spv.SpvOp, OpCodeSetupFunc).init(.{
.Capability = OpCapability,
});
};
fn OpCapability(word_count: SpvWord, mod: *Module) void {
_ = word_count;
_ = mod;
std.debug.print("test\n", .{});
}