gpu: add ColorTargetState

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 17:23:47 -07:00 committed by Stephen Gutekanst
parent 4aeea00409
commit d1bad15add
3 changed files with 9 additions and 7 deletions

View file

@ -87,13 +87,6 @@ typedef struct WGPUImageCopyTexture {
WGPUTextureAspect aspect;
} WGPUImageCopyTexture;
typedef struct WGPUColorTargetState {
WGPUChainedStruct const * nextInChain;
WGPUTextureFormat format;
WGPUBlendState const * blend;
WGPUColorWriteMaskFlags writeMask;
} WGPUColorTargetState;
typedef struct WGPUSupportedLimits {
WGPUChainedStructOut * nextInChain;
WGPULimits limits;

View file

@ -102,6 +102,7 @@ pub const RenderPassDepthStencilAttachment = @import("structs.zig").RenderPassDe
pub const RenderPassColorAttachment = @import("structs.zig").RenderPassColorAttachment;
pub const VertexState = @import("structs.zig").VertexState;
pub const FragmentState = @import("structs.zig").FragmentState;
pub const ColorTargetState = @import("structs.zig").ColorTargetState;
// Enumerations
pub const Feature = @import("enums.zig").Feature;

View file

@ -8,6 +8,7 @@ const QuerySet = @import("QuerySet.zig");
const StencilFaceState = @import("data.zig").StencilFaceState;
const Color = @import("data.zig").Color;
const VertexBufferLayout = @import("data.zig").VertexBufferLayout;
const BlendState = @import("data.zig").BlendState;
const CompilationMessageType = @import("enums.zig").CompilationMessageType;
const PrimitiveTopology = @import("enums.zig").PrimitiveTopology;
const IndexFormat = @import("enums.zig").IndexFormat;
@ -19,6 +20,7 @@ const ComputePassTimestampLocation = @import("enums.zig").ComputePassTimestampLo
const RenderPassTimestampLocation = @import("enums.zig").RenderPassTimestampLocation;
const LoadOp = @import("enums.zig").LoadOp;
const StoreOp = @import("enums.zig").StoreOp;
const ColorWriteMask = @import("enums.zig").ColorWriteMask;
pub const CompilationMessage = struct {
message: [:0]const u8,
@ -126,6 +128,12 @@ pub const FragmentState = struct {
targets: []const ColorTargetState,
};
pub const ColorTargetState = struct {
format: Texture.Format,
blend: *const BlendState,
write_mask: ColorWriteMask,
};
test "syntax" {
_ = CompilationMessage;
_ = CompilationInfo;