| // Copyright 2019 The Chromium Authors |
| // 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, Worker), |
| SecureContext |
| ] interface GPUCommandEncoder { |
| [RaisesException] GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor); |
| [RaisesException] GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {}); |
| |
| [NoAllocDirectCall, RaisesException] void copyBufferToBuffer( |
| GPUBuffer source, |
| GPUBuffer destination, |
| optional GPUSize64 size); |
| [NoAllocDirectCall, RaisesException] void copyBufferToBuffer( |
| GPUBuffer source, |
| GPUSize64 sourceOffset, |
| GPUBuffer destination, |
| GPUSize64 destinationOffset, |
| optional GPUSize64 size); |
| |
| [RaisesException] void copyBufferToTexture( |
| GPUTexelCopyBufferInfo source, |
| GPUTexelCopyTextureInfo destination, |
| GPUExtent3D copySize); |
| |
| [RaisesException] void copyTextureToBuffer( |
| GPUTexelCopyTextureInfo source, |
| GPUTexelCopyBufferInfo destination, |
| GPUExtent3D copySize); |
| |
| [RaisesException] void copyTextureToTexture( |
| GPUTexelCopyTextureInfo source, |
| GPUTexelCopyTextureInfo destination, |
| GPUExtent3D copySize); |
| |
| void pushDebugGroup(USVString groupLabel); |
| [NoAllocDirectCall] void popDebugGroup(); |
| void insertDebugMarker(USVString markerLabel); |
| |
| [NoAllocDirectCall] void resolveQuerySet( |
| GPUQuerySet querySet, |
| GPUSize32 firstQuery, |
| GPUSize32 queryCount, |
| GPUBuffer destination, |
| GPUSize64 destinationOffset); |
| |
| [RuntimeEnabled=WebGPUExperimentalFeatures, NoAllocDirectCall, RaisesException] |
| void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex); |
| |
| [NoAllocDirectCall] void clearBuffer( |
| GPUBuffer buffer, |
| optional GPUSize64 offset = 0, |
| optional GPUSize64 size); |
| |
| GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {}); |
| }; |
| GPUCommandEncoder includes GPUObjectBase; |