@@ -330,21 +330,21 @@ var LibraryWebGPU = {
330
330
} ,
331
331
332
332
// Map from enum string back to enum number, for callbacks.
333
- BufferMapState : {
333
+ Int_BufferMapState : {
334
334
'unmapped' : 0 ,
335
335
'pending' : 1 ,
336
336
'mapped' : 2 ,
337
337
} ,
338
- CompilationMessageType : {
338
+ Int_CompilationMessageType : {
339
339
'error' : 0 ,
340
340
'warning' : 1 ,
341
341
'info' : 2 ,
342
342
} ,
343
- DeviceLostReason : {
343
+ Int_DeviceLostReason : {
344
344
'undefined' : 0 ,
345
345
'destroyed' : 1 ,
346
346
} ,
347
- PreferredFormat : {
347
+ Int_PreferredFormat : {
348
348
'rgba8unorm' : 0x12 ,
349
349
'bgra8unorm' : 0x17 ,
350
350
} ,
@@ -1814,7 +1814,7 @@ var LibraryWebGPU = {
1814
1814
messageStringPtrs . push ( messagePtr ) ;
1815
1815
stringToUTF8 ( compilationMessage . message , messagePtr , messageSize ) ;
1816
1816
{ { { makeSetValue ( 'compilationMessagePtr' , C_STRUCTS . WGPUCompilationMessage . message , 'messagePtr' , '*' ) } } } ;
1817
- { { { makeSetValue ( 'compilationMessagePtr' , C_STRUCTS . WGPUCompilationMessage . type , 'WebGPU.CompilationMessageType [compilationMessage.type]' , 'i32' ) } } } ;
1817
+ { { { makeSetValue ( 'compilationMessagePtr' , C_STRUCTS . WGPUCompilationMessage . type , 'WebGPU.Int_CompilationMessageType [compilationMessage.type]' , 'i32' ) } } } ;
1818
1818
{ { { makeSetValue ( 'compilationMessagePtr' , C_STRUCTS . WGPUCompilationMessage . lineNum , 'compilationMessage.lineNum' , 'i64' ) } } } ;
1819
1819
{ { { makeSetValue ( 'compilationMessagePtr' , C_STRUCTS . WGPUCompilationMessage . linePos , 'compilationMessage.linePos' , 'i64' ) } } } ;
1820
1820
{ { { makeSetValue ( 'compilationMessagePtr' , C_STRUCTS . WGPUCompilationMessage . offset , 'compilationMessage.offset' , 'i64' ) } } } ;
@@ -1911,7 +1911,7 @@ var LibraryWebGPU = {
1911
1911
1912
1912
wgpuBufferGetMapState : ( bufferId ) = > {
1913
1913
var buffer = WebGPU . mgrBuffer . get ( bufferId ) ;
1914
- return WebGPU . BufferMapState [ buffer . mapState ] ;
1914
+ return WebGPU . Int_BufferMapState [ buffer . mapState ] ;
1915
1915
} ,
1916
1916
1917
1917
// In webgpu.h offset and size are passed in as size_t.
@@ -2579,7 +2579,7 @@ var LibraryWebGPU = {
2579
2579
if ( deviceLostCallbackPtr ) {
2580
2580
device [ "lost" ] . then ( ( info ) => {
2581
2581
callUserCallback ( ( ) => WebGPU . errorCallback ( deviceLostCallbackPtr ,
2582
- WebGPU . DeviceLostReason [ info . reason ] , info . message , deviceLostUserdataPtr ) ) ;
2582
+ WebGPU . Int_DeviceLostReason [ info . reason ] , info . message , deviceLostUserdataPtr ) ) ;
2583
2583
} ) ;
2584
2584
}
2585
2585
{ { { makeDynCall ( 'vippp ', 'callback ') } } } ( { { { gpu . RequestDeviceStatus . Success } } } , deviceId , 0 , userdata ) ;
@@ -2606,7 +2606,7 @@ var LibraryWebGPU = {
2606
2606
2607
2607
wgpuSurfaceGetPreferredFormat : ( surfaceId , adapterId ) => {
2608
2608
var format = navigator [ "gpu" ] [ "getPreferredCanvasFormat" ] ( ) ;
2609
- return WebGPU . PreferredFormat [ format ] ;
2609
+ return WebGPU . Int_PreferredFormat [ format ] ;
2610
2610
} ,
2611
2611
2612
2612
// WGPUSwapChain
0 commit comments