Skip to main content

Device

Struct Device 

Source
pub struct Device { /* private fields */ }

Implementations§

Source§

impl Device

Source

pub fn as_raw(&self) -> *mut WGPUDeviceImpl

Source

pub fn create_bind_group(&self, descriptor: &BindGroupDescriptor) -> BindGroup

Source

pub fn create_bind_group_layout( &self, descriptor: &BindGroupLayoutDescriptor, ) -> BindGroupLayout

Source

pub fn create_buffer(&self, descriptor: &BufferDescriptor) -> Option<Buffer>

Source

pub fn create_error_buffer(&self, descriptor: &BufferDescriptor) -> Buffer

Source

pub fn create_command_encoder( &self, descriptor: Option<&CommandEncoderDescriptor>, ) -> CommandEncoder

Source

pub fn create_compute_pipeline( &self, descriptor: &ComputePipelineDescriptor, ) -> ComputePipeline

Source

pub fn create_compute_pipeline_async( &self, descriptor: &ComputePipelineDescriptor, callback: impl FnMut(CreatePipelineAsyncStatus, Option<ComputePipeline>, String) + Send + 'static, ) -> Future

Source

pub fn create_external_texture( &self, external_texture_descriptor: &ExternalTextureDescriptor, ) -> ExternalTexture

Source

pub fn create_error_external_texture(&self) -> ExternalTexture

Source

pub fn create_pipeline_layout( &self, descriptor: &PipelineLayoutDescriptor, ) -> PipelineLayout

Source

pub fn create_query_set(&self, descriptor: &QuerySetDescriptor) -> QuerySet

Source

pub fn create_render_pipeline_async( &self, descriptor: &RenderPipelineDescriptor, callback: impl FnMut(CreatePipelineAsyncStatus, Option<RenderPipeline>, String) + Send + 'static, ) -> Future

Source

pub fn create_render_bundle_encoder( &self, descriptor: &RenderBundleEncoderDescriptor, ) -> RenderBundleEncoder

Source

pub fn create_render_pipeline( &self, descriptor: &RenderPipelineDescriptor, ) -> RenderPipeline

Source

pub fn create_sampler(&self, descriptor: Option<&SamplerDescriptor>) -> Sampler

Source

pub fn create_shader_module( &self, descriptor: &ShaderModuleDescriptor, ) -> ShaderModule

Source

pub fn create_error_shader_module( &self, descriptor: &ShaderModuleDescriptor, error_message: String, ) -> ShaderModule

Source

pub fn create_texture(&self, descriptor: &TextureDescriptor) -> Texture

Source

pub fn create_resource_table( &self, descriptor: &ResourceTableDescriptor, ) -> ResourceTable

Source

pub fn import_shared_buffer_memory( &self, descriptor: &SharedBufferMemoryDescriptor, ) -> SharedBufferMemory

Source

pub fn import_shared_texture_memory( &self, descriptor: &SharedTextureMemoryDescriptor, ) -> SharedTextureMemory

Source

pub fn import_shared_fence( &self, descriptor: &SharedFenceDescriptor, ) -> SharedFence

Source

pub fn create_error_texture(&self, descriptor: &TextureDescriptor) -> Texture

Source

pub fn destroy(&self)

Source

pub fn get_a_hardware_buffer_properties( &self, handle: *mut c_void, properties: &mut AHardwareBufferProperties, ) -> Status

Source

pub fn get_limits(&self, limits: &mut Limits) -> Status

Source

pub fn get_lost_future(&self) -> Future

Source

pub fn has_feature(&self, feature: FeatureName) -> bool

Source

pub fn get_features(&self, features: &mut SupportedFeatures)

Source

pub fn get_adapter_info(&self, adapter_info: &mut AdapterInfo) -> Status

Source

pub fn get_adapter(&self) -> Adapter

Source

pub fn get_queue(&self) -> Queue

Source

pub fn inject_error(&self, type: ErrorType, message: String)

Source

pub fn force_loss(&self, type: DeviceLostReason, message: String)

Source

pub fn tick(&self)

Source

pub fn set_logging_callback( &self, callback: impl FnMut(LoggingType, String) + Send + 'static, )

Source

pub fn push_error_scope(&self, filter: ErrorFilter)

Source

pub fn pop_error_scope( &self, callback: impl FnMut(PopErrorScopeStatus, ErrorType, String) + Send + 'static, ) -> Future

Source

pub fn set_label(&self, label: String)

Source

pub fn validate_texture_descriptor(&self, descriptor: &TextureDescriptor)

Trait Implementations§

Source§

impl Clone for Device

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Device

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Device

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for Device

Source§

impl Sync for Device

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.