fixing derivatives agains
Build / build (push) Successful in 42s
Test / build (push) Successful in 1m21s

This commit is contained in:
2026-07-02 02:19:11 +02:00
parent 6fbd386ce4
commit 445bb93296
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -448,7 +448,13 @@ pub fn setDerivativeFromMemory(self: *Self, allocator: std.mem.Allocator, result
fn getResultTargetTypeWord(self: *const Self, result: SpvWord) RuntimeError!SpvWord {
return switch ((try self.results[result].getConstVariant()).*) {
.Variable => |v| v.type_word,
.Variable => |v| switch ((try self.results[v.type_word].getConstVariant()).*) {
.Type => |t| switch (t) {
.Pointer => |p| p.target,
else => v.type_word,
},
else => return RuntimeError.InvalidSpirV,
},
.Constant => |c| c.type_word,
.FunctionParameter => |p| p.type_word,
.AccessChain => |a| a.target,
+1 -1
View File
@@ -2885,6 +2885,7 @@ fn MathEngine(comptime T: PrimitiveType, comptime Op: MathOp, comptime IsAtomic:
.MatrixTimesMatrix,
.MatrixTimesScalar,
.MatrixTimesVector,
.VectorTimesScalar,
.VectorTimesMatrix,
=> if (comptime is_int) @mulWithOverflow(op1, op2)[0] else op1 * op2,
.Div => blk: {
@@ -3253,7 +3254,6 @@ fn MathEngine(comptime T: PrimitiveType, comptime Op: MathOp, comptime IsAtomic:
else => try vectorRoutines(dst, lhs, rhs, lane_bits),
}
if (comptime IsAtomic) {
try copyValue(lhs, dst);
try copyValue(dst, &lhs_save.?);