Skip to content

Commit 9b8ed7e

Browse files
authored
Fix regression in i64 argument handling in webgpu+bigint (#22689)
This was caused by #22557, which was checking the `LibraryWebGPU` object for `__sig` members when the sigs are stored in a separate file and therefore live on the global `LibraryManager.library` object. Fixes: #22682
1 parent f530ed0 commit 9b8ed7e

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ See docs/process.md for more on how version tagging works.
2323
- The usage of `EM_BOOL` in the emscripten API has been replaced with C/C++
2424
bool. This change should not be observable since `EM_BOOL` has been
2525
equivalent to `bool` since #22157. (#22155)
26+
- Fix regression introduced in 3.1.67 (#22557) which broke webgpu / int64
27+
integration. (#22689)
2628

2729
3.1.68 - 09/30/24
2830
-----------------

src/library_webgpu.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2883,9 +2883,9 @@ for (var value in LibraryWebGPU.$WebGPU.FeatureName) {
28832883

28842884
for (const key of Object.keys(LibraryWebGPU)) {
28852885
if (typeof LibraryWebGPU[key] === 'function') {
2886-
const sig = LibraryWebGPU[key + '__sig'];
2886+
const sig = LibraryManager.library[key + '__sig'];
28872887
if (sig?.includes('j')) {
2888-
LibraryWebGPU[key + '__i53abi'] = true;
2888+
LibraryManager.library[key + '__i53abi'] = true;
28892889
}
28902890
}
28912891
}

test/webgpu_basic_rendering.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ void doCopyTestMappedAtCreation(bool useRange) {
225225
dst = device.CreateBuffer(&descriptor);
226226
}
227227

228+
// Write some random data to the buffer, just to verify that
229+
// wgpuQueueWriteBuffer works.
230+
char data[4];
231+
queue.WriteBuffer(dst, 0, data, sizeof(data));
232+
228233
wgpu::CommandBuffer commands;
229234
{
230235
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();

0 commit comments

Comments
 (0)