From 5cc96a4b8eb353bf7c61fcdc9a5503926beabb12 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 30 Jul 2022 17:20:32 -0700 Subject: [PATCH] gpu: implement Dawn deviceCreateTexture Signed-off-by: Stephen Gutekanst --- gpu/src/dawn_impl.zig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gpu/src/dawn_impl.zig b/gpu/src/dawn_impl.zig index 63b8211a..9a30c4c4 100644 --- a/gpu/src/dawn_impl.zig +++ b/gpu/src/dawn_impl.zig @@ -512,9 +512,10 @@ pub const Interface = gpu.Interface(struct { } pub inline fn deviceCreateTexture(device: *gpu.Device, descriptor: *const gpu.Texture.Descriptor) *gpu.Texture { - _ = device; - _ = descriptor; - unreachable; + return @ptrCast(*gpu.Texture, procs.deviceCreateTexture.?( + @ptrCast(c.WGPUDevice, device), + @ptrCast(*const c.WGPUTextureDescriptor, descriptor), + )); } pub inline fn deviceDestroy(device: *gpu.Device) void {