gpu: example: use CommandEncoder.finish

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 22:31:05 -07:00 committed by Stephen Gutekanst
parent 143567e1c0
commit e26a2858ed

View file

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