pub struct GpuContextHandle { /* private fields */ }Expand description
Shared handle wrapping a selected backend and diagnostics for why other backends were skipped.
Implementations§
Source§impl GpuContextHandle
impl GpuContextHandle
pub fn backend_kind(&self) -> GpuBackendKind
pub fn adapter_info(&self) -> &GpuAdapterInfo
pub fn skipped(&self) -> &[BackendSkip]
pub fn skipped_summary(&self) -> Vec<String>
pub fn backend_ref(&self) -> &dyn GpuBackend
pub fn capabilities(&self) -> GpuCapabilities
pub fn stats(&self) -> TransferStats
pub fn take_stats(&self) -> TransferStats
pub fn reset_stats(&self) -> TransferStats
pub fn record_download(&self, bytes: u64)
pub fn upload_texture( &self, req: &GpuImageRequest, data: &[u8], ) -> Result<GpuImageHandle, GpuError>
pub fn read_texture(&self, handle: &GpuImageHandle) -> Result<Vec<u8>, GpuError>
pub fn create_buffer( &self, req: &GpuRequest, ) -> Result<GpuBufferHandle, GpuError>
pub fn alloc_upload_buffer( &self, size_bytes: u64, ) -> Result<GpuBufferHandle, GpuError>
pub fn alloc_download_buffer( &self, size_bytes: u64, ) -> Result<GpuBufferHandle, GpuError>
pub fn create_image( &self, req: &GpuImageRequest, ) -> Result<GpuImageHandle, GpuError>
Trait Implementations§
Source§impl Clone for GpuContextHandle
impl Clone for GpuContextHandle
Source§fn clone(&self) -> GpuContextHandle
fn clone(&self) -> GpuContextHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl GpuContext for GpuContextHandle
impl GpuContext for GpuContextHandle
fn backend(&self) -> GpuBackendKind
fn adapter_info(&self) -> GpuAdapterInfo
fn capabilities(&self) -> GpuCapabilities
fn stats(&self) -> TransferStats
fn take_stats(&self) -> TransferStats
fn record_download(&self, bytes: u64)
Auto Trait Implementations§
impl Freeze for GpuContextHandle
impl !RefUnwindSafe for GpuContextHandle
impl Send for GpuContextHandle
impl Sync for GpuContextHandle
impl Unpin for GpuContextHandle
impl !UnwindSafe for GpuContextHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more