examples: glyphs: slightly improve release() logic

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-05-07 22:42:22 -07:00 committed by Stephen Gutekanst
parent d8e0787c7e
commit 786d0d50b1

View file

@ -241,8 +241,8 @@ fn endFrame(game: *Mod, core: *mach.Core.Mod) !void {
game.state().frame_render_pass.end();
const label = @tagName(name) ++ ".endFrame";
var command = game.state().frame_encoder.finish(&.{ .label = label });
defer command.release();
core.state().queue.submit(&[_]*gpu.CommandBuffer{command});
command.release();
game.state().frame_encoder.release();
game.state().frame_render_pass.release();