Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
26 changes: 14 additions & 12 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
- platform: ubuntu-latest
browser: chrome
- platform: self-hosted
browser: chrome
# - os: windows-latest
# browser: chrome

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4
Expand All @@ -30,12 +30,12 @@ jobs:
node-version: 20.x

- name: Verify Chrome (Ubuntu)
if: matrix.os == 'ubuntu-latest' && matrix.browser == 'chrome'
if: matrix.platform == 'ubuntu-latest' && matrix.browser == 'chrome'
run: |
google-chrome --version

- name: Verify Chrome (Windows)
if: matrix.os == 'windows-latest' && matrix.browser == 'chrome'
if: matrix.platform == 'windows-latest' && matrix.browser == 'chrome'
run: |
& "C:\Program Files\Google\Chrome\Application\chrome.exe" --version

Expand All @@ -44,14 +44,16 @@ jobs:
env:
CI: true

#- name: Build and test (Ubuntu)
# if: matrix.os == 'windows-latest'
# run: npm test -- --project=unit-tests-webgpu
# env:
# CI: true
- name: Build and test WebGPU (self-hosted)
if: matrix.platform == 'self-hosted'
# run: npm test -- --project=unit-tests-webgpu
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" bash -c 'CI=true npm run test -- --project=unit-tests-webgpu'
env:
CI: true

- name: Build and test (Ubuntu)
if: matrix.os == 'ubuntu-latest'
if: matrix.platform == 'ubuntu-latest'
run: npm test -- --project=unit-tests
env:
CI: true
Expand Down
4 changes: 0 additions & 4 deletions src/webgpu/p5.RendererWebGPU.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,13 @@ class RendererWebGPU extends Renderer3D {

async _initContext() {
this.adapter = await navigator.gpu?.requestAdapter(this._webgpuAttributes);
// console.log('Adapter:');
// console.log(this.adapter);
if (this.adapter) {
console.log([...this.adapter.features]);
}
this.device = await this.adapter?.requestDevice({
// Todo: check support
requiredFeatures: ['depth32float-stencil8']
});
// console.log('Device:');
// console.log(this.device);
if (!this.device) {
throw new Error('Your browser does not support WebGPU.');
}
Expand Down
16 changes: 7 additions & 9 deletions vitest.workspace.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ export default defineWorkspace([
args: [
'--no-sandbox',
'--headless=new',
'--enable-unsafe-webgpu',
'--use-vulkan=swiftshader',
'--use-webgpu-adapter=swiftshader',
'--use-angle=vulkan',
'--no-sandbox',
]
}
} : undefined
Expand Down Expand Up @@ -90,17 +85,20 @@ export default defineWorkspace([
name: 'chrome',
provider: 'webdriverio',
screenshotFailures: false,
headless: false,
providerOptions: {
capabilities: process.env.CI ? {
'goog:chromeOptions': {
args: [
'--no-sandbox',
'--headless=new',
'--enable-unsafe-webgpu',
'--use-vulkan=swiftshader',
'--use-webgpu-adapter=swiftshader',
'--use-angle=vulkan',
'--no-sandbox',
'--headless=new',
'--use-gl=angle',
'--use-angle=gl-egl',
'--use-cmd-decoder=passthrough',
// '--disable-frame-rate-limit',
// '--disable-dev-shm-usage',
]
}
} : undefined
Expand Down
Loading