gpu: implement Dawn deviceCreateSwapChain
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
163efbbad9
commit
556c917a08
1 changed files with 5 additions and 4 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue