Skip to content

Commit 21dd77f

Browse files
committed
Enable WebGPU render test. NFC
1 parent 0c35c4a commit 21dd77f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,9 @@ commands:
354354
CHROME_FLAGS_HEADLESS: "--headless --remote-debugging-port=1234"
355355
CHROME_FLAGS_WASM: "--enable-experimental-webassembly-features --js-flags=\"--experimental-wasm-memory64 --experimental-wasm-stack-switching --experimental-wasm-type-reflection\""
356356
CHROME_FLAGS_NOCACHE: "--disk-cache-dir=/dev/null --disk-cache-size=1 --media-cache-size=1 --disable-application-cache --incognito"
357+
CHROME_FLAGS_WEBGPU: "--enable-unsafe-webgpu --use-webgpu-adapter=swiftshader --enable-features=Vulkan"
357358
command: |
358-
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE"
359+
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE $CHROME_FLAGS_WEBGPU"
359360
# There are tests in the browser test suite that using libraries
360361
# that are not included by "./embuilder build ALL". For example the
361362
# PIC version of libSDL which is used by test_sdl2_misc_main_module

test/webgpu_basic_rendering.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ void GetDevice(void (*callback)(wgpu::Device)) {
2424
if (message) {
2525
printf("RequestAdapter: %s\n", message);
2626
}
27-
if (status == WGPURequestAdapterStatus_Unavailable) {
28-
printf("WebGPU unavailable; exiting cleanly\n");
29-
// exit(0) (rather than emscripten_force_exit(0)) ensures there is no dangling keepalive.
30-
exit(0);
31-
}
27+
assert(status != WGPURequestAdapterStatus_Unavailable && "WebGPU unavailable");
3228
assert(status == WGPURequestAdapterStatus_Success);
3329

3430
wgpu::Adapter adapter = wgpu::Adapter::Acquire(cAdapter);

0 commit comments

Comments
 (0)