gpu: add BlendOperation enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
7e8e2e921b
commit
ce0389df23
3 changed files with 23 additions and 22 deletions
|
|
@ -27,15 +27,6 @@ typedef struct WGPUSamplerImpl* WGPUSampler;
|
||||||
typedef struct WGPUTextureImpl* WGPUTexture;
|
typedef struct WGPUTextureImpl* WGPUTexture;
|
||||||
typedef struct WGPUTextureViewImpl* WGPUTextureView;
|
typedef struct WGPUTextureViewImpl* WGPUTextureView;
|
||||||
|
|
||||||
typedef enum WGPUBlendOperation {
|
|
||||||
WGPUBlendOperation_Add = 0x00000000,
|
|
||||||
WGPUBlendOperation_Subtract = 0x00000001,
|
|
||||||
WGPUBlendOperation_ReverseSubtract = 0x00000002,
|
|
||||||
WGPUBlendOperation_Min = 0x00000003,
|
|
||||||
WGPUBlendOperation_Max = 0x00000004,
|
|
||||||
WGPUBlendOperation_Force32 = 0x7FFFFFFF
|
|
||||||
} WGPUBlendOperation;
|
|
||||||
|
|
||||||
typedef enum WGPUBufferBindingType {
|
typedef enum WGPUBufferBindingType {
|
||||||
WGPUBufferBindingType_Undefined = 0x00000000,
|
WGPUBufferBindingType_Undefined = 0x00000000,
|
||||||
WGPUBufferBindingType_Uniform = 0x00000001,
|
WGPUBufferBindingType_Uniform = 0x00000001,
|
||||||
|
|
|
||||||
|
|
@ -144,19 +144,27 @@ pub const AlphaMode = enum(u32) {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const BlendFactor = enum(u32) {
|
pub const BlendFactor = enum(u32) {
|
||||||
Zero = 0x00000000,
|
zero = 0x00000000,
|
||||||
One = 0x00000001,
|
one = 0x00000001,
|
||||||
Src = 0x00000002,
|
src = 0x00000002,
|
||||||
OneMinusSrc = 0x00000003,
|
one_minus_src = 0x00000003,
|
||||||
SrcAlpha = 0x00000004,
|
src_alpha = 0x00000004,
|
||||||
OneMinusSrcAlpha = 0x00000005,
|
oneMinusSrcAlpha = 0x00000005,
|
||||||
Dst = 0x00000006,
|
dst = 0x00000006,
|
||||||
OneMinusDst = 0x00000007,
|
one_minus_dst = 0x00000007,
|
||||||
DstAlpha = 0x00000008,
|
dst_alpha = 0x00000008,
|
||||||
OneMinusDstAlpha = 0x00000009,
|
one_minus_dst_alpha = 0x00000009,
|
||||||
SrcAlphaSaturated = 0x0000000A,
|
src_alpha_saturated = 0x0000000A,
|
||||||
Constant = 0x0000000B,
|
constant = 0x0000000B,
|
||||||
OneMinusConstant = 0x0000000C,
|
one_minus_constant = 0x0000000C,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub const BlendOperation = enum(u32) {
|
||||||
|
add = 0x00000000,
|
||||||
|
subtract = 0x00000001,
|
||||||
|
reverse_subtract = 0x00000002,
|
||||||
|
min = 0x00000003,
|
||||||
|
max = 0x00000004,
|
||||||
};
|
};
|
||||||
|
|
||||||
test "name" {
|
test "name" {
|
||||||
|
|
@ -169,4 +177,5 @@ test "syntax" {
|
||||||
_ = PresentMode;
|
_ = PresentMode;
|
||||||
_ = AlphaMode;
|
_ = AlphaMode;
|
||||||
_ = BlendFactor;
|
_ = BlendFactor;
|
||||||
|
_ = BlendOperation;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ pub const PresentMode = @import("enums.zig").PresentMode;
|
||||||
pub const AddressMode = @import("enums.zig").AddressMode;
|
pub const AddressMode = @import("enums.zig").AddressMode;
|
||||||
pub const AlphaMode = @import("enums.zig").AlphaMode;
|
pub const AlphaMode = @import("enums.zig").AlphaMode;
|
||||||
pub const BlendFactor = @import("enums.zig").BlendFactor;
|
pub const BlendFactor = @import("enums.zig").BlendFactor;
|
||||||
|
pub const BlendOperation = @import("enums.zig").BlendOperation;
|
||||||
|
|
||||||
test "syntax" {
|
test "syntax" {
|
||||||
_ = Interface;
|
_ = Interface;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue