From dbac3c325a6c126e8c44b7d0be377ff5f220974b Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 30 Jul 2022 17:21:29 -0700 Subject: [PATCH] gpu: implement Dawn textureGetUsage Signed-off-by: Stephen Gutekanst --- gpu/src/dawn_impl.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gpu/src/dawn_impl.zig b/gpu/src/dawn_impl.zig index 9a30c4c4..c05164ae 100644 --- a/gpu/src/dawn_impl.zig +++ b/gpu/src/dawn_impl.zig @@ -1129,8 +1129,9 @@ pub const Interface = gpu.Interface(struct { } pub inline fn textureGetUsage(texture: *gpu.Texture) gpu.Texture.UsageFlags { - _ = texture; - unreachable; + return @bitCast(gpu.Texture.UsageFlags, procs.textureGetUsage.?( + @ptrCast(c.WGPUTexture, texture), + )); } pub inline fn textureGetWidth(texture: *gpu.Texture) u32 {