gpu: implement Dawn swapChainConfigure

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-30 19:16:35 -07:00 committed by Stephen Gutekanst
parent 57997bdb39
commit f168c21c43

View file

@ -1108,12 +1108,13 @@ pub const Interface = gpu.Interface(struct {
} }
pub inline fn swapChainConfigure(swap_chain: *gpu.SwapChain, format: gpu.Texture.Format, allowed_usage: gpu.Texture.UsageFlags, width: u32, height: u32) void { pub inline fn swapChainConfigure(swap_chain: *gpu.SwapChain, format: gpu.Texture.Format, allowed_usage: gpu.Texture.UsageFlags, width: u32, height: u32) void {
_ = swap_chain; procs.swapChainConfigure.?(
_ = format; @ptrCast(c.WGPUSwapChain, swap_chain),
_ = allowed_usage; @enumToInt(format),
_ = width; @bitCast(c.WGPUTextureUsageFlags, allowed_usage),
_ = height; width,
unreachable; height,
);
} }
pub inline fn swapChainGetCurrentTextureView(swap_chain: *gpu.SwapChain) *gpu.TextureView { pub inline fn swapChainGetCurrentTextureView(swap_chain: *gpu.SwapChain) *gpu.TextureView {