gpu: fix Queue.submit commands parameter

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 22:40:18 -07:00 committed by Stephen Gutekanst
parent e26a2858ed
commit 1c5c23f101
3 changed files with 24 additions and 10 deletions

View file

@ -211,12 +211,11 @@ fn frame(params: FrameParams) !void {
pass.end();
pass.release();
var commands = encoder.finish(null);
var command = encoder.finish(null);
encoder.release();
const buf = gpu.CommandBuffer{ .ptr = &commands, .vtable = undefined };
params.queue.submit(1, &buf);
commands.release();
params.queue.submit(&.{command});
command.release();
pl.swap_chain.?.present();
back_buffer_view.release();
}