gpu: implement Dawn deviceCreateSwapChain

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-30 17:20:01 -07:00 committed by Stephen Gutekanst
parent 163efbbad9
commit 556c917a08

View file

@ -504,10 +504,11 @@ pub const Interface = gpu.Interface(struct {
}
pub inline fn deviceCreateSwapChain(device: *gpu.Device, surface: ?*gpu.Surface, descriptor: *const gpu.SwapChain.Descriptor) *gpu.SwapChain {
_ = device;
_ = surface;
_ = descriptor;
unreachable;
return @ptrCast(*gpu.SwapChain, procs.deviceCreateSwapChain.?(
@ptrCast(c.WGPUDevice, device),
@ptrCast(c.WGPUSurface, surface),
@ptrCast(*const c.WGPUSwapChainDescriptor, descriptor),
));
}
pub inline fn deviceCreateTexture(device: *gpu.Device, descriptor: *const gpu.Texture.Descriptor) *gpu.Texture {