gpu: implement Dawn textureCreateView

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-30 19:19:23 -07:00 committed by Stephen Gutekanst
parent f168c21c43
commit f6e1c473fa

View file

@ -1118,13 +1118,11 @@ pub const Interface = gpu.Interface(struct {
}
pub inline fn swapChainGetCurrentTextureView(swap_chain: *gpu.SwapChain) *gpu.TextureView {
_ = swap_chain;
unreachable;
return @ptrCast(*gpu.TextureView, procs.swapChainGetCurrentTextureView.?(@ptrCast(c.WGPUSwapChain, swap_chain)));
}
pub inline fn swapChainPresent(swap_chain: *gpu.SwapChain) void {
_ = swap_chain;
unreachable;
procs.swapChainPresent.?(@ptrCast(c.WGPUSwapChain, swap_chain));
}
pub inline fn swapChainReference(swap_chain: *gpu.SwapChain) void {
@ -1136,9 +1134,10 @@ pub const Interface = gpu.Interface(struct {
}
pub inline fn textureCreateView(texture: *gpu.Texture, descriptor: ?*const gpu.TextureView.Descriptor) *gpu.TextureView {
_ = texture;
_ = descriptor;
unreachable;
return @ptrCast(*gpu.TextureView, procs.textureCreateView.?(
@ptrCast(c.WGPUTexture, texture),
@ptrCast(*const c.WGPUTextureViewDescriptor, descriptor),
));
}
pub inline fn textureDestroy(texture: *gpu.Texture) void {