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 @@