1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// Copyright 2019 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/
[
Exposed(Window WebGPU, Worker WebGPU)
] interface GPUQueue {
void submit(sequence<GPUCommandBuffer> buffers);
[CallWith=ScriptState] Promise<void> onSubmittedWorkDone();
// TODO(crbug.com/1088107): Merge these overloads into one with
// [AllowShared] BufferSource (or whatever the upstream spec has), which
// would expand this to allow SharedArrayBuffer (can't be implemented now).
[RaisesException] void writeBuffer(
GPUBuffer buffer,
GPUSize64 bufferOffset,
[AllowShared] ArrayBufferView data,
optional GPUSize64 dataElementOffset = 0,
optional GPUSize64 dataElementCount);
[RaisesException] void writeBuffer(
GPUBuffer buffer,
GPUSize64 bufferOffset,
ArrayBuffer data,
optional GPUSize64 dataByteOffset = 0,
optional GPUSize64 byteSize);
[RaisesException] void writeTexture(
GPUImageCopyTexture destination,
[AllowShared] ArrayBufferView data,
GPUImageDataLayout dataLayout,
GPUExtent3D size);
[RaisesException] void writeTexture(
GPUImageCopyTexture destination,
ArrayBuffer data,
GPUImageDataLayout dataLayout,
GPUExtent3D size);
// Deprecated
[RaisesException] void copyImageBitmapToTexture(
GPUImageCopyImageBitmap source,
GPUImageCopyTexture destination,
GPUExtent3D copySize);
[RaisesException] void copyExternalImageToTexture(
GPUImageCopyExternalImage source,
GPUImageCopyTextureTagged destination,
GPUExtent3D copySize);
};
GPUQueue includes GPUObjectBase;
|