core: cleanup sysgpu feature flag logic

* `@import("mach").core.gpu` has been renamed to `@import("mach").gpu`
* `pub const SYSGPUInterface` now has a default value (i.e. you do not need to write it in your main.zig, if you were.)
* You can now check `if (comptime mach.use_sysgpu)` for any conditional code you might have that should only run with sysgpu.

This (old):

```
pub const mach_core_options = core.ComptimeOptions{
    .use_wgpu = false,
    .use_sysgpu = true,
};
```

Has been replaced by this:

```
pub const use_sysgpu = true;
```

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-04-19 20:48:33 -07:00
parent 6a2358baf8
commit 7a1efdaa69
32 changed files with 85 additions and 132 deletions

View file

@ -24,10 +24,8 @@ bind_group: *gpu.BindGroup,
pub const App = @This();
pub const mach_core_options = core.ComptimeOptions{
.use_wgpu = false,
.use_sysgpu = true,
};
// Use experimental sysgpu graphics API
pub const use_sysgpu = true;
pub fn init(app: *App) !void {
try core.init(.{});