diff --git a/gpu/src/TODO b/gpu/src/TODO index 5c6133dd..186af099 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -107,12 +107,6 @@ typedef struct WGPURenderPipelineDescriptor { -typedef struct WGPUConstantEntry { - WGPUChainedStruct const * nextInChain; - char const * key; - double value; -} WGPUConstantEntry; - // TODO: Dawn-specific? typedef struct WGPUCopyTextureForBrowserOptions { WGPUChainedStruct const * nextInChain; diff --git a/gpu/src/main.zig b/gpu/src/main.zig index adca6fc4..69da5914 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -94,6 +94,7 @@ pub const MultisampleState = @import("structs.zig").MultisampleState; pub const PrimitiveState = @import("structs.zig").PrimitiveState; pub const StorageTextureBindingLayout = @import("structs.zig").StorageTextureBindingLayout; pub const DepthStencilState = @import("structs.zig").DepthStencilState; +pub const ConstantEntry = @import("structs.zig").ConstantEntry; pub const ProgrammableStageDescriptor = @import("structs.zig").ProgrammableStageDescriptor; // Enumerations diff --git a/gpu/src/structs.zig b/gpu/src/structs.zig index 8385547c..f0a3d14c 100644 --- a/gpu/src/structs.zig +++ b/gpu/src/structs.zig @@ -57,6 +57,12 @@ pub const DepthStencilState = struct { depth_bias_clamp: f32, }; +// TODO: how does this map to browser API? +pub const ConstantEntry = struct { + key: [*:0]const u8, + value: f64, +}; + pub const ProgrammableStageDescriptor = struct { label: ?[*:0]const u8 = null, module: ShaderModule, @@ -71,5 +77,6 @@ test "syntax" { _ = PrimitiveState; _ = StorageTextureBindingLayout; _ = DepthStencilState; + _ = ConstantEntry; _ = ProgrammableStageDescriptor; }