From c8e9ade16c28122678679398f3e49e7c5d1cf1fb Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 30 Jul 2022 17:14:30 -0700 Subject: [PATCH] gpu: implement Dawn deviceCreateExternalTexture 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 65a05dd4..ab52ef8f 100644 --- a/gpu/src/dawn_impl.zig +++ b/gpu/src/dawn_impl.zig @@ -447,9 +447,10 @@ pub const Interface = gpu.Interface(struct { } pub inline fn deviceCreateExternalTexture(device: *gpu.Device, external_texture_descriptor: *const gpu.ExternalTexture.Descriptor) *gpu.ExternalTexture { - _ = device; - _ = external_texture_descriptor; - unreachable; + return @ptrCast(*gpu.ExternalTexture, procs.deviceCreateExternalTexture.?( + @ptrCast(c.WGPUDevice, device), + @ptrCast(*const c.WGPUExternalTextureDescriptor, external_texture_descriptor), + )); } pub inline fn deviceCreatePipelineLayout(device: *gpu.Device, pipeline_layout_descriptor: *const gpu.PipelineLayout.Descriptor) *gpu.PipelineLayout {