diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 181cf7f4..4020f302 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,8 +1,3 @@ -pub const WGPUSurfaceDescriptor = extern struct { - next_in_chain: *const ChainedStruct, - label: ?[*:0]const u8 = null, -}; - pub const WGPUSurfaceDescriptorFromAndroidNativeWindow = extern struct { chain: ChainedStruct, window: *anyopaque, diff --git a/gpu/src/surface.zig b/gpu/src/surface.zig index b1691e2a..120f50aa 100644 --- a/gpu/src/surface.zig +++ b/gpu/src/surface.zig @@ -1,6 +1,13 @@ +const ChainedStruct = @import("types.zig").ChainedStruct; + pub const Surface = enum(usize) { _, // TODO: verify there is a use case for nullable value of this type. pub const none: Surface = @intToEnum(Surface, 0); + + pub const Descriptor = extern struct { + next_in_chain: *const ChainedStruct, + label: ?[*:0]const u8 = null, + }; };