From f168c21c434751c515527b5e14504a8fee888849 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 30 Jul 2022 19:16:35 -0700 Subject: [PATCH] gpu: implement Dawn swapChainConfigure Signed-off-by: Stephen Gutekanst --- gpu/src/dawn_impl.zig | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gpu/src/dawn_impl.zig b/gpu/src/dawn_impl.zig index e5fec6ed..fb934002 100644 --- a/gpu/src/dawn_impl.zig +++ b/gpu/src/dawn_impl.zig @@ -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 { - _ = swap_chain; - _ = format; - _ = allowed_usage; - _ = width; - _ = height; - unreachable; + procs.swapChainConfigure.?( + @ptrCast(c.WGPUSwapChain, swap_chain), + @enumToInt(format), + @bitCast(c.WGPUTextureUsageFlags, allowed_usage), + width, + height, + ); } pub inline fn swapChainGetCurrentTextureView(swap_chain: *gpu.SwapChain) *gpu.TextureView {