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§
Source§impl TextureUsage
impl TextureUsage
Sourcepub const fn sampled() -> TextureUsage
pub const fn sampled() -> TextureUsage
Read by a shader and written from the processor, never rendered into.
Sourcepub const fn offscreen() -> TextureUsage
pub const fn offscreen() -> TextureUsage
A plain offscreen render target: the golden and conformance suites run entirely on these.
Trait Implementations§
Source§impl Clone for TextureUsage
impl Clone for TextureUsage
Source§fn clone(&self) -> TextureUsage
fn clone(&self) -> TextureUsage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextureUsage
Source§impl Debug for TextureUsage
impl Debug for TextureUsage
Source§impl Default for TextureUsage
impl Default for TextureUsage
Source§fn default() -> TextureUsage
fn default() -> TextureUsage
Returns the “default value” for a type. Read more
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