gpu: add AlphaMode enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
4163005eb5
commit
8ca3d666a3
3 changed files with 7 additions and 6 deletions
|
|
@ -1,11 +1,5 @@
|
|||
typedef uint32_t WGPUFlags;
|
||||
|
||||
typedef enum WGPUAlphaMode {
|
||||
WGPUAlphaMode_Premultiplied = 0x00000000,
|
||||
WGPUAlphaMode_Unpremultiplied = 0x00000001,
|
||||
WGPUAlphaMode_Force32 = 0x7FFFFFFF
|
||||
} WGPUAlphaMode;
|
||||
|
||||
typedef enum WGPUBackendType {
|
||||
WGPUBackendType_Null = 0x00000000,
|
||||
WGPUBackendType_WebGPU = 0x00000001,
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ pub const SwapChain = @import("SwapChain.zig");
|
|||
pub const Texture = @import("Texture.zig");
|
||||
pub const TextureView = @import("TextureView.zig");
|
||||
|
||||
pub const AlphaMode = @import("types.zig").AlphaMode;
|
||||
|
||||
test {
|
||||
refAllDecls(@import("Adapter.zig"));
|
||||
refAllDecls(@import("BindGroup.zig"));
|
||||
|
|
@ -59,6 +61,7 @@ test {
|
|||
refAllDecls(@import("SwapChain.zig"));
|
||||
refAllDecls(@import("Texture.zig"));
|
||||
refAllDecls(@import("TextureView.zig"));
|
||||
refAllDecls(@import("types.zig"));
|
||||
}
|
||||
|
||||
fn refAllDecls(comptime T: type) void {
|
||||
|
|
|
|||
4
gpu/src/types.zig
Normal file
4
gpu/src/types.zig
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
pub const AlphaMode = enum(u32) {
|
||||
premultiplied = 0x00000000,
|
||||
unpremultiplied = 0x00000001,
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue