adding pipeline dynamic state and vertex output interpollation
Build / build (push) Successful in 2m40s
Test / build_and_test (push) Successful in 33m34s

This commit is contained in:
2026-04-27 19:39:49 +02:00
parent f35bce907e
commit 02bb54b841
12 changed files with 286 additions and 80 deletions
+14 -3
View File
@@ -41,6 +41,18 @@ inline fn run(data: RunData) !void {
var invocation_index: usize = data.batch_id;
while (invocation_index < data.fragment_count) : (invocation_index += data.batch_size) {
const fragment: *Renderer.Fragment = &data.draw_call.fragments[invocation_index];
for (0..spv.SPIRV_MAX_OUTPUT_LOCATIONS) |location| {
const result_word = rt.getResultByLocation(@intCast(location), .input) catch |err| switch (err) {
SpvRuntimeError.NotFound => continue,
else => return err,
};
if (result_word != 0) {
try rt.writeInput(fragment.inputs[location], result_word);
}
}
rt.callEntryPoint(allocator, entry) catch |err| switch (err) {
// Some errors can be safely ignored
SpvRuntimeError.OutOfBounds,
@@ -49,8 +61,7 @@ inline fn run(data: RunData) !void {
else => return err,
};
const output: *F32x4 = &data.draw_call.fragments[invocation_index].color;
try rt.readOutput(std.mem.asBytes(output), output_result);
output.* = std.math.clamp(output.*, zm.f32x4s(0.0), zm.f32x4s(1.0));
try rt.readOutput(std.mem.asBytes(&fragment.color), output_result);
fragment.color = std.math.clamp(fragment.color, zm.f32x4s(0.0), zm.f32x4s(1.0));
}
}