#[repr(transparent)]pub struct SDL_GPUBufferUsageFlags(pub Uint32);Expand description
Specifies how a buffer is intended to be used by the client.
A buffer must have at least one usage flag. Note that some usage flag combinations are invalid.
Unlike textures, READ | WRITE can be used for simultaneous read-write usage. The same data synchronization concerns as textures apply.
If you use a STORAGE flag, the data in the buffer must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.
§Availability
This datatype is available since SDL 3.2.0.
§See also
§Known values (sdl3-sys)
| Associated constant | Global constant | Description |
|---|---|---|
VERTEX | SDL_GPU_BUFFERUSAGE_VERTEX | Buffer is a vertex buffer. |
INDEX | SDL_GPU_BUFFERUSAGE_INDEX | Buffer is an index buffer. |
INDIRECT | SDL_GPU_BUFFERUSAGE_INDIRECT | Buffer is an indirect buffer. |
GRAPHICS_STORAGE_READ | SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ | Buffer supports storage reads in graphics stages. |
COMPUTE_STORAGE_READ | SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ | Buffer supports storage reads in the compute stage. |
COMPUTE_STORAGE_WRITE | SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE | Buffer supports storage writes in the compute stage. |
Tuple Fields§
§0: Uint32Implementations§
Source§impl SDL_GPUBufferUsageFlags
impl SDL_GPUBufferUsageFlags
Sourcepub const GRAPHICS_STORAGE_READ: Self
pub const GRAPHICS_STORAGE_READ: Self
Buffer supports storage reads in graphics stages.
Sourcepub const COMPUTE_STORAGE_READ: Self
pub const COMPUTE_STORAGE_READ: Self
Buffer supports storage reads in the compute stage.
Sourcepub const COMPUTE_STORAGE_WRITE: Self
pub const COMPUTE_STORAGE_WRITE: Self
Buffer supports storage writes in the compute stage.
Trait Implementations§
Source§impl BitAnd for SDL_GPUBufferUsageFlags
impl BitAnd for SDL_GPUBufferUsageFlags
Source§impl BitAndAssign for SDL_GPUBufferUsageFlags
impl BitAndAssign for SDL_GPUBufferUsageFlags
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOr for SDL_GPUBufferUsageFlags
impl BitOr for SDL_GPUBufferUsageFlags
Source§impl BitOrAssign for SDL_GPUBufferUsageFlags
impl BitOrAssign for SDL_GPUBufferUsageFlags
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXor for SDL_GPUBufferUsageFlags
impl BitXor for SDL_GPUBufferUsageFlags
Source§impl BitXorAssign for SDL_GPUBufferUsageFlags
impl BitXorAssign for SDL_GPUBufferUsageFlags
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl Clone for SDL_GPUBufferUsageFlags
impl Clone for SDL_GPUBufferUsageFlags
Source§fn clone(&self) -> SDL_GPUBufferUsageFlags
fn clone(&self) -> SDL_GPUBufferUsageFlags
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 SDL_GPUBufferUsageFlags
Available on crate feature debug-impls only.
impl Debug for SDL_GPUBufferUsageFlags
Available on crate feature
debug-impls only.Source§impl Default for SDL_GPUBufferUsageFlags
impl Default for SDL_GPUBufferUsageFlags
Source§fn default() -> SDL_GPUBufferUsageFlags
fn default() -> SDL_GPUBufferUsageFlags
Returns the “default value” for a type. Read more
Source§impl From<SDL_GPUBufferUsageFlags> for Uint32
impl From<SDL_GPUBufferUsageFlags> for Uint32
Source§fn from(value: SDL_GPUBufferUsageFlags) -> Self
fn from(value: SDL_GPUBufferUsageFlags) -> Self
Converts to this type from the input type.
Source§impl GroupMetadata for SDL_GPUBufferUsageFlags
Available on crate feature metadata only.
impl GroupMetadata for SDL_GPUBufferUsageFlags
Available on crate feature
metadata only.Source§const GROUP_METADATA: &'static Group
const GROUP_METADATA: &'static Group
Metadata for this group
Source§impl Hash for SDL_GPUBufferUsageFlags
impl Hash for SDL_GPUBufferUsageFlags
Source§impl Not for SDL_GPUBufferUsageFlags
impl Not for SDL_GPUBufferUsageFlags
Source§impl PartialEq<SDL_GPUBufferUsageFlags> for Uint32
impl PartialEq<SDL_GPUBufferUsageFlags> for Uint32
Source§impl PartialEq<u32> for SDL_GPUBufferUsageFlags
impl PartialEq<u32> for SDL_GPUBufferUsageFlags
Source§impl PartialEq for SDL_GPUBufferUsageFlags
impl PartialEq for SDL_GPUBufferUsageFlags
impl Copy for SDL_GPUBufferUsageFlags
impl Eq for SDL_GPUBufferUsageFlags
impl StructuralPartialEq for SDL_GPUBufferUsageFlags
Auto Trait Implementations§
impl Freeze for SDL_GPUBufferUsageFlags
impl RefUnwindSafe for SDL_GPUBufferUsageFlags
impl Send for SDL_GPUBufferUsageFlags
impl Sync for SDL_GPUBufferUsageFlags
impl Unpin for SDL_GPUBufferUsageFlags
impl UnwindSafe for SDL_GPUBufferUsageFlags
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