gpu: add IndexFormat enum

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-11 07:53:09 -07:00 committed by Stephen Gutekanst
parent 6e8e0febdd
commit 71e6049ada
2 changed files with 6 additions and 7 deletions

View file

@ -1,12 +1,5 @@
typedef uint32_t WGPUFlags;
typedef enum WGPUIndexFormat {
WGPUIndexFormat_Undefined = 0x00000000,
WGPUIndexFormat_Uint16 = 0x00000001,
WGPUIndexFormat_Uint32 = 0x00000002,
WGPUIndexFormat_Force32 = 0x7FFFFFFF
} WGPUIndexFormat;
typedef enum WGPULoadOp {
WGPULoadOp_Undefined = 0x00000000,
WGPULoadOp_Clear = 0x00000001,

View file

@ -138,6 +138,12 @@ pub const FrontFace = enum(u32) {
cw = 0x00000001,
};
pub const IndexFormat = enum(u32) {
undef = 0x00000000,
uint16 = 0x00000001,
uint32 = 0x00000002,
};
test "BackendType name" {
try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name());
}