Skip to content

Commit

Permalink
revise comments
Browse files Browse the repository at this point in the history
  • Loading branch information
slimsag authored Oct 25, 2024
1 parent 6ac4b93 commit a105e00
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Core.zig
Original file line number Diff line number Diff line change
Expand Up @@ -355,19 +355,16 @@ pub fn deinit(entities: *mach.Entities.Mod, core: *Mod) !void {
}
}

// GPU backend (ie. d3d12, metal, opengl, vulkan)
//
// Must be released BEFORE platform deinit.
// Otherwise, we enter a race condition where GPU might try to present
// to the window server.
// GPU backend must be released BEFORE platform deinit, otherwise we may enter a race
// where the GPU might try to present to the window server.
state.swap_chain.release();
state.queue.release();
state.device.release();
state.surface.release();
state.adapter.release();
state.instance.release();

// Platform (ie. Windows, MacOS, Linux X11, or Wayland)
// Deinit the platform
state.platform.deinit();

state.events.deinit();
Expand Down

0 comments on commit a105e00

Please sign in to comment.