gpu: add PrimitiveState
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
a6be646b94
commit
e2ed25babc
3 changed files with 14 additions and 8 deletions
|
|
@ -204,14 +204,6 @@ typedef struct WGPUCopyTextureForBrowserOptions {
|
|||
WGPUAlphaMode dstAlphaMode;
|
||||
} WGPUCopyTextureForBrowserOptions;
|
||||
|
||||
typedef struct WGPUPrimitiveState {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUPrimitiveTopology topology;
|
||||
WGPUIndexFormat stripIndexFormat;
|
||||
WGPUFrontFace frontFace;
|
||||
WGPUCullMode cullMode;
|
||||
} WGPUPrimitiveState;
|
||||
|
||||
typedef struct WGPUSamplerBindingLayout {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUSamplerBindingType type;
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ pub const BindGroupEntry = @import("structs.zig").BindGroupEntry;
|
|||
pub const BufferBindingLayout = @import("structs.zig").BufferBindingLayout;
|
||||
pub const CompilationMessage = @import("structs.zig").CompilationMessage;
|
||||
pub const MultisampleState = @import("structs.zig").MultisampleState;
|
||||
pub const PrimitiveState = @import("structs.zig").PrimitiveState;
|
||||
|
||||
// Enumerations
|
||||
pub const Feature = @import("enums.zig").Feature;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ const Sampler = @import("Sampler.zig");
|
|||
const TextureView = @import("TextureView.zig");
|
||||
const BufferBindingType = @import("enums.zig").BufferBindingType;
|
||||
const CompilationMessageType = @import("enums.zig").CompilationMessageType;
|
||||
const PrimitiveTopology = @import("enums.zig").PrimitiveTopology;
|
||||
const IndexFormat = @import("enums.zig").IndexFormat;
|
||||
const FrontFace = @import("enums.zig").FrontFace;
|
||||
const CullMode = @import("enums.zig").CullMode;
|
||||
|
||||
pub const BindGroupEntry = struct {
|
||||
binding: u32,
|
||||
|
|
@ -35,8 +39,17 @@ pub const MultisampleState = struct {
|
|||
alpha_to_coverage_enabled: bool,
|
||||
};
|
||||
|
||||
pub const PrimitiveState = struct {
|
||||
topology: PrimitiveTopology,
|
||||
strip_index_format: IndexFormat,
|
||||
front_face: FrontFace,
|
||||
cull_mode: CullMode,
|
||||
};
|
||||
|
||||
test "syntax" {
|
||||
_ = BindGroupEntry;
|
||||
_ = BufferBindingLayout;
|
||||
_ = CompilationMessage;
|
||||
_ = MultisampleState;
|
||||
_ = PrimitiveState;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue