diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 98bb88bc..a364e07d 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,10 +1,3 @@ -typedef struct WGPUPipelineLayoutDescriptor { - next_in_chain: *const ChainedStruct, - label: ?[*:0]const u8 = null, - uint32_t bindGroupLayoutCount; - WGPUBindGroupLayout const * bindGroupLayouts; -} WGPUPipelineLayoutDescriptor; - typedef struct WGPUPrimitiveDepthClampingState { WGPUChainedStruct chain; clamp_depth: bool, diff --git a/gpu/src/external_texture.zig b/gpu/src/external_texture.zig index daac3d13..3a3f4237 100644 --- a/gpu/src/external_texture.zig +++ b/gpu/src/external_texture.zig @@ -1,5 +1,5 @@ -pub const ChainedStruct = @import("types.zig").ChainedStruct; -pub const TextureView = @import("texture_view.zig").TextureView; +const ChainedStruct = @import("types.zig").ChainedStruct; +const TextureView = @import("texture_view.zig").TextureView; pub const ExternalTexture = enum(usize) { _, diff --git a/gpu/src/instance.zig b/gpu/src/instance.zig index dfa1851b..96fd43dd 100644 --- a/gpu/src/instance.zig +++ b/gpu/src/instance.zig @@ -1,4 +1,4 @@ -pub const ChainedStruct = @import("types.zig").ChainedStruct; +const ChainedStruct = @import("types.zig").ChainedStruct; pub const Instance = enum(usize) { _, diff --git a/gpu/src/pipeline_layout.zig b/gpu/src/pipeline_layout.zig index c6fb10b9..269f75ba 100644 --- a/gpu/src/pipeline_layout.zig +++ b/gpu/src/pipeline_layout.zig @@ -1,6 +1,16 @@ +const ChainedStruct = @import("types.zig").ChainedStruct; +const BindGroupLayout = @import("bind_group_layout.zig").BindGroupLayout; + pub const PipelineLayout = enum(usize) { _, // TODO: verify there is a use case for nullable value of this type. pub const none: PipelineLayout = @intToEnum(PipelineLayout, 0); + + pub const Descriptor = extern struct { + next_in_chain: *const ChainedStruct, + label: ?[*:0]const u8 = null, + bind_group_layout_count: u32, + bind_group_layouts: [*]const BindGroupLayout, + }; };