diff --git a/gpu/src/Buffer.zig b/gpu/src/Buffer.zig index e9460e11..b3a368d5 100644 --- a/gpu/src/Buffer.zig +++ b/gpu/src/Buffer.zig @@ -1,3 +1,5 @@ +const BufferUsage = @import("enums.zig").BufferUsage; + const Buffer = @This(); /// The type erased pointer to the Buffer implementation @@ -33,10 +35,18 @@ pub inline fn setLabel(buf: Buffer, label: [:0]const u8) void { buf.vtable.setLabel(buf.ptr, label); } +pub const Descriptor = struct { + label: ?[*:0]const u8 = null, + usage: BufferUsage, + size: usize, + mapped_at_creation: bool, +}; + test "syntax" { _ = VTable; _ = reference; _ = release; _ = destroy; _ = setLabel; + _ = Descriptor; } diff --git a/gpu/src/TODO b/gpu/src/TODO index 3877ad43..f3aba88d 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -40,14 +40,6 @@ typedef struct WGPUChainedStructOut { -typedef struct WGPUBufferDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUBufferUsageFlags usage; - uint64_t size; - bool mappedAtCreation; -} WGPUBufferDescriptor; - typedef struct WGPUCommandBufferDescriptor { WGPUChainedStruct const * nextInChain; char const * label;