Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/library_webgpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,9 @@ var LibraryWebGPU = {

// Map from enum string back to enum number, for callbacks.
Int_BufferMapState: {
'unmapped': 0,
'pending': 1,
'mapped': 2,
'unmapped': 1,
'pending': 2,
'mapped': 3,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like Int_CompilationMessageType might also be off by one:

system/include/webgpu/webgpu.h:    WGPUCompilationMessageType_Error = 0x00000001,
system/include/webgpu/webgpu.h:    WGPUCompilationMessageType_Warning = 0x00000002,
system/include/webgpu/webgpu.h:    WGPUCompilationMessageType_Info = 0x00000003,

How did this stuff ever work? Or is it just not tested?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of these are pretty niche and most applications don't use them. It probably broke at some point when we updated the header (which shifted the numbers) but no one was using it.

},
Int_CompilationMessageType : {
'error': 0,
Expand Down