demo · v131
Migration shim for legacy code
Libraries with broad browser support (Babylon.js, Three.js, deck.gl) can't break overnight. The standard pattern is a thin shim that exposes the old requestAdapterInfo() contract on top of the new adapter.info getter — run it locally and let upstream code drop the migration on its own schedule.
removed
adapter.requestAdapterInfo()
// returned a Promise<GPUAdapterInfo>
const info = await adapter.requestAdapterInfo();
console.log(info.vendor, info.architecture);
replacement
adapter.info
// synchronous getter
const info = adapter.info;
console.log(info.vendor, info.architecture);
polyfill that runs on every browser
(function () {
if (typeof GPUAdapter === "undefined") return;
if (!GPUAdapter.prototype.requestAdapterInfo) {
GPUAdapter.prototype.requestAdapterInfo = function (hints) {
// hints is a no-op; the new API never accepted them
return Promise.resolve(this.info);
};
}
})();
click probe to read GPUAdapter for both APIs