pub trait GPUDeviceMethods<D: DomTypes> {
Show 27 methods
// Required methods
fn Features(&self) -> DomRoot<D::GPUSupportedFeatures>;
fn Limits(&self) -> DomRoot<D::GPUSupportedLimits>;
fn AdapterInfo(&self) -> DomRoot<D::GPUAdapterInfo>;
fn GetQueue(&self) -> DomRoot<D::GPUQueue>;
fn Destroy(&self);
fn CreateBuffer(
&self,
cx: &mut JSContext,
descriptor: &GPUBufferDescriptor,
) -> Fallible<DomRoot<D::GPUBuffer>>;
fn CreateTexture(
&self,
cx: &mut JSContext,
descriptor: &GPUTextureDescriptor,
) -> Fallible<DomRoot<D::GPUTexture>>;
fn CreateSampler(
&self,
cx: &mut JSContext,
descriptor: &GPUSamplerDescriptor,
) -> DomRoot<D::GPUSampler>;
fn ImportExternalTexture(
&self,
cx: &mut JSContext,
descriptor: &GPUExternalTextureDescriptor<D>,
) -> Fallible<DomRoot<D::GPUExternalTexture>>;
fn CreateBindGroupLayout(
&self,
cx: &mut JSContext,
descriptor: &GPUBindGroupLayoutDescriptor,
) -> Fallible<DomRoot<D::GPUBindGroupLayout>>;
fn CreatePipelineLayout(
&self,
cx: &mut JSContext,
descriptor: &GPUPipelineLayoutDescriptor<D>,
) -> DomRoot<D::GPUPipelineLayout>;
fn CreateBindGroup(
&self,
cx: &mut JSContext,
descriptor: &GPUBindGroupDescriptor<D>,
) -> DomRoot<D::GPUBindGroup>;
fn CreateShaderModule(
&self,
realm: &mut CurrentRealm<'_>,
descriptor: &GPUShaderModuleDescriptor,
) -> DomRoot<D::GPUShaderModule>;
fn CreateComputePipeline(
&self,
cx: &mut JSContext,
descriptor: &GPUComputePipelineDescriptor<D>,
) -> DomRoot<D::GPUComputePipeline>;
fn CreateRenderPipeline(
&self,
cx: &mut JSContext,
descriptor: &GPURenderPipelineDescriptor<D>,
) -> Fallible<DomRoot<D::GPURenderPipeline>>;
fn CreateComputePipelineAsync(
&self,
realm: &mut CurrentRealm<'_>,
descriptor: &GPUComputePipelineDescriptor<D>,
) -> <D::Promise as PromiseHelpers<D>>::StackRoot;
fn CreateRenderPipelineAsync(
&self,
realm: &mut CurrentRealm<'_>,
descriptor: &GPURenderPipelineDescriptor<D>,
) -> Fallible<<D::Promise as PromiseHelpers<D>>::StackRoot>;
fn CreateCommandEncoder(
&self,
cx: &mut JSContext,
descriptor: &GPUCommandEncoderDescriptor,
) -> DomRoot<D::GPUCommandEncoder>;
fn CreateRenderBundleEncoder(
&self,
cx: &mut JSContext,
descriptor: &GPURenderBundleEncoderDescriptor,
) -> Fallible<DomRoot<D::GPURenderBundleEncoder>>;
fn CreateQuerySet(
&self,
cx: &mut JSContext,
descriptor: &GPUQuerySetDescriptor,
) -> Fallible<DomRoot<D::GPUQuerySet>>;
fn Lost(
&self,
cx: &JSContext,
) -> <D::Promise as PromiseHelpers<D>>::StackRoot;
fn PushErrorScope(&self, filter: GPUErrorFilter);
fn PopErrorScope(
&self,
realm: &mut CurrentRealm<'_>,
) -> <D::Promise as PromiseHelpers<D>>::StackRoot;
fn GetOnuncapturederror(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnuncapturederror(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn Label(&self) -> USVString;
fn SetLabel(&self, cx: &NoGC, value: USVString);
}Required Methods§
fn Features(&self) -> DomRoot<D::GPUSupportedFeatures>
fn Limits(&self) -> DomRoot<D::GPUSupportedLimits>
fn AdapterInfo(&self) -> DomRoot<D::GPUAdapterInfo>
fn GetQueue(&self) -> DomRoot<D::GPUQueue>
fn Destroy(&self)
fn CreateBuffer( &self, cx: &mut JSContext, descriptor: &GPUBufferDescriptor, ) -> Fallible<DomRoot<D::GPUBuffer>>
fn CreateTexture( &self, cx: &mut JSContext, descriptor: &GPUTextureDescriptor, ) -> Fallible<DomRoot<D::GPUTexture>>
fn CreateSampler( &self, cx: &mut JSContext, descriptor: &GPUSamplerDescriptor, ) -> DomRoot<D::GPUSampler>
fn ImportExternalTexture( &self, cx: &mut JSContext, descriptor: &GPUExternalTextureDescriptor<D>, ) -> Fallible<DomRoot<D::GPUExternalTexture>>
fn CreateBindGroupLayout( &self, cx: &mut JSContext, descriptor: &GPUBindGroupLayoutDescriptor, ) -> Fallible<DomRoot<D::GPUBindGroupLayout>>
fn CreatePipelineLayout( &self, cx: &mut JSContext, descriptor: &GPUPipelineLayoutDescriptor<D>, ) -> DomRoot<D::GPUPipelineLayout>
fn CreateBindGroup( &self, cx: &mut JSContext, descriptor: &GPUBindGroupDescriptor<D>, ) -> DomRoot<D::GPUBindGroup>
fn CreateShaderModule( &self, realm: &mut CurrentRealm<'_>, descriptor: &GPUShaderModuleDescriptor, ) -> DomRoot<D::GPUShaderModule>
fn CreateComputePipeline( &self, cx: &mut JSContext, descriptor: &GPUComputePipelineDescriptor<D>, ) -> DomRoot<D::GPUComputePipeline>
fn CreateRenderPipeline( &self, cx: &mut JSContext, descriptor: &GPURenderPipelineDescriptor<D>, ) -> Fallible<DomRoot<D::GPURenderPipeline>>
fn CreateComputePipelineAsync( &self, realm: &mut CurrentRealm<'_>, descriptor: &GPUComputePipelineDescriptor<D>, ) -> <D::Promise as PromiseHelpers<D>>::StackRoot
fn CreateRenderPipelineAsync( &self, realm: &mut CurrentRealm<'_>, descriptor: &GPURenderPipelineDescriptor<D>, ) -> Fallible<<D::Promise as PromiseHelpers<D>>::StackRoot>
fn CreateCommandEncoder( &self, cx: &mut JSContext, descriptor: &GPUCommandEncoderDescriptor, ) -> DomRoot<D::GPUCommandEncoder>
fn CreateRenderBundleEncoder( &self, cx: &mut JSContext, descriptor: &GPURenderBundleEncoderDescriptor, ) -> Fallible<DomRoot<D::GPURenderBundleEncoder>>
fn CreateQuerySet( &self, cx: &mut JSContext, descriptor: &GPUQuerySetDescriptor, ) -> Fallible<DomRoot<D::GPUQuerySet>>
fn Lost(&self, cx: &JSContext) -> <D::Promise as PromiseHelpers<D>>::StackRoot
fn PushErrorScope(&self, filter: GPUErrorFilter)
fn PopErrorScope( &self, realm: &mut CurrentRealm<'_>, ) -> <D::Promise as PromiseHelpers<D>>::StackRoot
fn GetOnuncapturederror( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnuncapturederror( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn Label(&self) -> USVString
fn SetLabel(&self, cx: &NoGC, value: USVString)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".