From 2ff04ad5fb6761aaa5d654c2b6f38049713d9509 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Thu, 16 Jan 2025 18:54:04 -0500 Subject: [PATCH 1/3] Compatibility Mode, the easy part. Enable WebGPU Compatibility Mode for all samples that can run unmodified in that mode. --- sample/animometer/main.ts | 2 +- sample/blending/main.ts | 2 +- sample/cameras/main.ts | 2 +- sample/computeBoids/main.ts | 2 +- sample/fractalCube/main.ts | 2 +- sample/gameOfLife/main.ts | 2 +- sample/helloTriangle/main.ts | 2 +- sample/helloTriangleMSAA/main.ts | 2 +- sample/imageBlur/main.ts | 2 +- sample/instancedCube/main.ts | 2 +- sample/multipleCanvases/main.ts | 2 +- sample/normalMap/main.ts | 2 +- sample/occlusionQuery/main.ts | 2 +- sample/points/main.ts | 2 +- sample/renderBundles/main.ts | 2 +- sample/resizeCanvas/main.ts | 2 +- sample/resizeObserverHDDPI/main.ts | 2 +- sample/rotatingCube/main.ts | 2 +- sample/shadowMapping/main.ts | 2 +- sample/texturedCube/main.ts | 2 +- sample/transparentCanvas/main.ts | 2 +- sample/twoCubes/main.ts | 2 +- sample/videoUploading/main.ts | 2 +- sample/volumeRenderingTexture3D/main.ts | 2 +- sample/worker/worker.ts | 2 +- sample/workloadSimulator/index.html | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/sample/animometer/main.ts b/sample/animometer/main.ts index 1d583640..ae7a8127 100644 --- a/sample/animometer/main.ts +++ b/sample/animometer/main.ts @@ -3,7 +3,7 @@ import animometerWGSL from './animometer.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/blending/main.ts b/sample/blending/main.ts index 17fce9cd..d76695cb 100644 --- a/sample/blending/main.ts +++ b/sample/blending/main.ts @@ -3,7 +3,7 @@ import { GUI } from 'dat.gui'; import { quitIfWebGPUNotAvailable } from '../util'; import texturedQuadWGSL from './texturedQuad.wgsl'; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/cameras/main.ts b/sample/cameras/main.ts index 7a7791e6..f0d3b649 100644 --- a/sample/cameras/main.ts +++ b/sample/cameras/main.ts @@ -40,7 +40,7 @@ gui.add(params, 'type', ['arcball', 'WASD']).onChange(() => { oldCameraType = newCameraType; }); -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); const context = canvas.getContext('webgpu') as GPUCanvasContext; diff --git a/sample/computeBoids/main.ts b/sample/computeBoids/main.ts index 048d18fc..f86aea6e 100644 --- a/sample/computeBoids/main.ts +++ b/sample/computeBoids/main.ts @@ -4,7 +4,7 @@ import updateSpritesWGSL from './updateSprites.wgsl'; import { GUI } from 'dat.gui'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); quitIfAdapterNotAvailable(adapter); const hasTimestampQuery = adapter.features.has('timestamp-query'); diff --git a/sample/fractalCube/main.ts b/sample/fractalCube/main.ts index ed308527..1bfc842d 100644 --- a/sample/fractalCube/main.ts +++ b/sample/fractalCube/main.ts @@ -13,7 +13,7 @@ import sampleSelfWGSL from './sampleSelf.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/gameOfLife/main.ts b/sample/gameOfLife/main.ts index 0faaa424..a2a5a56d 100644 --- a/sample/gameOfLife/main.ts +++ b/sample/gameOfLife/main.ts @@ -5,7 +5,7 @@ import fragWGSL from './frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/helloTriangle/main.ts b/sample/helloTriangle/main.ts index 209f675b..367b64e2 100644 --- a/sample/helloTriangle/main.ts +++ b/sample/helloTriangle/main.ts @@ -3,7 +3,7 @@ import redFragWGSL from '../../shaders/red.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/helloTriangleMSAA/main.ts b/sample/helloTriangleMSAA/main.ts index b200a69b..bde43871 100644 --- a/sample/helloTriangleMSAA/main.ts +++ b/sample/helloTriangleMSAA/main.ts @@ -3,7 +3,7 @@ import redFragWGSL from '../../shaders/red.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/imageBlur/main.ts b/sample/imageBlur/main.ts index 8d27f3ab..2081625c 100644 --- a/sample/imageBlur/main.ts +++ b/sample/imageBlur/main.ts @@ -8,7 +8,7 @@ const tileDim = 128; const batch = [4, 4]; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/instancedCube/main.ts b/sample/instancedCube/main.ts index 333738ec..90c44f79 100644 --- a/sample/instancedCube/main.ts +++ b/sample/instancedCube/main.ts @@ -13,7 +13,7 @@ import vertexPositionColorWGSL from '../../shaders/vertexPositionColor.frag.wgsl import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/multipleCanvases/main.ts b/sample/multipleCanvases/main.ts index 8b3501be..c0b904d8 100644 --- a/sample/multipleCanvases/main.ts +++ b/sample/multipleCanvases/main.ts @@ -46,7 +46,7 @@ function createVertexAndIndexBuffer( }; } -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/normalMap/main.ts b/sample/normalMap/main.ts index d23eaca6..57c9df7d 100644 --- a/sample/normalMap/main.ts +++ b/sample/normalMap/main.ts @@ -18,7 +18,7 @@ enum TextureAtlas { } const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); const context = canvas.getContext('webgpu') as GPUCanvasContext; diff --git a/sample/occlusionQuery/main.ts b/sample/occlusionQuery/main.ts index 60a425a2..3fcda3e8 100644 --- a/sample/occlusionQuery/main.ts +++ b/sample/occlusionQuery/main.ts @@ -31,7 +31,7 @@ export type TypedArrayConstructor = const info = document.querySelector('#info'); -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/points/main.ts b/sample/points/main.ts index 3d0b4349..b079f603 100644 --- a/sample/points/main.ts +++ b/sample/points/main.ts @@ -29,7 +29,7 @@ function createFibonacciSphereVertices({ return new Float32Array(vertices); } -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/renderBundles/main.ts b/sample/renderBundles/main.ts index 5aec8124..58abb01f 100644 --- a/sample/renderBundles/main.ts +++ b/sample/renderBundles/main.ts @@ -14,7 +14,7 @@ interface Renderable { } const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/resizeCanvas/main.ts b/sample/resizeCanvas/main.ts index 4ae6c782..629e4966 100644 --- a/sample/resizeCanvas/main.ts +++ b/sample/resizeCanvas/main.ts @@ -3,7 +3,7 @@ import redFragWGSL from '../../shaders/red.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/resizeObserverHDDPI/main.ts b/sample/resizeObserverHDDPI/main.ts index 9e0f72f3..b5b5bc4e 100644 --- a/sample/resizeObserverHDDPI/main.ts +++ b/sample/resizeObserverHDDPI/main.ts @@ -3,7 +3,7 @@ import checkerWGSL from './checker.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/rotatingCube/main.ts b/sample/rotatingCube/main.ts index 0c61305a..1534ee53 100644 --- a/sample/rotatingCube/main.ts +++ b/sample/rotatingCube/main.ts @@ -13,7 +13,7 @@ import vertexPositionColorWGSL from '../../shaders/vertexPositionColor.frag.wgsl import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/shadowMapping/main.ts b/sample/shadowMapping/main.ts index a748a915..0f7f5237 100644 --- a/sample/shadowMapping/main.ts +++ b/sample/shadowMapping/main.ts @@ -9,7 +9,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const shadowDepthTextureSize = 1024; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/texturedCube/main.ts b/sample/texturedCube/main.ts index 9816e4be..c4ea82d6 100644 --- a/sample/texturedCube/main.ts +++ b/sample/texturedCube/main.ts @@ -13,7 +13,7 @@ import sampleTextureMixColorWGSL from './sampleTextureMixColor.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/transparentCanvas/main.ts b/sample/transparentCanvas/main.ts index 56b2d72e..7dcc7778 100644 --- a/sample/transparentCanvas/main.ts +++ b/sample/transparentCanvas/main.ts @@ -13,7 +13,7 @@ import vertexPositionColorWGSL from '../../shaders/vertexPositionColor.frag.wgsl import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/twoCubes/main.ts b/sample/twoCubes/main.ts index 09178287..dd8a10f3 100644 --- a/sample/twoCubes/main.ts +++ b/sample/twoCubes/main.ts @@ -13,7 +13,7 @@ import vertexPositionColorWGSL from '../../shaders/vertexPositionColor.frag.wgsl import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/videoUploading/main.ts b/sample/videoUploading/main.ts index e341e89c..815b5aaf 100644 --- a/sample/videoUploading/main.ts +++ b/sample/videoUploading/main.ts @@ -3,7 +3,7 @@ import fullscreenTexturedQuadWGSL from '../../shaders/fullscreenTexturedQuad.wgs import sampleExternalTextureWGSL from '../../shaders/sampleExternalTexture.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/volumeRenderingTexture3D/main.ts b/sample/volumeRenderingTexture3D/main.ts index 5f8d0c4a..78b2a25b 100644 --- a/sample/volumeRenderingTexture3D/main.ts +++ b/sample/volumeRenderingTexture3D/main.ts @@ -18,7 +18,7 @@ gui.add(params, 'rotateCamera', true); gui.add(params, 'near', 2.0, 7.0); gui.add(params, 'far', 2.0, 7.0); -const adapter = await navigator.gpu?.requestAdapter(); +const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); const context = canvas.getContext('webgpu') as GPUCanvasContext; diff --git a/sample/worker/worker.ts b/sample/worker/worker.ts index 42f89e5d..4d84c795 100644 --- a/sample/worker/worker.ts +++ b/sample/worker/worker.ts @@ -35,7 +35,7 @@ self.addEventListener('message', (ev) => { // to the init() method for all the other samples. The remainder of this file is largely identical // to the rotatingCube sample. async function init(canvas) { - const adapter = await navigator.gpu?.requestAdapter(); + const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); const context = canvas.getContext('webgpu'); diff --git a/sample/workloadSimulator/index.html b/sample/workloadSimulator/index.html index b82c22bd..03cbabb6 100644 --- a/sample/workloadSimulator/index.html +++ b/sample/workloadSimulator/index.html @@ -586,7 +586,7 @@

Web graphics workload simulator

try { if (deviceRequested) return; deviceRequested = true; - let adapter = await navigator.gpu.requestAdapter(); + let adapter = await navigator.gpu.requestAdapter({ featureLevel: 'compatibility' }); featuresAndLimits.textContent = JSON.stringify( { name: adapter.name, From e7259567016a16be1ca6c0f4944025c40088adf1 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Fri, 17 Jan 2025 11:03:07 -0500 Subject: [PATCH 2/3] Reformat. --- sample/animometer/main.ts | 4 +++- sample/blending/main.ts | 4 +++- sample/cameras/main.ts | 4 +++- sample/computeBoids/main.ts | 4 +++- sample/fractalCube/main.ts | 4 +++- sample/gameOfLife/main.ts | 4 +++- sample/helloTriangle/main.ts | 4 +++- sample/helloTriangleMSAA/main.ts | 4 +++- sample/imageBlur/main.ts | 4 +++- sample/instancedCube/main.ts | 4 +++- sample/multipleCanvases/main.ts | 4 +++- sample/normalMap/main.ts | 4 +++- sample/occlusionQuery/main.ts | 4 +++- sample/points/main.ts | 4 +++- sample/renderBundles/main.ts | 4 +++- sample/resizeCanvas/main.ts | 4 +++- sample/resizeObserverHDDPI/main.ts | 4 +++- sample/rotatingCube/main.ts | 4 +++- sample/shadowMapping/main.ts | 4 +++- sample/texturedCube/main.ts | 4 +++- sample/transparentCanvas/main.ts | 4 +++- sample/twoCubes/main.ts | 4 +++- sample/videoUploading/main.ts | 4 +++- sample/volumeRenderingTexture3D/main.ts | 4 +++- sample/worker/worker.ts | 4 +++- sample/workloadSimulator/index.html | 4 +++- 26 files changed, 78 insertions(+), 26 deletions(-) diff --git a/sample/animometer/main.ts b/sample/animometer/main.ts index ae7a8127..cdca4fa2 100644 --- a/sample/animometer/main.ts +++ b/sample/animometer/main.ts @@ -3,7 +3,9 @@ import animometerWGSL from './animometer.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/blending/main.ts b/sample/blending/main.ts index d76695cb..6556dfb5 100644 --- a/sample/blending/main.ts +++ b/sample/blending/main.ts @@ -3,7 +3,9 @@ import { GUI } from 'dat.gui'; import { quitIfWebGPUNotAvailable } from '../util'; import texturedQuadWGSL from './texturedQuad.wgsl'; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/cameras/main.ts b/sample/cameras/main.ts index f0d3b649..86a5fbd8 100644 --- a/sample/cameras/main.ts +++ b/sample/cameras/main.ts @@ -40,7 +40,9 @@ gui.add(params, 'type', ['arcball', 'WASD']).onChange(() => { oldCameraType = newCameraType; }); -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); const context = canvas.getContext('webgpu') as GPUCanvasContext; diff --git a/sample/computeBoids/main.ts b/sample/computeBoids/main.ts index f86aea6e..24c58217 100644 --- a/sample/computeBoids/main.ts +++ b/sample/computeBoids/main.ts @@ -4,7 +4,9 @@ import updateSpritesWGSL from './updateSprites.wgsl'; import { GUI } from 'dat.gui'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); quitIfAdapterNotAvailable(adapter); const hasTimestampQuery = adapter.features.has('timestamp-query'); diff --git a/sample/fractalCube/main.ts b/sample/fractalCube/main.ts index 1bfc842d..91d68c07 100644 --- a/sample/fractalCube/main.ts +++ b/sample/fractalCube/main.ts @@ -13,7 +13,9 @@ import sampleSelfWGSL from './sampleSelf.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/gameOfLife/main.ts b/sample/gameOfLife/main.ts index a2a5a56d..8f87ae4b 100644 --- a/sample/gameOfLife/main.ts +++ b/sample/gameOfLife/main.ts @@ -5,7 +5,9 @@ import fragWGSL from './frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/helloTriangle/main.ts b/sample/helloTriangle/main.ts index 367b64e2..a88dfd2c 100644 --- a/sample/helloTriangle/main.ts +++ b/sample/helloTriangle/main.ts @@ -3,7 +3,9 @@ import redFragWGSL from '../../shaders/red.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/helloTriangleMSAA/main.ts b/sample/helloTriangleMSAA/main.ts index bde43871..63a677c0 100644 --- a/sample/helloTriangleMSAA/main.ts +++ b/sample/helloTriangleMSAA/main.ts @@ -3,7 +3,9 @@ import redFragWGSL from '../../shaders/red.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/imageBlur/main.ts b/sample/imageBlur/main.ts index 2081625c..567229c2 100644 --- a/sample/imageBlur/main.ts +++ b/sample/imageBlur/main.ts @@ -8,7 +8,9 @@ const tileDim = 128; const batch = [4, 4]; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/instancedCube/main.ts b/sample/instancedCube/main.ts index 90c44f79..9a4f0f36 100644 --- a/sample/instancedCube/main.ts +++ b/sample/instancedCube/main.ts @@ -13,7 +13,9 @@ import vertexPositionColorWGSL from '../../shaders/vertexPositionColor.frag.wgsl import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/multipleCanvases/main.ts b/sample/multipleCanvases/main.ts index c0b904d8..1ee07059 100644 --- a/sample/multipleCanvases/main.ts +++ b/sample/multipleCanvases/main.ts @@ -46,7 +46,9 @@ function createVertexAndIndexBuffer( }; } -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/normalMap/main.ts b/sample/normalMap/main.ts index 57c9df7d..7ede5441 100644 --- a/sample/normalMap/main.ts +++ b/sample/normalMap/main.ts @@ -18,7 +18,9 @@ enum TextureAtlas { } const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); const context = canvas.getContext('webgpu') as GPUCanvasContext; diff --git a/sample/occlusionQuery/main.ts b/sample/occlusionQuery/main.ts index 3fcda3e8..13a0c8dd 100644 --- a/sample/occlusionQuery/main.ts +++ b/sample/occlusionQuery/main.ts @@ -31,7 +31,9 @@ export type TypedArrayConstructor = const info = document.querySelector('#info'); -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/points/main.ts b/sample/points/main.ts index b079f603..0d2a9ed4 100644 --- a/sample/points/main.ts +++ b/sample/points/main.ts @@ -29,7 +29,9 @@ function createFibonacciSphereVertices({ return new Float32Array(vertices); } -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/renderBundles/main.ts b/sample/renderBundles/main.ts index 58abb01f..5222b56d 100644 --- a/sample/renderBundles/main.ts +++ b/sample/renderBundles/main.ts @@ -14,7 +14,9 @@ interface Renderable { } const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/resizeCanvas/main.ts b/sample/resizeCanvas/main.ts index 629e4966..f5765a60 100644 --- a/sample/resizeCanvas/main.ts +++ b/sample/resizeCanvas/main.ts @@ -3,7 +3,9 @@ import redFragWGSL from '../../shaders/red.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/resizeObserverHDDPI/main.ts b/sample/resizeObserverHDDPI/main.ts index b5b5bc4e..1b648cc0 100644 --- a/sample/resizeObserverHDDPI/main.ts +++ b/sample/resizeObserverHDDPI/main.ts @@ -3,7 +3,9 @@ import checkerWGSL from './checker.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/rotatingCube/main.ts b/sample/rotatingCube/main.ts index 1534ee53..386e24d3 100644 --- a/sample/rotatingCube/main.ts +++ b/sample/rotatingCube/main.ts @@ -13,7 +13,9 @@ import vertexPositionColorWGSL from '../../shaders/vertexPositionColor.frag.wgsl import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/shadowMapping/main.ts b/sample/shadowMapping/main.ts index 0f7f5237..eec0b727 100644 --- a/sample/shadowMapping/main.ts +++ b/sample/shadowMapping/main.ts @@ -9,7 +9,9 @@ import { quitIfWebGPUNotAvailable } from '../util'; const shadowDepthTextureSize = 1024; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/texturedCube/main.ts b/sample/texturedCube/main.ts index c4ea82d6..c71db7a0 100644 --- a/sample/texturedCube/main.ts +++ b/sample/texturedCube/main.ts @@ -13,7 +13,9 @@ import sampleTextureMixColorWGSL from './sampleTextureMixColor.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/transparentCanvas/main.ts b/sample/transparentCanvas/main.ts index 7dcc7778..f003d4f6 100644 --- a/sample/transparentCanvas/main.ts +++ b/sample/transparentCanvas/main.ts @@ -13,7 +13,9 @@ import vertexPositionColorWGSL from '../../shaders/vertexPositionColor.frag.wgsl import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/twoCubes/main.ts b/sample/twoCubes/main.ts index dd8a10f3..81d5f18b 100644 --- a/sample/twoCubes/main.ts +++ b/sample/twoCubes/main.ts @@ -13,7 +13,9 @@ import vertexPositionColorWGSL from '../../shaders/vertexPositionColor.frag.wgsl import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/videoUploading/main.ts b/sample/videoUploading/main.ts index 815b5aaf..1fa317e5 100644 --- a/sample/videoUploading/main.ts +++ b/sample/videoUploading/main.ts @@ -3,7 +3,9 @@ import fullscreenTexturedQuadWGSL from '../../shaders/fullscreenTexturedQuad.wgs import sampleExternalTextureWGSL from '../../shaders/sampleExternalTexture.frag.wgsl'; import { quitIfWebGPUNotAvailable } from '../util'; -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/volumeRenderingTexture3D/main.ts b/sample/volumeRenderingTexture3D/main.ts index 78b2a25b..fcb46ea0 100644 --- a/sample/volumeRenderingTexture3D/main.ts +++ b/sample/volumeRenderingTexture3D/main.ts @@ -18,7 +18,9 @@ gui.add(params, 'rotateCamera', true); gui.add(params, 'near', 2.0, 7.0); gui.add(params, 'far', 2.0, 7.0); -const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); +const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' +}); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); const context = canvas.getContext('webgpu') as GPUCanvasContext; diff --git a/sample/worker/worker.ts b/sample/worker/worker.ts index 4d84c795..f03cf3f6 100644 --- a/sample/worker/worker.ts +++ b/sample/worker/worker.ts @@ -35,7 +35,9 @@ self.addEventListener('message', (ev) => { // to the init() method for all the other samples. The remainder of this file is largely identical // to the rotatingCube sample. async function init(canvas) { - const adapter = await navigator.gpu?.requestAdapter({ featureLevel: 'compatibility' }); + const adapter = await navigator.gpu?.requestAdapter({ + featureLevel: 'compatibility' + }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); const context = canvas.getContext('webgpu'); diff --git a/sample/workloadSimulator/index.html b/sample/workloadSimulator/index.html index 03cbabb6..b1de4d56 100644 --- a/sample/workloadSimulator/index.html +++ b/sample/workloadSimulator/index.html @@ -586,7 +586,9 @@

Web graphics workload simulator

try { if (deviceRequested) return; deviceRequested = true; - let adapter = await navigator.gpu.requestAdapter({ featureLevel: 'compatibility' }); + let adapter = await navigator.gpu.requestAdapter({ + featureLevel: 'compatibility' + }); featuresAndLimits.textContent = JSON.stringify( { name: adapter.name, From ccf3ef111514b6be11a2b888176c717c2bcf31fa Mon Sep 17 00:00:00 2001 From: Stephen White Date: Fri, 17 Jan 2025 11:05:39 -0500 Subject: [PATCH 3/3] Add comma after last item in dictionary. --- sample/animometer/main.ts | 2 +- sample/blending/main.ts | 2 +- sample/cameras/main.ts | 2 +- sample/computeBoids/main.ts | 2 +- sample/fractalCube/main.ts | 2 +- sample/gameOfLife/main.ts | 2 +- sample/helloTriangle/main.ts | 2 +- sample/helloTriangleMSAA/main.ts | 2 +- sample/imageBlur/main.ts | 2 +- sample/instancedCube/main.ts | 2 +- sample/multipleCanvases/main.ts | 2 +- sample/normalMap/main.ts | 2 +- sample/occlusionQuery/main.ts | 2 +- sample/points/main.ts | 2 +- sample/renderBundles/main.ts | 2 +- sample/resizeCanvas/main.ts | 2 +- sample/resizeObserverHDDPI/main.ts | 2 +- sample/rotatingCube/main.ts | 2 +- sample/shadowMapping/main.ts | 2 +- sample/texturedCube/main.ts | 2 +- sample/transparentCanvas/main.ts | 2 +- sample/twoCubes/main.ts | 2 +- sample/videoUploading/main.ts | 2 +- sample/volumeRenderingTexture3D/main.ts | 2 +- sample/worker/worker.ts | 2 +- sample/workloadSimulator/index.html | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/sample/animometer/main.ts b/sample/animometer/main.ts index cdca4fa2..4d45b2a3 100644 --- a/sample/animometer/main.ts +++ b/sample/animometer/main.ts @@ -4,7 +4,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/blending/main.ts b/sample/blending/main.ts index 6556dfb5..59b41388 100644 --- a/sample/blending/main.ts +++ b/sample/blending/main.ts @@ -4,7 +4,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; import texturedQuadWGSL from './texturedQuad.wgsl'; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/cameras/main.ts b/sample/cameras/main.ts index 86a5fbd8..dcd2fdef 100644 --- a/sample/cameras/main.ts +++ b/sample/cameras/main.ts @@ -41,7 +41,7 @@ gui.add(params, 'type', ['arcball', 'WASD']).onChange(() => { }); const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/computeBoids/main.ts b/sample/computeBoids/main.ts index 24c58217..f74b2a84 100644 --- a/sample/computeBoids/main.ts +++ b/sample/computeBoids/main.ts @@ -5,7 +5,7 @@ import { GUI } from 'dat.gui'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); quitIfAdapterNotAvailable(adapter); diff --git a/sample/fractalCube/main.ts b/sample/fractalCube/main.ts index 91d68c07..c6f98e73 100644 --- a/sample/fractalCube/main.ts +++ b/sample/fractalCube/main.ts @@ -14,7 +14,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/gameOfLife/main.ts b/sample/gameOfLife/main.ts index 8f87ae4b..363485e4 100644 --- a/sample/gameOfLife/main.ts +++ b/sample/gameOfLife/main.ts @@ -6,7 +6,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/helloTriangle/main.ts b/sample/helloTriangle/main.ts index a88dfd2c..81e75d80 100644 --- a/sample/helloTriangle/main.ts +++ b/sample/helloTriangle/main.ts @@ -4,7 +4,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/helloTriangleMSAA/main.ts b/sample/helloTriangleMSAA/main.ts index 63a677c0..e8783292 100644 --- a/sample/helloTriangleMSAA/main.ts +++ b/sample/helloTriangleMSAA/main.ts @@ -4,7 +4,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/imageBlur/main.ts b/sample/imageBlur/main.ts index 567229c2..0406c7e2 100644 --- a/sample/imageBlur/main.ts +++ b/sample/imageBlur/main.ts @@ -9,7 +9,7 @@ const batch = [4, 4]; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/instancedCube/main.ts b/sample/instancedCube/main.ts index 9a4f0f36..ab51cf89 100644 --- a/sample/instancedCube/main.ts +++ b/sample/instancedCube/main.ts @@ -14,7 +14,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/multipleCanvases/main.ts b/sample/multipleCanvases/main.ts index 1ee07059..8e2ccec9 100644 --- a/sample/multipleCanvases/main.ts +++ b/sample/multipleCanvases/main.ts @@ -47,7 +47,7 @@ function createVertexAndIndexBuffer( } const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/normalMap/main.ts b/sample/normalMap/main.ts index 7ede5441..253ab69b 100644 --- a/sample/normalMap/main.ts +++ b/sample/normalMap/main.ts @@ -19,7 +19,7 @@ enum TextureAtlas { const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/occlusionQuery/main.ts b/sample/occlusionQuery/main.ts index 13a0c8dd..5df06ec4 100644 --- a/sample/occlusionQuery/main.ts +++ b/sample/occlusionQuery/main.ts @@ -32,7 +32,7 @@ export type TypedArrayConstructor = const info = document.querySelector('#info'); const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/points/main.ts b/sample/points/main.ts index 0d2a9ed4..fc48775b 100644 --- a/sample/points/main.ts +++ b/sample/points/main.ts @@ -30,7 +30,7 @@ function createFibonacciSphereVertices({ } const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/renderBundles/main.ts b/sample/renderBundles/main.ts index 5222b56d..1232d994 100644 --- a/sample/renderBundles/main.ts +++ b/sample/renderBundles/main.ts @@ -15,7 +15,7 @@ interface Renderable { const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/resizeCanvas/main.ts b/sample/resizeCanvas/main.ts index f5765a60..1d5dc674 100644 --- a/sample/resizeCanvas/main.ts +++ b/sample/resizeCanvas/main.ts @@ -4,7 +4,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/resizeObserverHDDPI/main.ts b/sample/resizeObserverHDDPI/main.ts index 1b648cc0..65eef702 100644 --- a/sample/resizeObserverHDDPI/main.ts +++ b/sample/resizeObserverHDDPI/main.ts @@ -4,7 +4,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/rotatingCube/main.ts b/sample/rotatingCube/main.ts index 386e24d3..ccdf5685 100644 --- a/sample/rotatingCube/main.ts +++ b/sample/rotatingCube/main.ts @@ -14,7 +14,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/shadowMapping/main.ts b/sample/shadowMapping/main.ts index eec0b727..dc5069db 100644 --- a/sample/shadowMapping/main.ts +++ b/sample/shadowMapping/main.ts @@ -10,7 +10,7 @@ const shadowDepthTextureSize = 1024; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/texturedCube/main.ts b/sample/texturedCube/main.ts index c71db7a0..cefbf80b 100644 --- a/sample/texturedCube/main.ts +++ b/sample/texturedCube/main.ts @@ -14,7 +14,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/transparentCanvas/main.ts b/sample/transparentCanvas/main.ts index f003d4f6..d67d0f80 100644 --- a/sample/transparentCanvas/main.ts +++ b/sample/transparentCanvas/main.ts @@ -14,7 +14,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/twoCubes/main.ts b/sample/twoCubes/main.ts index 81d5f18b..6bd9bfe5 100644 --- a/sample/twoCubes/main.ts +++ b/sample/twoCubes/main.ts @@ -14,7 +14,7 @@ import { quitIfWebGPUNotAvailable } from '../util'; const canvas = document.querySelector('canvas') as HTMLCanvasElement; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/videoUploading/main.ts b/sample/videoUploading/main.ts index 1fa317e5..8e37fcad 100644 --- a/sample/videoUploading/main.ts +++ b/sample/videoUploading/main.ts @@ -4,7 +4,7 @@ import sampleExternalTextureWGSL from '../../shaders/sampleExternalTexture.frag. import { quitIfWebGPUNotAvailable } from '../util'; const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/volumeRenderingTexture3D/main.ts b/sample/volumeRenderingTexture3D/main.ts index fcb46ea0..581659d1 100644 --- a/sample/volumeRenderingTexture3D/main.ts +++ b/sample/volumeRenderingTexture3D/main.ts @@ -19,7 +19,7 @@ gui.add(params, 'near', 2.0, 7.0); gui.add(params, 'far', 2.0, 7.0); const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/worker/worker.ts b/sample/worker/worker.ts index f03cf3f6..0be8298a 100644 --- a/sample/worker/worker.ts +++ b/sample/worker/worker.ts @@ -36,7 +36,7 @@ self.addEventListener('message', (ev) => { // to the rotatingCube sample. async function init(canvas) { const adapter = await navigator.gpu?.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); const device = await adapter?.requestDevice(); quitIfWebGPUNotAvailable(adapter, device); diff --git a/sample/workloadSimulator/index.html b/sample/workloadSimulator/index.html index b1de4d56..ce8933bc 100644 --- a/sample/workloadSimulator/index.html +++ b/sample/workloadSimulator/index.html @@ -587,7 +587,7 @@

Web graphics workload simulator

if (deviceRequested) return; deviceRequested = true; let adapter = await navigator.gpu.requestAdapter({ - featureLevel: 'compatibility' + featureLevel: 'compatibility', }); featuresAndLimits.textContent = JSON.stringify( {