Skip to content

Commit

Permalink
Rename WGPUDeviceLostReason_Undefined to Unknown
Browse files Browse the repository at this point in the history
Please check
https://issues.chromium.org/issues/42241081 for
more information and progress.

webgpu-headers PR:
webgpu-native/webgpu-headers#288.
  • Loading branch information
hocheung-chromium committed May 9, 2024
1 parent 619f08d commit 0fe8a8d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/library_webgpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ var LibraryWebGPU = {
'info': 2,
},
Int_DeviceLostReason: {
'undefined': 0,
'unknown': 0,
'destroyed': 1,
},
Int_PreferredFormat: {
Expand Down
2 changes: 1 addition & 1 deletion system/include/webgpu/webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ typedef enum WGPUCullMode {
} WGPUCullMode WGPU_ENUM_ATTRIBUTE;

typedef enum WGPUDeviceLostReason {
WGPUDeviceLostReason_Undefined = 0x00000000,
WGPUDeviceLostReason_Unknown = 0x00000000,
WGPUDeviceLostReason_Destroyed = 0x00000001,
WGPUDeviceLostReason_Force32 = 0x7FFFFFFF
} WGPUDeviceLostReason WGPU_ENUM_ATTRIBUTE;
Expand Down
2 changes: 1 addition & 1 deletion system/include/webgpu/webgpu_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ namespace wgpu {
};

enum class DeviceLostReason : uint32_t {
Undefined = 0x00000000,
Unknown = 0x00000000,
Destroyed = 0x00000001,
};

Expand Down
2 changes: 1 addition & 1 deletion system/lib/webgpu/webgpu_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ namespace wgpu {
static_assert(sizeof(DeviceLostReason) == sizeof(WGPUDeviceLostReason), "sizeof mismatch for DeviceLostReason");
static_assert(alignof(DeviceLostReason) == alignof(WGPUDeviceLostReason), "alignof mismatch for DeviceLostReason");

static_assert(static_cast<uint32_t>(DeviceLostReason::Undefined) == WGPUDeviceLostReason_Undefined, "value mismatch for DeviceLostReason::Undefined");
static_assert(static_cast<uint32_t>(DeviceLostReason::Unknown) == WGPUDeviceLostReason_Unknown, "value mismatch for DeviceLostReason::Unknown");
static_assert(static_cast<uint32_t>(DeviceLostReason::Destroyed) == WGPUDeviceLostReason_Destroyed, "value mismatch for DeviceLostReason::Destroyed");

// ErrorFilter
Expand Down

0 comments on commit 0fe8a8d

Please sign in to comment.