GPUAdapter: info property
Khả dụng hạn chế
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
Thuộc tính chỉ đọc info của giao diện GPUAdapter trả về một đối tượng GPUAdapterInfo chứa thông tin nhận diện về bộ điều hợp.
Giá trị
Một phiên bản đối tượng GPUAdapterInfo.
Ví dụ
>Sử dụng info cơ bản
js
const adapter = await navigator.gpu.requestAdapter();
if (!adapter) {
throw Error("Couldn't request WebGPU adapter.");
}
const adapterInfo = adapter.info;
console.log(adapterInfo.vendor);
console.log(adapterInfo.architecture);
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| WebGPU> # dom-gpuadapter-info> |