small refactor of values
Build / build (push) Successful in 1m54s
Test / build (push) Successful in 7m56s

This commit is contained in:
2026-03-14 03:59:11 +01:00
parent 7074345540
commit 9e72a6d2bc
6 changed files with 532 additions and 458 deletions
+3 -2
View File
@@ -8,6 +8,7 @@ const Module = @import("../Module.zig");
const Runtime = @import("../Runtime.zig");
const Result = @import("../Result.zig");
const WordIterator = @import("../WordIterator.zig");
const Value = @import("../Value.zig").Value;
const RuntimeError = Runtime.RuntimeError;
const ValueType = opc.ValueType;
@@ -123,7 +124,7 @@ fn MathEngine(comptime T: ValueType, comptime Op: MathOp) type {
};
}
fn applyScalar(bit_count: SpvWord, d: *Result.Value, s: *const Result.Value) RuntimeError!void {
fn applyScalar(bit_count: SpvWord, d: *Value, s: *const Value) RuntimeError!void {
switch (bit_count) {
inline 8, 16, 32, 64 => |bits| {
if (bits == 8 and T == .Float) return RuntimeError.InvalidSpirV;
@@ -177,7 +178,7 @@ fn MathEngine(comptime T: ValueType, comptime Op: MathOp) type {
};
}
fn applyScalar(bit_count: SpvWord, d: *Result.Value, l: *const Result.Value, r: *const Result.Value) RuntimeError!void {
fn applyScalar(bit_count: SpvWord, d: *Value, l: *const Value, r: *const Value) RuntimeError!void {
switch (bit_count) {
inline 8, 16, 32, 64 => |bits| {
if (bits == 8 and T == .Float) return RuntimeError.InvalidSpirV;