gpu: add BlendState
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
1069889ea6
commit
d70f5695b6
3 changed files with 13 additions and 12 deletions
|
|
@ -392,11 +392,6 @@ typedef struct WGPURenderPassDepthStencilAttachment {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct WGPUBlendState {
|
|
||||||
WGPUBlendComponent color;
|
|
||||||
WGPUBlendComponent alpha;
|
|
||||||
} WGPUBlendState;
|
|
||||||
|
|
||||||
typedef struct WGPURenderPassColorAttachment {
|
typedef struct WGPURenderPassColorAttachment {
|
||||||
WGPUTextureView view;
|
WGPUTextureView view;
|
||||||
WGPUTextureView resolveTarget;
|
WGPUTextureView resolveTarget;
|
||||||
|
|
|
||||||
|
|
@ -76,12 +76,13 @@ pub const ComputePipeline = @import("ComputePipeline.zig");
|
||||||
|
|
||||||
// Data structures
|
// Data structures
|
||||||
pub const Limits = @import("structs.zig").Limits;
|
pub const Limits = @import("structs.zig").Limits;
|
||||||
pub const BlendComponent = @import("structs.zig").BlendComponent;
|
|
||||||
pub const Color = @import("structs.zig").Color;
|
pub const Color = @import("structs.zig").Color;
|
||||||
pub const Extent3D = @import("structs.zig").Extent3D;
|
pub const Extent3D = @import("structs.zig").Extent3D;
|
||||||
pub const Origin3D = @import("structs.zig").Origin3D;
|
pub const Origin3D = @import("structs.zig").Origin3D;
|
||||||
pub const StencilFaceState = @import("structs.zig").StencilFaceState;
|
pub const StencilFaceState = @import("structs.zig").StencilFaceState;
|
||||||
pub const VertexAttribute = @import("structs.zig").VertexAttribute;
|
pub const VertexAttribute = @import("structs.zig").VertexAttribute;
|
||||||
|
pub const BlendComponent = @import("structs.zig").BlendComponent;
|
||||||
|
pub const BlendState = @import("structs.zig").BlendState;
|
||||||
|
|
||||||
// Enumerations
|
// Enumerations
|
||||||
pub const Feature = @import("enums.zig").Feature;
|
pub const Feature = @import("enums.zig").Feature;
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,6 @@ pub const Limits = extern struct {
|
||||||
max_compute_workgroups_per_dimension: u32,
|
max_compute_workgroups_per_dimension: u32,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendComponent = extern struct {
|
|
||||||
operation: BlendOperation,
|
|
||||||
src_factor: BlendFactor,
|
|
||||||
dst_factor: BlendFactor,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const Color = extern struct {
|
pub const Color = extern struct {
|
||||||
r: f64,
|
r: f64,
|
||||||
g: f64,
|
g: f64,
|
||||||
|
|
@ -70,3 +64,14 @@ pub const VertexAttribute = extern struct {
|
||||||
offset: u64,
|
offset: u64,
|
||||||
shader_location: u32,
|
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,
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue