pub struct GpuBlockInfo {
pub format: GpuFormat,
pub block_width: u32,
pub block_height: u32,
pub bytes_per_block: u32,
}Expand description
Block/stride info for formats (useful if compressed formats are added later).
use daedalus_gpu::{GpuBlockInfo, GpuFormat};
let info = GpuBlockInfo { format: GpuFormat::R8Unorm, block_width: 1, block_height: 1, bytes_per_block: 1 };
assert_eq!(info.bytes_per_block, 1);Fields§
§format: GpuFormat§block_width: u32§block_height: u32§bytes_per_block: u32Trait Implementations§
Source§impl Clone for GpuBlockInfo
impl Clone for GpuBlockInfo
Source§fn clone(&self) -> GpuBlockInfo
fn clone(&self) -> GpuBlockInfo
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 Debug for GpuBlockInfo
impl Debug for GpuBlockInfo
Source§impl<'de> Deserialize<'de> for GpuBlockInfo
impl<'de> Deserialize<'de> for GpuBlockInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GpuBlockInfo
impl PartialEq for GpuBlockInfo
Source§impl Serialize for GpuBlockInfo
impl Serialize for GpuBlockInfo
impl Copy for GpuBlockInfo
impl Eq for GpuBlockInfo
impl StructuralPartialEq for GpuBlockInfo
Auto Trait Implementations§
impl Freeze for GpuBlockInfo
impl RefUnwindSafe for GpuBlockInfo
impl Send for GpuBlockInfo
impl Sync for GpuBlockInfo
impl Unpin for GpuBlockInfo
impl UnwindSafe for GpuBlockInfo
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