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 {
_ = 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 {