improving rasterization performances
Test / build_and_test (push) Successful in 33s
Build / build (push) Successful in 1m2s

This commit is contained in:
2026-05-14 21:44:53 +02:00
parent 1eb367ac17
commit d460f22a45
10 changed files with 227 additions and 112 deletions
+8 -1
View File
@@ -13,11 +13,18 @@ const VkError = base.VkError;
const SpvRuntimeError = spv.Runtime.RuntimeError;
pub fn shaderInvocation(allocator: std.mem.Allocator, draw_call: *Renderer.DrawCall, batch_id: usize, position: zm.F32x4, inputs: [spv.SPIRV_MAX_OUTPUT_LOCATIONS][]const u8) SpvRuntimeError!zm.F32x4 {
const io = draw_call.renderer.device.interface.io();
_ = position;
const pipeline = draw_call.renderer.state.pipeline orelse return zm.f32x4s(0.0);
const shader = pipeline.stages.getPtrAssertContains(.fragment);
const rt = &shader.runtimes[batch_id];
const runtime = &shader.runtimes[batch_id];
const mutex = &runtime.mutex;
const rt = &runtime.rt;
mutex.lock(io) catch return SpvRuntimeError.Unknown;
defer mutex.unlock(io);
const entry = try rt.getEntryPointByName(shader.entry);
const output_result = try rt.getResultByLocation(0, .output);