gpu: internalize Texture types

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-30 00:10:38 -07:00 committed by Stephen Gutekanst
parent 0dae027602
commit cccfef52f9
10 changed files with 221 additions and 232 deletions

View file

@ -1,8 +1,6 @@
const ChainedStruct = @import("types.zig").ChainedStruct;
const PresentMode = @import("types.zig").PresentMode;
const Texture = @import("texture.zig").Texture;
const TextureUsageFlags = @import("texture.zig").TextureUsageFlags;
const TextureFormat = @import("texture.zig").TextureFormat;
const TextureView = @import("texture_view.zig").TextureView;
const Impl = @import("interface.zig").Impl;
@ -10,8 +8,8 @@ pub const SwapChain = opaque {
pub const Descriptor = extern struct {
next_in_chain: ?*const ChainedStruct = null,
label: ?[*:0]const u8 = null,
usage: TextureUsageFlags,
format: TextureFormat,
usage: Texture.UsageFlags,
format: Texture.Format,
width: u32,
height: u32,
present_mode: PresentMode,
@ -19,7 +17,7 @@ pub const SwapChain = opaque {
implementation: u64 = 0,
};
pub inline fn configure(swap_chain: *SwapChain, format: TextureFormat, allowed_usage: TextureUsageFlags, width: u32, height: u32) void {
pub inline fn configure(swap_chain: *SwapChain, format: Texture.Format, allowed_usage: Texture.UsageFlags, width: u32, height: u32) void {
Impl.swapChainConfigure(swap_chain, format, allowed_usage, width, height);
}