gpu: add ErrorType enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
85e431a956
commit
45704d990e
2 changed files with 8 additions and 9 deletions
|
|
@ -1,14 +1,5 @@
|
|||
typedef uint32_t WGPUFlags;
|
||||
|
||||
typedef enum WGPUErrorType {
|
||||
WGPUErrorType_NoError = 0x00000000,
|
||||
WGPUErrorType_Validation = 0x00000001,
|
||||
WGPUErrorType_OutOfMemory = 0x00000002,
|
||||
WGPUErrorType_Unknown = 0x00000003,
|
||||
WGPUErrorType_DeviceLost = 0x00000004,
|
||||
WGPUErrorType_Force32 = 0x7FFFFFFF
|
||||
} WGPUErrorType;
|
||||
|
||||
typedef enum WGPUFeatureName {
|
||||
WGPUFeatureName_Undefined = 0x00000000,
|
||||
WGPUFeatureName_DepthClipControl = 0x00000001,
|
||||
|
|
|
|||
|
|
@ -102,6 +102,14 @@ pub const ErrorFilter = enum(u32) {
|
|||
out_of_memory = 0x00000001,
|
||||
};
|
||||
|
||||
pub const ErrorType = enum(u32) {
|
||||
no_error = 0x00000000,
|
||||
validation = 0x00000001,
|
||||
out_of_memory = 0x00000002,
|
||||
unknown = 0x00000003,
|
||||
device_lost = 0x00000004,
|
||||
};
|
||||
|
||||
test "BackendType name" {
|
||||
try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue