{gfx,examples}: use core.state().queue

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-04-21 22:57:40 -07:00 committed by Stephen Gutekanst
parent 68677b3448
commit 431e0dbbe1
6 changed files with 6 additions and 6 deletions

View file

@ -101,7 +101,7 @@ fn tick(core: *mach.Core.Mod, game: *Mod) !void {
// Submit our commands to the queue
var command = encoder.finish(&.{ .label = label });
defer command.release();
mach.core.queue.submit(&[_]*gpu.CommandBuffer{command});
core.state().queue.submit(&[_]*gpu.CommandBuffer{command});
// Present the frame
mach.core.swap_chain.present();

View file

@ -235,7 +235,7 @@ fn endFrame(game: *Mod, core: *mach.Core.Mod) !void {
var command = game.state().frame_encoder.finish(&.{ .label = label });
game.state().frame_encoder.release();
defer command.release();
mach.core.queue.submit(&[_]*gpu.CommandBuffer{command});
core.state().queue.submit(&[_]*gpu.CommandBuffer{command});
// Present the frame
mach.core.swap_chain.present();

View file

@ -219,7 +219,7 @@ fn endFrame(game: *Mod, core: *mach.Core.Mod) !void {
var command = game.state().frame_encoder.finish(&.{ .label = label });
game.state().frame_encoder.release();
defer command.release();
mach.core.queue.submit(&[_]*gpu.CommandBuffer{command});
core.state().queue.submit(&[_]*gpu.CommandBuffer{command});
// Present the frame
mach.core.swap_chain.present();

View file

@ -265,7 +265,7 @@ fn endFrame(game: *Mod, text: *gfx.Text.Mod, core: *mach.Core.Mod) !void {
var command = game.state().frame_encoder.finish(&.{ .label = label });
game.state().frame_encoder.release();
defer command.release();
mach.core.queue.submit(&[_]*gpu.CommandBuffer{command});
core.state().queue.submit(&[_]*gpu.CommandBuffer{command});
// Present the frame
mach.core.swap_chain.present();