gpu: example: use CommandEncoder.finish
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
143567e1c0
commit
e26a2858ed
1 changed files with 2 additions and 2 deletions
|
|
@ -211,12 +211,12 @@ fn frame(params: FrameParams) !void {
|
||||||
pass.end();
|
pass.end();
|
||||||
pass.release();
|
pass.release();
|
||||||
|
|
||||||
var commands = c.wgpuCommandEncoderFinish(@ptrCast(c.WGPUCommandEncoder, encoder.ptr), null);
|
var commands = encoder.finish(null);
|
||||||
encoder.release();
|
encoder.release();
|
||||||
|
|
||||||
const buf = gpu.CommandBuffer{ .ptr = &commands, .vtable = undefined };
|
const buf = gpu.CommandBuffer{ .ptr = &commands, .vtable = undefined };
|
||||||
params.queue.submit(1, &buf);
|
params.queue.submit(1, &buf);
|
||||||
c.wgpuCommandBufferRelease(commands);
|
commands.release();
|
||||||
pl.swap_chain.?.present();
|
pl.swap_chain.?.present();
|
||||||
back_buffer_view.release();
|
back_buffer_view.release();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue