Device

Struct Device 

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

Implementations§

Source§

impl Device

Source

pub fn add_ref(&self) -> u64

Source

pub fn release(&self) -> u64

Source§

impl Device

Source

pub fn check_feature_support<T>( &self, feature: Feature, feature_support_data: &mut T, ) -> DxResult<()>

Source

pub fn create_command_allocator( &self, command_list_type: CommandListType, ) -> DxResult<CommandAllocator>

Source

pub fn create_command_list( &self, command_list_type: CommandListType, command_allocator: &CommandAllocator, initial_state: Option<&PipelineState>, ) -> DxResult<CommandList>

Source

pub fn create_command_queue( &self, desc: &CommandQueueDesc, ) -> DxResult<CommandQueue>

Source

pub fn create_committed_resource( &self, heap_props: &HeapProperties, heap_flags: HeapFlags, resource_desc: &ResourceDesc, initial_state: ResourceStates, optimized_clear_value: Option<&ClearValue>, ) -> DxResult<Resource>

Source

pub fn create_compute_pipeline_state( &self, pso_desc: &ComputePipelineStateDesc<'_, '_>, ) -> DxResult<PipelineState>

Source

pub fn create_constant_buffer_view( &self, desc: &ConstantBufferViewDesc, dest_descriptor: CpuDescriptorHandle, )

Source

pub fn create_depth_stencil_view( &self, resource: &Resource, desc: &DepthStencilViewDesc, dest_descriptor: CpuDescriptorHandle, )

Source

pub fn create_descriptor_heap( &self, desc: &DescriptorHeapDesc, ) -> DxResult<DescriptorHeap>

Source

pub fn create_fence( &self, initial_value: u64, flags: FenceFlags, ) -> DxResult<Fence>

Source

pub fn create_graphics_pipeline_state( &self, pso_desc: &GraphicsPipelineStateDesc<'_, '_, '_, '_>, ) -> DxResult<PipelineState>

Source

pub fn create_heap(&self, heap_desc: &HeapDesc) -> DxResult<Heap>

Source

pub fn create_pipeline_state( &self, pso_desc: &PipelineStateStreamDesc<'_>, ) -> DxResult<PipelineState>

Source

pub fn create_placed_resource( &self, heap: &Heap, heap_offset: ByteCount, resource_desc: &ResourceDesc, initial_state: ResourceStates, optimized_clear_value: Option<&ClearValue>, ) -> DxResult<Resource>

Source

pub fn create_query_heap( &self, heap_desc: &QueryHeapDesc, ) -> DxResult<QueryHeap>

Source

pub fn create_render_target_view( &self, resource: &Resource, dest_descriptor: CpuDescriptorHandle, )

Source

pub fn create_reserved_resource( &self, resource_desc: &ResourceDesc, initial_state: ResourceStates, optimized_clear_value: Option<&ClearValue>, ) -> DxResult<Resource>

Source

pub fn create_root_signature( &self, node_mask: UINT, bytecode: &ShaderBytecode<'_>, ) -> DxResult<RootSignature>

Source

pub fn create_sampler( &self, desc: &SamplerDesc, dest_descriptor: CpuDescriptorHandle, )

Source

pub fn create_shader_resource_view( &self, resource: &Resource, desc: Option<&ShaderResourceViewDesc>, dest_descriptor: CpuDescriptorHandle, )

Source

pub fn create_shared_handle( &self, object: &DeviceChild, name: &str, ) -> DxResult<Handle>

Source

pub fn create_unordered_access_view( &self, resource: &Resource, counter_resource: Option<&Resource>, desc: Option<&UnorderedAccessViewDesc>, dest_descriptor: CpuDescriptorHandle, )

Source

pub fn get_copyable_footprints( &self, resource_desc: &ResourceDesc, first_subresouce: u32, num_subresources: u32, base_offset: ByteCount, ) -> (Vec<PlacedSubresourceFootprint>, Vec<u32>, Vec<ByteCount>, ByteCount)

Source

pub fn get_descriptor_handle_increment_size( &self, heap_type: DescriptorHeapType, ) -> ByteCount

Source

pub fn get_device_removed_reason(&self) -> DxError

Source

pub fn get_resource_allocation_info( &self, visible_mask: u32, resource_descs: &[ResourceDesc], ) -> ResourceAllocationInfo

Source

pub fn new(adapter: &Adapter) -> DxResult<Self>

Source

pub fn open_shared_fence_handle(&self, handle: Handle) -> DxResult<Fence>

Source

pub fn open_shared_handle_by_name(&self, name: &str) -> DxResult<Handle>

Source

pub fn open_shared_heap_handle(&self, handle: Handle) -> DxResult<Heap>

Source

pub fn open_shared_resource_handle(&self, handle: Handle) -> DxResult<Resource>

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

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.