gpu: add BlendFactor enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
0685fea109
commit
7e8e2e921b
3 changed files with 20 additions and 23 deletions
23
gpu/src/TODO
23
gpu/src/TODO
|
|
@ -27,29 +27,6 @@ typedef struct WGPUSamplerImpl* WGPUSampler;
|
||||||
typedef struct WGPUTextureImpl* WGPUTexture;
|
typedef struct WGPUTextureImpl* WGPUTexture;
|
||||||
typedef struct WGPUTextureViewImpl* WGPUTextureView;
|
typedef struct WGPUTextureViewImpl* WGPUTextureView;
|
||||||
|
|
||||||
typedef enum WGPUAlphaMode {
|
|
||||||
WGPUAlphaMode_Premultiplied = 0x00000000,
|
|
||||||
WGPUAlphaMode_Unpremultiplied = 0x00000001,
|
|
||||||
WGPUAlphaMode_Force32 = 0x7FFFFFFF
|
|
||||||
} WGPUAlphaMode;
|
|
||||||
|
|
||||||
typedef enum WGPUBlendFactor {
|
|
||||||
WGPUBlendFactor_Zero = 0x00000000,
|
|
||||||
WGPUBlendFactor_One = 0x00000001,
|
|
||||||
WGPUBlendFactor_Src = 0x00000002,
|
|
||||||
WGPUBlendFactor_OneMinusSrc = 0x00000003,
|
|
||||||
WGPUBlendFactor_SrcAlpha = 0x00000004,
|
|
||||||
WGPUBlendFactor_OneMinusSrcAlpha = 0x00000005,
|
|
||||||
WGPUBlendFactor_Dst = 0x00000006,
|
|
||||||
WGPUBlendFactor_OneMinusDst = 0x00000007,
|
|
||||||
WGPUBlendFactor_DstAlpha = 0x00000008,
|
|
||||||
WGPUBlendFactor_OneMinusDstAlpha = 0x00000009,
|
|
||||||
WGPUBlendFactor_SrcAlphaSaturated = 0x0000000A,
|
|
||||||
WGPUBlendFactor_Constant = 0x0000000B,
|
|
||||||
WGPUBlendFactor_OneMinusConstant = 0x0000000C,
|
|
||||||
WGPUBlendFactor_Force32 = 0x7FFFFFFF
|
|
||||||
} WGPUBlendFactor;
|
|
||||||
|
|
||||||
typedef enum WGPUBlendOperation {
|
typedef enum WGPUBlendOperation {
|
||||||
WGPUBlendOperation_Add = 0x00000000,
|
WGPUBlendOperation_Add = 0x00000000,
|
||||||
WGPUBlendOperation_Subtract = 0x00000001,
|
WGPUBlendOperation_Subtract = 0x00000001,
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,22 @@ pub const AlphaMode = enum(u32) {
|
||||||
unpremultiplied = 0x00000001,
|
unpremultiplied = 0x00000001,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const BlendFactor = enum(u32) {
|
||||||
|
Zero = 0x00000000,
|
||||||
|
One = 0x00000001,
|
||||||
|
Src = 0x00000002,
|
||||||
|
OneMinusSrc = 0x00000003,
|
||||||
|
SrcAlpha = 0x00000004,
|
||||||
|
OneMinusSrcAlpha = 0x00000005,
|
||||||
|
Dst = 0x00000006,
|
||||||
|
OneMinusDst = 0x00000007,
|
||||||
|
DstAlpha = 0x00000008,
|
||||||
|
OneMinusDstAlpha = 0x00000009,
|
||||||
|
SrcAlphaSaturated = 0x0000000A,
|
||||||
|
Constant = 0x0000000B,
|
||||||
|
OneMinusConstant = 0x0000000C,
|
||||||
|
};
|
||||||
|
|
||||||
test "name" {
|
test "name" {
|
||||||
try std.testing.expect(std.mem.eql(u8, @tagName(Feature.timestamp_query), "timestamp_query"));
|
try std.testing.expect(std.mem.eql(u8, @tagName(Feature.timestamp_query), "timestamp_query"));
|
||||||
}
|
}
|
||||||
|
|
@ -151,4 +167,6 @@ test "syntax" {
|
||||||
_ = Feature;
|
_ = Feature;
|
||||||
_ = AddressMode;
|
_ = AddressMode;
|
||||||
_ = PresentMode;
|
_ = PresentMode;
|
||||||
|
_ = AlphaMode;
|
||||||
|
_ = BlendFactor;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,8 @@ pub const TextureUsage = @import("enums.zig").TextureUsage;
|
||||||
pub const TextureFormat = @import("enums.zig").TextureFormat;
|
pub const TextureFormat = @import("enums.zig").TextureFormat;
|
||||||
pub const PresentMode = @import("enums.zig").PresentMode;
|
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 BlendFactor = @import("enums.zig").BlendFactor;
|
||||||
|
|
||||||
test "syntax" {
|
test "syntax" {
|
||||||
_ = Interface;
|
_ = Interface;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue