adding SIMD vector specializations
Some checks failed
Build / build (push) Failing after 29s
Test / build (push) Failing after 55s

This commit is contained in:
2026-01-21 14:52:37 +01:00
parent 45adad727d
commit 19687251b0
7 changed files with 455 additions and 56 deletions

View File

@@ -19,6 +19,10 @@ const Value = Result.Value;
const Self = @This();
pub const ModuleOptions = struct {
use_simd_vectors_specializations: bool = true,
};
const SpvEntryPoint = struct {
exec_model: spv.SpvExecutionModel,
id: SpvWord,
@@ -40,6 +44,8 @@ const ModuleError = error{
OutOfMemory,
};
options: ModuleOptions,
it: WordIterator,
version_major: SpvByte,
@@ -77,8 +83,9 @@ output_locations: std.ArrayList(SpvWord),
bindings: std.AutoHashMap(SpvBinding, Value),
push_constants: []Value,
pub fn init(allocator: std.mem.Allocator, source: []const SpvWord) ModuleError!Self {
pub fn init(allocator: std.mem.Allocator, source: []const SpvWord, options: ModuleOptions) ModuleError!Self {
var self: Self = std.mem.zeroInit(Self, .{
.options = options,
.code = allocator.dupe(SpvWord, source) catch return ModuleError.OutOfMemory,
.files = std.ArrayList(SpvSource).empty,
.extensions = std.ArrayList([]const u8).empty,