pub struct TextureUsage {
pub sampled: bool,
pub render_target: bool,
pub transfer: bool,
pub scanout: bool,
}Expand description
How a texture will be used, which backends need up front to choose a layout.
Fields§
§sampled: boolBound as a shader input.
render_target: boolUsed as a color attachment.
transfer: boolSource or destination of a copy.
scanout: boolWill be exported for scanout.
Backends that can allocate with explicit modifiers use this to pick a layout the display controller accepts, rather than one that is optimal for rendering alone.
Implementations§
Trait Implementations§
Source§impl Clone for TextureUsage
impl Clone for TextureUsage
impl Copy for TextureUsage
Source§impl Debug for TextureUsage
impl Debug for TextureUsage
Source§impl Default for TextureUsage
impl Default for TextureUsage
impl Eq for TextureUsage
Source§impl PartialEq for TextureUsage
impl PartialEq for TextureUsage
impl StructuralPartialEq for TextureUsage
Auto Trait Implementations§
impl Freeze for TextureUsage
impl RefUnwindSafe for TextureUsage
impl Send for TextureUsage
impl Sync for TextureUsage
impl Unpin for TextureUsage
impl UnsafeUnpin for TextureUsage
impl UnwindSafe for TextureUsage
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