gpu: add BlendState

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 15:00:42 -07:00 committed by Stephen Gutekanst
parent 1069889ea6
commit d70f5695b6
3 changed files with 13 additions and 12 deletions

View file

@ -392,11 +392,6 @@ typedef struct WGPURenderPassDepthStencilAttachment {
typedef struct WGPUBlendState {
WGPUBlendComponent color;
WGPUBlendComponent alpha;
} WGPUBlendState;
typedef struct WGPURenderPassColorAttachment {
WGPUTextureView view;
WGPUTextureView resolveTarget;

View file

@ -76,12 +76,13 @@ pub const ComputePipeline = @import("ComputePipeline.zig");
// Data structures
pub const Limits = @import("structs.zig").Limits;
pub const BlendComponent = @import("structs.zig").BlendComponent;
pub const Color = @import("structs.zig").Color;
pub const Extent3D = @import("structs.zig").Extent3D;
pub const Origin3D = @import("structs.zig").Origin3D;
pub const StencilFaceState = @import("structs.zig").StencilFaceState;
pub const VertexAttribute = @import("structs.zig").VertexAttribute;
pub const BlendComponent = @import("structs.zig").BlendComponent;
pub const BlendState = @import("structs.zig").BlendState;
// Enumerations
pub const Feature = @import("enums.zig").Feature;

View file

@ -33,12 +33,6 @@ pub const Limits = extern struct {
max_compute_workgroups_per_dimension: u32,
};
pub const BlendComponent = extern struct {
operation: BlendOperation,
src_factor: BlendFactor,
dst_factor: BlendFactor,
};
pub const Color = extern struct {
r: f64,
g: f64,
@ -70,3 +64,14 @@ pub const VertexAttribute = extern struct {
offset: u64,
shader_location: u32,
};
pub const BlendComponent = extern struct {
operation: BlendOperation,
src_factor: BlendFactor,
dst_factor: BlendFactor,
};
pub const BlendState = extern struct {
color: BlendComponent,
alpha: BlendComponent,
};