add new win32 platform implementation (#1224)

* Buffer resources from swap chain were not being released.
* sysgpu Texture.getWidth() should return width not height.
* d3d12: Fixing issues with d3d12 on sysgpu.
* Initial win32 platform
This commit is contained in:
Hordur Johannsson 2024-07-13 22:33:45 +00:00 committed by GitHub
parent 3fa889b136
commit c32e763e11
Failed to generate hash of commit
12 changed files with 3329 additions and 18 deletions

View file

@ -16,6 +16,7 @@ const Platform = switch (build_options.core_platform) {
.x11 => @import("core/X11.zig"),
.wayland => @import("core/Wayland.zig"),
.web => @panic("TODO: revive wasm backend"),
.win32 => @import("core/win32.zig"),
};
// TODO(important): mach.core has a lot of standard Zig APIs, and some global variables, which are
@ -242,8 +243,10 @@ pub inline fn deinit(entities: *mach.Entities.Mod, core: *Mod) !void {
if (builtin.os.tag == .linux and
state.linux_gamemode != null and
state.linux_gamemode.?)
{
deinitLinuxGamemode();
}
state.platform.deinit();
state.swap_chain.release();
state.queue.release();