gpu: add PresentMode enum

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-11 07:56:07 -07:00 committed by Stephen Gutekanst
parent 792e64906f
commit 327b0f9257
2 changed files with 6 additions and 7 deletions

View file

@ -1,12 +1,5 @@
typedef uint32_t WGPUFlags;
typedef enum WGPUPresentMode {
WGPUPresentMode_Immediate = 0x00000000,
WGPUPresentMode_Mailbox = 0x00000001,
WGPUPresentMode_Fifo = 0x00000002,
WGPUPresentMode_Force32 = 0x7FFFFFFF
} WGPUPresentMode;
typedef enum WGPUPrimitiveTopology {
WGPUPrimitiveTopology_PointList = 0x00000000,
WGPUPrimitiveTopology_LineList = 0x00000001,

View file

@ -171,6 +171,12 @@ pub const PowerPreference = enum(u32) {
high_performance = 0x00000002,
};
pub const PresentMode = enum(u32) {
immediate = 0x00000000,
mailbox = 0x00000001,
fifo = 0x00000002,
};
test "BackendType name" {
try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name());
}