Skip to content

Commit

Permalink
Enable WebGPU render test. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed Aug 24, 2023
1 parent 0c35c4a commit 21dd77f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,9 @@ commands:
CHROME_FLAGS_HEADLESS: "--headless --remote-debugging-port=1234"
CHROME_FLAGS_WASM: "--enable-experimental-webassembly-features --js-flags=\"--experimental-wasm-memory64 --experimental-wasm-stack-switching --experimental-wasm-type-reflection\""
CHROME_FLAGS_NOCACHE: "--disk-cache-dir=/dev/null --disk-cache-size=1 --media-cache-size=1 --disable-application-cache --incognito"
CHROME_FLAGS_WEBGPU: "--enable-unsafe-webgpu --use-webgpu-adapter=swiftshader --enable-features=Vulkan"
command: |
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE"
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE $CHROME_FLAGS_WEBGPU"
# There are tests in the browser test suite that using libraries
# that are not included by "./embuilder build ALL". For example the
# PIC version of libSDL which is used by test_sdl2_misc_main_module
Expand Down
6 changes: 1 addition & 5 deletions test/webgpu_basic_rendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ void GetDevice(void (*callback)(wgpu::Device)) {
if (message) {
printf("RequestAdapter: %s\n", message);
}
if (status == WGPURequestAdapterStatus_Unavailable) {
printf("WebGPU unavailable; exiting cleanly\n");
// exit(0) (rather than emscripten_force_exit(0)) ensures there is no dangling keepalive.
exit(0);
}
assert(status != WGPURequestAdapterStatus_Unavailable && "WebGPU unavailable");
assert(status == WGPURequestAdapterStatus_Success);

wgpu::Adapter adapter = wgpu::Adapter::Acquire(cAdapter);
Expand Down

0 comments on commit 21dd77f

Please sign in to comment.