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 { pub inline fn deviceCreateSwapChain(device: *gpu.Device, surface: ?*gpu.Surface, descriptor: *const gpu.SwapChain.Descriptor) *gpu.SwapChain {
_ = device; return @ptrCast(*gpu.SwapChain, procs.deviceCreateSwapChain.?(
_ = surface; @ptrCast(c.WGPUDevice, device),
_ = descriptor; @ptrCast(c.WGPUSurface, surface),
unreachable; @ptrCast(*const c.WGPUSwapChainDescriptor, descriptor),
));
} }
pub inline fn deviceCreateTexture(device: *gpu.Device, descriptor: *const gpu.Texture.Descriptor) *gpu.Texture { pub inline fn deviceCreateTexture(device: *gpu.Device, descriptor: *const gpu.Texture.Descriptor) *gpu.Texture {