Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/jsifier.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ function handleI64Signatures(symbol, snippet, sig, i53abi) {
const newArgs = [];
let argConversions = '';
if (sig.length > argNames.length + 1) {
error(`handleI64Signatures: signature too long for ${symbol}`);
error(`handleI64Signatures: signature '${sig}' too long for ${symbol}(${argNames.join(', ')})`);
return snippet;
}
for (let i = 0; i < argNames.length; i++) {
Expand Down
16 changes: 4 additions & 12 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4450,24 +4450,16 @@ def test_webgl_simple_extensions(self, webgl_version, simple_enable_extensions):
'closure': (['-sASSERTIONS', '--closure=1'],),
'closure_advanced': (['-sASSERTIONS', '--closure=1', '-O3'],),
'main_module': (['-sMAIN_MODULE=1'],),
'pthreads': (['-pthread', '-sOFFSCREENCANVAS_SUPPORT'],),
})
@requires_webgpu
def test_webgpu_basic_rendering(self, args):
self.btest_exit('webgpu_basic_rendering.cpp', cflags=['-Wno-error=deprecated', '-sUSE_WEBGPU'] + args)
self.btest_exit('webgpu_basic_rendering.cpp', cflags=['--use-port=emdawnwebgpu', '-sEXIT_RUNTIME'] + args)

@requires_webgpu
def test_webgpu_required_limits(self):
self.btest_exit('webgpu_required_limits.c', cflags=['-Wno-error=deprecated', '-sUSE_WEBGPU', '-sASYNCIFY'])

@requires_webgpu
def test_webgpu_basic_rendering_pthreads(self):
self.btest_exit('webgpu_basic_rendering.cpp', cflags=['-Wno-error=deprecated', '-sUSE_WEBGPU', '-pthread', '-sOFFSCREENCANVAS_SUPPORT'])

def test_webgpu_get_device(self):
self.btest_exit('webgpu_get_device.cpp', cflags=['-Wno-error=deprecated', '-sUSE_WEBGPU', '-sASSERTIONS', '--closure=1'])

def test_webgpu_get_device_pthreads(self):
self.btest_exit('webgpu_get_device.cpp', cflags=['-Wno-error=deprecated', '-sUSE_WEBGPU', '-pthread'])
self.set_setting('NO_DEFAULT_TO_CXX', 0) # emdawnwebgpu uses C++ internally
self.btest_exit('webgpu_required_limits.c', cflags=['--use-port=emdawnwebgpu', '-sEXIT_RUNTIME'])

# Tests the feature that shell html page can preallocate the typed array and place it
# to Module.buffer before loading the script page.
Expand Down
17 changes: 4 additions & 13 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -2586,6 +2586,7 @@ def test_contrib_ports(self):

@requires_network
def test_remote_ports(self):
self.set_setting('NO_DEFAULT_TO_CXX', 0) # emdawnwebgpu uses C++ internally
self.emcc(test_file('hello_world.c'), ['--use-port=emdawnwebgpu'])

@crossplatform
Expand Down Expand Up @@ -9585,13 +9586,12 @@ def test_closure_full_js_library(self, args):

@also_with_wasm64
def test_closure_webgpu(self):
# This test can be removed if USE_WEBGPU is later included in INCLUDE_FULL_LIBRARY.
self.set_setting('NO_DEFAULT_TO_CXX', 0) # emdawnwebgpu uses C++ internally
self.build('hello_world.c', cflags=[
'--closure=1',
'-Werror=closure',
'-Wno-error=deprecated',
'-sINCLUDE_FULL_LIBRARY',
'-sUSE_WEBGPU',
'--use-port=emdawnwebgpu',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have any remaining tests for -sUSE_WEBGPU?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, but I'm planning to remove it immediately after this (#25398).

])

# Tests --closure-args command line flag
Expand Down Expand Up @@ -12230,15 +12230,6 @@ def test_standalone_syscalls(self):
for engine in config.WASM_ENGINES:
self.assertContained(expected, self.run_js('test.wasm', engine))

@parameterized({
'': ([],),
'assertions': (['-sASSERTIONS'],),
'closure': (['-sASSERTIONS', '--closure=1'],),
'dylink': (['-sMAIN_MODULE'],),
})
def test_webgpu_compiletest(self, args):
self.run_process([EMXX, test_file('webgpu_jsvalstore.cpp'), '-Wno-error=deprecated', '-sUSE_WEBGPU', '-sASYNCIFY'] + args)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this test no longer useful?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The whole jsvalstore thing has been removed in Emdawnwebgpu. We have another mechanism but it would need entirely new tests.


@flaky('https://github.com/emscripten-core/emscripten/issues/25343')
@also_with_wasm64
@parameterized({
Expand All @@ -12247,7 +12238,7 @@ def test_webgpu_compiletest(self, args):
'closure_assertions': (['--closure=1', '-Werror=closure', '-sASSERTIONS'],),
})
def test_emdawnwebgpu_link_test(self, args):
self.run_process([EMXX, test_file('test_emdawnwebgpu_link_test.cpp'), '--use-port=emdawnwebgpu', '-sASYNCIFY'] + args)
self.emcc(test_file('test_emdawnwebgpu_link_test.cpp'), ['--use-port=emdawnwebgpu', '-sASYNCIFY'] + args)

def test_signature_mismatch(self):
create_file('a.c', 'void foo(); int main() { foo(); return 0; }')
Expand Down
Loading