adding SIMD vector specializations
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user