https://playground.babylonjs.com/?webgpu#YX6IB8#758 is calling requestAdapterInfo

Hi, opening https://playground.babylonjs.com/?webgpu#YX6IB8#758 in Safari Technology Preview 205 on macOS shows the error:

r. adapter.requestAdapterinfo is not a function. (In 'r._ adapter.requestAdapterInfo), '._ adapter.requestAdapterInfo' is undefined)

GPUAdapter.requestAdapterinfo is no longer a method in the WebGPU specification. See Replace asynchronous .requestAdapterInfo() with synchronous .info by kainino0x · Pull Request #4662 · gpuweb/gpuweb · GitHub

It has been superseded by the synchronous .info call WebGPU.

Is it possible to use the somewhat new .info instead? It is supported by Chrome for some months now as well.

Welcome @mwyrzykowski !

I believe the main issue here is that you are using a technology preview version of the browser which is ahead of the official one. I also believe the team is aware of the changes and will keep up the framework with the changes when all the browsers will adopt the current webgpu change of getting the adapter info.

You can make changes in the current version of webgpuEngine.ts line 643 and compile the framework:

if ((this._adapter as any).info) {
    this._adapterInfo = (this._adapter as any).info;
} else {
    this._adapter.requestAdapterInfo().then((adapterInfo) => {
        this._adapterInfo = adapterInfo;
    });
}

@Deltakosh @sebavan @Evgeni_Popov do we want a temporary fix for this?

Chrome retails also supports the info property, so here’s the fix: