summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/webgpu/gpu_adapter.idl
blob: d8669fa2de2edce36d62f5fad90238f73801f986 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://gpuweb.github.io/gpuweb/

enum GPUFeatureName {
    "pipeline-statistics-query",
    "texture-compression-bc",
    "timestamp-query",
    "shader-float16"
};

[
    Exposed(Window WebGPU, Worker WebGPU)
] interface GPUAdapter {
    [HighEntropy=Direct, MeasureAs=GPUAdapter_Name] readonly attribute DOMString name;
    [SameObject] readonly attribute FrozenArray<GPUFeatureName> features;
    // Deprecated
    [CallWith=ExecutionContext, SameObject] readonly attribute FrozenArray<GPUFeatureName> extensions;

    [CallWith=ScriptState] Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {});
};