WebGPU Engine fails in playground


been wanting to try out WebGPU for a while now, but I can’t get it to work. It also fails in playground:

logger.ts:140 BJS - [06:14:52]: Can not create WebGPU Device and/or context.
e._ErrorEnabled @ logger.ts:140
logger.ts:140 BJS - [06:14:52]: TypeError: Failed to execute 'createRenderPipeline' on 'GPUDevice': Failed to read the 'layout' property from 'GPUPipelineDescriptorBase': Failed to convert value to 'GPUPipelineLayout'.
e._ErrorEnabled @ logger.ts:140
webgpuEngine.ts:727 console.trace
(anonymous) @ webgpuEngine.ts:727
rendererComponent.tsx:378 TypeError: Cannot read properties of undefined (reading 'trackUbosInFrame')
    at new e (uniformBuffer.ts:219:36)
    at t.createSceneUniformBuffer (scene.ts:1905:26)
    at dn.createSceneUniformBuffer (engine.multiview.ts:171:12)
    at t._createUbo (scene.ts:1513:41)
    at new t (scene.ts:1294:14)
    at createScene (<anonymous>:3:17)
    at window.initFunction (<anonymous>:46:16)
    at async O._compileAndRunAsync (rendererComponent.tsx:313:17) 'Retrying if possible. If this error persists please notify the team.'
_compileAndRunAsync @ rendererComponent.tsx:378
webgpuEngine.ts:2581 Uncaught TypeError: Cannot read properties of undefined (reading 'endFrame')
    at t.endFrame (webgpuEngine.ts:2581:33)
    at t._renderLoop (engine.ts:1341:22)

Tried it in three different chromium based browsers on both Linux and Windows (though this is the error I get on Linux).

It’s entirely possible I didn’t enable it properly - used the command line because the flag was removed in favour for the origin trial.

Also, have you considered registering for the “origin trial”? WebGPU - Chrome Developers (use this link to register, it’s wrong on that page: Origin Trials).

Using the flag when starting Chrome does/should work. You can also try to use Chrome Canary which is more up to date regarding the WebGPU support.

WebGPU definitely works for me on Windows 11 with Chrome Canary.

We did register for the origin trial, but I think there’s an expiration date and we need to renew regularly…

Ok, the playground doesn’t have the “origin-trial” meta in the head (at least not that I can see it).

Will give it another try on Windows and let you know what the result is there.

the origin trials is part of the response headers you are receiving from our server. it’s not in the head tag.


1 Like

cheers, I didn’t check the response headers, obviously. :slight_smile:

Alright, on Windows, a much longer error with lots of failed shader compiles and that kind of stuff - I’ll spare you.

The good news is, Chrome Canary makes it work. Thanks a lot!

edit: on linux you can use the google-chrome-unstable package with this added to the commandline: --enable-unsafe-webgpu --enable-features=Vulkan