#[repr(C)]pub struct GPUDevice {
eventtarget: EventTarget,
channel: WebGPU,
adapter: Dom<GPUAdapter>,
extensions: Heap<*mut JSObject>,
limits: GPULimits,
label: DomRefCell<Option<USVString>>,
device: WebGPUDevice,
default_queue: Dom<GPUQueue>,
scope_context: DomRefCell<ScopeContext>,
lost_promise: DomRefCell<Option<Rc<Promise>>>,
}
Fields§
§eventtarget: EventTarget
§channel: WebGPU
§adapter: Dom<GPUAdapter>
§extensions: Heap<*mut JSObject>
§limits: GPULimits
§label: DomRefCell<Option<USVString>>
§device: WebGPUDevice
§default_queue: Dom<GPUQueue>
§scope_context: DomRefCell<ScopeContext>
§lost_promise: DomRefCell<Option<Rc<Promise>>>
Implementations§
source§impl GPUDevice
impl GPUDevice
fn __assert_parent_type(&self)
source§impl GPUDevice
impl GPUDevice
fn new_inherited(
channel: WebGPU,
adapter: &GPUAdapter,
extensions: Heap<*mut JSObject>,
limits: GPULimits,
device: WebGPUDevice,
queue: &GPUQueue,
label: Option<String>
) -> Self
pub fn new(
global: &GlobalScope,
channel: WebGPU,
adapter: &GPUAdapter,
extensions: Heap<*mut JSObject>,
limits: GPULimits,
device: WebGPUDevice,
queue: WebGPUQueue,
label: Option<String>
) -> Root<Dom<Self>>
source§impl GPUDevice
impl GPUDevice
pub fn id(&self) -> WebGPUDevice
pub fn limits(&self) -> &GPULimits
pub fn handle_server_msg(
&self,
scope: Option<ErrorScopeId>,
result: WebGPUOpResult
)
fn handle_error(&self, scope: ErrorScopeId, error: GPUError)
fn try_remove_scope(&self, scope: ErrorScopeId)
fn fire_uncaptured_error(&self, err: GPUError)
pub fn use_current_scope(&self) -> Option<ErrorScopeId>
fn get_pipeline_layout_data(
&self,
layout: &Option<Root<Dom<GPUPipelineLayout>>>
) -> (Option<PipelineLayoutId>, Option<(PipelineLayoutId, Vec<BindGroupLayoutId>)>, Vec<WebGPUBindGroupLayout>)
Trait Implementations§
source§impl Castable for GPUDevice
impl Castable for GPUDevice
source§impl DomObjectWrap for GPUDevice
impl DomObjectWrap for GPUDevice
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::GPUDeviceBinding::GPUDeviceBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::gpudevice::GPUDevice>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gpudevice::GPUDevice>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::GPUDeviceBinding::GPUDeviceBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::gpudevice::GPUDevice>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gpudevice::GPUDevice>>}
source§impl GPUDeviceMethods for GPUDevice
impl GPUDeviceMethods for GPUDevice
source§fn Adapter(&self) -> Root<Dom<GPUAdapter>>
fn Adapter(&self) -> Root<Dom<GPUAdapter>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-adapter
source§fn Extensions(&self, _cx: SafeJSContext) -> NonNull<JSObject>
fn Extensions(&self, _cx: SafeJSContext) -> NonNull<JSObject>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-extensions
source§fn Limits(&self, cx: SafeJSContext) -> NonNull<JSObject>
fn Limits(&self, cx: SafeJSContext) -> NonNull<JSObject>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-limits
source§fn DefaultQueue(&self) -> Root<Dom<GPUQueue>>
fn DefaultQueue(&self) -> Root<Dom<GPUQueue>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-defaultqueue
source§fn GetLabel(&self) -> Option<USVString>
fn GetLabel(&self) -> Option<USVString>
https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
source§fn SetLabel(&self, value: Option<USVString>)
fn SetLabel(&self, value: Option<USVString>)
https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
source§fn Lost(&self, comp: InRealm<'_>) -> Rc<Promise>
fn Lost(&self, comp: InRealm<'_>) -> Rc<Promise>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-lost
source§fn CreateBuffer(&self, descriptor: &GPUBufferDescriptor) -> Root<Dom<GPUBuffer>>
fn CreateBuffer(&self, descriptor: &GPUBufferDescriptor) -> Root<Dom<GPUBuffer>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-createbuffer
source§fn CreateBindGroupLayout(
&self,
descriptor: &GPUBindGroupLayoutDescriptor
) -> Root<Dom<GPUBindGroupLayout>>
fn CreateBindGroupLayout(
&self,
descriptor: &GPUBindGroupLayoutDescriptor
) -> Root<Dom<GPUBindGroupLayout>>
https://gpuweb.github.io/gpuweb/#GPUDevice-createBindGroupLayout
source§fn CreatePipelineLayout(
&self,
descriptor: &GPUPipelineLayoutDescriptor
) -> Root<Dom<GPUPipelineLayout>>
fn CreatePipelineLayout(
&self,
descriptor: &GPUPipelineLayoutDescriptor
) -> Root<Dom<GPUPipelineLayout>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-createpipelinelayout
source§fn CreateBindGroup(
&self,
descriptor: &GPUBindGroupDescriptor
) -> Root<Dom<GPUBindGroup>>
fn CreateBindGroup(
&self,
descriptor: &GPUBindGroupDescriptor
) -> Root<Dom<GPUBindGroup>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-createbindgroup
source§fn CreateShaderModule(
&self,
descriptor: RootedTraceableBox<GPUShaderModuleDescriptor>
) -> Root<Dom<GPUShaderModule>>
fn CreateShaderModule(
&self,
descriptor: RootedTraceableBox<GPUShaderModuleDescriptor>
) -> Root<Dom<GPUShaderModule>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-createshadermodule
source§fn CreateComputePipeline(
&self,
descriptor: &GPUComputePipelineDescriptor
) -> Root<Dom<GPUComputePipeline>>
fn CreateComputePipeline(
&self,
descriptor: &GPUComputePipelineDescriptor
) -> Root<Dom<GPUComputePipeline>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-createcomputepipeline
source§fn CreateCommandEncoder(
&self,
descriptor: &GPUCommandEncoderDescriptor
) -> Root<Dom<GPUCommandEncoder>>
fn CreateCommandEncoder(
&self,
descriptor: &GPUCommandEncoderDescriptor
) -> Root<Dom<GPUCommandEncoder>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-createcommandencoder
source§fn CreateTexture(
&self,
descriptor: &GPUTextureDescriptor
) -> Root<Dom<GPUTexture>>
fn CreateTexture(
&self,
descriptor: &GPUTextureDescriptor
) -> Root<Dom<GPUTexture>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-createtexture
source§fn CreateSampler(
&self,
descriptor: &GPUSamplerDescriptor
) -> Root<Dom<GPUSampler>>
fn CreateSampler(
&self,
descriptor: &GPUSamplerDescriptor
) -> Root<Dom<GPUSampler>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-createsampler
source§fn CreateRenderPipeline(
&self,
descriptor: &GPURenderPipelineDescriptor
) -> Root<Dom<GPURenderPipeline>>
fn CreateRenderPipeline(
&self,
descriptor: &GPURenderPipelineDescriptor
) -> Root<Dom<GPURenderPipeline>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderpipeline
source§fn CreateRenderBundleEncoder(
&self,
descriptor: &GPURenderBundleEncoderDescriptor
) -> Root<Dom<GPURenderBundleEncoder>>
fn CreateRenderBundleEncoder(
&self,
descriptor: &GPURenderBundleEncoderDescriptor
) -> Root<Dom<GPURenderBundleEncoder>>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderbundleencoder
source§fn PushErrorScope(&self, filter: GPUErrorFilter)
fn PushErrorScope(&self, filter: GPUErrorFilter)
https://gpuweb.github.io/gpuweb/#dom-gpudevice-pusherrorscope
source§fn PopErrorScope(&self, comp: InRealm<'_>) -> Rc<Promise>
fn PopErrorScope(&self, comp: InRealm<'_>) -> Rc<Promise>
https://gpuweb.github.io/gpuweb/#dom-gpudevice-poperrorscope
fn GetOnuncapturederror(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnuncapturederror(&self, listener: Option<Rc<EventHandlerNonNull>>)
source§impl HasParent for GPUDevice
impl HasParent for GPUDevice
source§fn as_parent(&self) -> &EventTarget
fn as_parent(&self) -> &EventTarget
This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is