#[repr(C)]pub struct GpuDrawArgs {
pub index_count: u32,
pub index_offset: u32,
pub base_vertex: u32,
pub flags: u32,
}Expand description
Per-object draw parameters consumed by the GPU-driven compute cull kernel.
Parallel to GpuObjectData (one record per DrawObject, same index):
GpuObjectData carries the cull bounds the kernel tests, this carries the
indexed-draw arguments the kernel encodes into the indirect command buffer
(Metal MTLIndirectCommandBuffer / DirectX ExecuteIndirect argument
buffer / Vulkan multiDrawIndexedIndirect buffer) when an object survives
the cull.
The kernel reads flags to decide an object’s fate without re-deriving it
from the AABB: ENABLED gates the per-frame visible / resident state,
CULLABLE selects whether the object is frustum/distance-tested at all
(mirrors DrawObject::cullable(): non-cullable objects always draw).
Layout (16 bytes) must stay in sync with the GpuDrawArgs struct in
cull.slang and in the Metal ICB encode kernel, cull_encode.metal.
Fields§
§index_count: u32Number of indices to draw (DrawObject::index_count).
index_offset: u32Element offset into the shared index buffer (DrawObject::index_offset).
base_vertex: u32Value added to every index before the vertex fetch
(DrawObject::base_vertex; always >= 0 in practice).
flags: u32Cull-decision bits; see DrawArgsFlags.
Trait Implementations§
Source§impl Clone for GpuDrawArgs
impl Clone for GpuDrawArgs
Source§fn clone(&self) -> GpuDrawArgs
fn clone(&self) -> GpuDrawArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GpuDrawArgs
impl NoUninit for GpuDrawArgs
Auto Trait Implementations§
impl Freeze for GpuDrawArgs
impl RefUnwindSafe for GpuDrawArgs
impl Send for GpuDrawArgs
impl Sync for GpuDrawArgs
impl Unpin for GpuDrawArgs
impl UnsafeUnpin for GpuDrawArgs
impl UnwindSafe for GpuDrawArgs
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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