mirror of
https://github.com/servo/servo.git
synced 2025-06-09 00:53:26 +00:00
37 lines
1.8 KiB
Text
37 lines
1.8 KiB
Text
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
// https://gpuweb.github.io/gpuweb/#gpudevice
|
|
[Exposed=(Window, DedicatedWorker), /*Serializable,*/ Pref="dom.webgpu.enabled"]
|
|
interface GPUDevice : EventTarget {
|
|
[SameObject] readonly attribute GPUAdapter adapter;
|
|
readonly attribute object extensions;
|
|
readonly attribute object limits;
|
|
|
|
[SameObject] readonly attribute GPUQueue defaultQueue;
|
|
|
|
GPUBuffer createBuffer(GPUBufferDescriptor descriptor);
|
|
GPUTexture createTexture(GPUTextureDescriptor descriptor);
|
|
GPUSampler createSampler(optional GPUSamplerDescriptor descriptor = {});
|
|
|
|
GPUBindGroupLayout createBindGroupLayout(GPUBindGroupLayoutDescriptor descriptor);
|
|
GPUPipelineLayout createPipelineLayout(GPUPipelineLayoutDescriptor descriptor);
|
|
GPUBindGroup createBindGroup(GPUBindGroupDescriptor descriptor);
|
|
|
|
GPUShaderModule createShaderModule(GPUShaderModuleDescriptor descriptor);
|
|
GPUComputePipeline createComputePipeline(GPUComputePipelineDescriptor descriptor);
|
|
GPURenderPipeline createRenderPipeline(GPURenderPipelineDescriptor descriptor);
|
|
//Promise<GPUComputePipeline> createReadyComputePipeline(GPUComputePipelineDescriptor descriptor);
|
|
//Promise<GPURenderPipeline> createReadyRenderPipeline(GPURenderPipelineDescriptor descriptor);
|
|
|
|
GPUCommandEncoder createCommandEncoder(optional GPUCommandEncoderDescriptor descriptor = {});
|
|
GPURenderBundleEncoder createRenderBundleEncoder(GPURenderBundleEncoderDescriptor descriptor);
|
|
|
|
//GPUQuerySet createQuerySet(GPUQuerySetDescriptor descriptor);
|
|
};
|
|
GPUDevice includes GPUObjectBase;
|
|
|
|
dictionary GPUCommandEncoderDescriptor : GPUObjectDescriptorBase {
|
|
boolean measureExecutionTime = false;
|
|
};
|