From 348733867c5bf6f28cb4b0ae7719e9ac2a27bc25 Mon Sep 17 00:00:00 2001 From: alichraghi Date: Wed, 20 Jul 2022 21:04:45 +0430 Subject: [PATCH] gpu: use `refAllDeclsRecursive` to find and fix mistakes --- gpu/src/RenderBundle.zig | 4 ---- gpu/src/main.zig | 41 ++-------------------------------------- 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/gpu/src/RenderBundle.zig b/gpu/src/RenderBundle.zig index 82e00a3c..02a9365e 100644 --- a/gpu/src/RenderBundle.zig +++ b/gpu/src/RenderBundle.zig @@ -18,10 +18,6 @@ pub inline fn release(bundle: RenderBundle) void { bundle.vtable.release(bundle.ptr); } -pub inline fn setLabel(bundle: RenderBundle, label: [:0]const u8) void { - bundle.vtable.setLabel(bundle.ptr, label); -} - pub const Descriptor = struct { label: ?[*:0]const u8 = null, }; diff --git a/gpu/src/main.zig b/gpu/src/main.zig index 91919b38..b49bc5d5 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -52,7 +52,7 @@ pub const RequestAdapterResponse = Interface.RequestAdapterResponse; pub const Adapter = @import("Adapter.zig"); pub const RequestDeviceErrorCode = Adapter.RequestDeviceErrorCode; -pub const RequestDeviceError = Adapter.RequesatDeviceError; +pub const RequestDeviceError = Adapter.RequestDeviceError; pub const RequestDeviceCallback = Adapter.RequestDeviceCallback; pub const RequestDeviceResponse = Adapter.RequestDeviceResponse; @@ -155,42 +155,5 @@ const whole_map_size: u32 = std.math.maxInt(c_int); const whole_size: u64 = 0xffffffffffffffff; test { - // Root interface/implementations - _ = Interface; - _ = NativeInstance; - - // Interfaces - _ = Adapter; - _ = Device; - _ = Surface; - _ = Limits; - _ = Queue; - _ = CommandBuffer; - _ = ShaderModule; - _ = SwapChain; - _ = TextureView; - _ = Texture; - _ = Sampler; - _ = RenderPipeline; - _ = RenderPassEncoder; - _ = RenderBundleEncoder; - _ = RenderBundle; - _ = QuerySet; - _ = PipelineLayout; - _ = ExternalTexture; - _ = BindGroup; - _ = BindGroupLayout; - _ = Buffer; - _ = CommandEncoder; - _ = ComputePassEncoder; - _ = ComputePipeline; - - // Data structures ABI-compatible with webgpu.h - _ = Limits; - - // Data structures not ABI-compatible with webgpu.h - _ = MultisampleState; - - // Enumerations - _ = Feature; + std.testing.refAllDeclsRecursive(@This()); }