Skip to content

Commit 4e03f91

Browse files
committed
BufferMapState was updated by webgpu
1 parent 2771097 commit 4e03f91

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/wgpu.zig

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,17 @@ pub const BufferMapAsyncStatus = enum(u32) {
138138
size_out_of_range = 0x00000008,
139139
};
140140

141-
pub const BufferMapState = enum(u32) {
142-
unmapped = 0x00000000,
143-
pending = 0x00000001,
144-
mapped = 0x00000002,
141+
pub const BufferMapState = switch (emscripten) {
142+
true => enum(u32) {
143+
unmapped = 0x00000001,
144+
pending = 0x00000002,
145+
mapped = 0x00000003,
146+
},
147+
false => enum(u32) {
148+
unmapped = 0x00000000,
149+
pending = 0x00000001,
150+
mapped = 0x00000002,
151+
},
145152
};
146153

147154
pub const CompareFunction = enum(u32) {

0 commit comments

Comments
 (0)