Bug 1863873 - Block ability to perform audio decoding outside of Utility on release...
[gecko.git] / dom / webgpu / Utility.h
bloba58faedc14bad377bd56ae1fe0cd20022afff43f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef GPU_UTIL_H_
7 #define GPU_UTIL_H_
9 #include "mozilla/dom/WebGPUBinding.h"
11 namespace mozilla {
12 class ErrorResult;
14 namespace dom {
15 struct GPUComputePassDescriptor;
16 template <typename T>
17 class Sequence;
18 using GPUExtent3D = RangeEnforcedUnsignedLongSequenceOrGPUExtent3DDict;
19 using OwningGPUExtent3D =
20 OwningRangeEnforcedUnsignedLongSequenceOrGPUExtent3DDict;
21 } // namespace dom
22 namespace webgpu {
23 namespace ffi {
24 struct WGPUExtent3d;
25 } // namespace ffi
27 void ConvertExtent3DToFFI(const dom::GPUExtent3D& aExtent,
28 ffi::WGPUExtent3d* aExtentFFI);
30 void ConvertExtent3DToFFI(const dom::OwningGPUExtent3D& aExtent,
31 ffi::WGPUExtent3d* aExtentFFI);
33 ffi::WGPUExtent3d ConvertExtent(const dom::GPUExtent3D& aExtent);
35 ffi::WGPUExtent3d ConvertExtent(const dom::OwningGPUExtent3D& aExtent);
37 ffi::WGPUCompareFunction ConvertCompareFunction(
38 const dom::GPUCompareFunction& aCompare);
40 ffi::WGPUTextureFormat ConvertTextureFormat(
41 const dom::GPUTextureFormat& aFormat);
43 ffi::WGPUMultisampleState ConvertMultisampleState(
44 const dom::GPUMultisampleState& aDesc);
46 ffi::WGPUBlendComponent ConvertBlendComponent(
47 const dom::GPUBlendComponent& aDesc);
49 ffi::WGPUStencilFaceState ConvertStencilFaceState(
50 const dom::GPUStencilFaceState& aDesc);
52 ffi::WGPUDepthStencilState ConvertDepthStencilState(
53 const dom::GPUDepthStencilState& aDesc);
55 } // namespace webgpu
56 } // namespace mozilla
58 #endif // GPU_UTIL_H_