diff --git a/gpu/src/TODO b/gpu/src/TODO index c3a8fd8d..baa1f36d 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -99,16 +99,6 @@ typedef struct WGPUSupportedLimits { WGPULimits limits; } WGPUSupportedLimits; -typedef struct WGPUFragmentState { - WGPUChainedStruct const * nextInChain; - WGPUShaderModule module; - char const * entryPoint; - uint32_t constantCount; - WGPUConstantEntry const * constants; - uint32_t targetCount; - WGPUColorTargetState const * targets; -} WGPUFragmentState; - typedef struct WGPUExternalTextureBindingEntry { WGPUChainedStruct chain; WGPUExternalTexture externalTexture; diff --git a/gpu/src/main.zig b/gpu/src/main.zig index 6dd6b7be..4ae644a4 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -101,6 +101,7 @@ pub const RenderPassTimestampWrite = @import("structs.zig").RenderPassTimestampW pub const RenderPassDepthStencilAttachment = @import("structs.zig").RenderPassDepthStencilAttachment; pub const RenderPassColorAttachment = @import("structs.zig").RenderPassColorAttachment; pub const VertexState = @import("structs.zig").VertexState; +pub const FragmentState = @import("structs.zig").FragmentState; // Enumerations pub const Feature = @import("enums.zig").Feature; diff --git a/gpu/src/structs.zig b/gpu/src/structs.zig index 4d86a0d5..4d78925f 100644 --- a/gpu/src/structs.zig +++ b/gpu/src/structs.zig @@ -7,6 +7,7 @@ const ShaderModule = @import("ShaderModule.zig"); const QuerySet = @import("QuerySet.zig"); const StencilFaceState = @import("data.zig").StencilFaceState; const Color = @import("data.zig").Color; +const VertexBufferLayout = @import("data.zig").VertexBufferLayout; const CompilationMessageType = @import("enums.zig").CompilationMessageType; const PrimitiveTopology = @import("enums.zig").PrimitiveTopology; const IndexFormat = @import("enums.zig").IndexFormat; @@ -118,6 +119,13 @@ pub const VertexState = struct { buffers: []const VertexBufferLayout, }; +pub const FragmentState = struct { + module: ShaderModule, + entry_point: [*:0]const u8, + constants: []const ConstantEntry, + targets: []const ColorTargetState, +}; + test "syntax" { _ = CompilationMessage; _ = CompilationInfo; @@ -132,4 +140,5 @@ test "syntax" { _ = RenderPassDepthStencilAttachment; _ = RenderPassColorAttachment; _ = VertexState; + _ = FragmentState; }