#[repr(C)]pub struct GridStaticMeta {Show 16 fields
pub occupancy_offset: u32,
pub color_offsets_offset: u32,
pub colors_offset: u32,
pub chunk_colors_base_offset: u32,
pub chunk_occupancy_offset: u32,
pub slot_chunk_idx_offset: u32,
pub vsid: u32,
pub total_slots: u32,
pub pool_dims: [u32; 3],
pub _pad0: u32,
pub occ_words_per_slot: u32,
pub offsets_words_per_slot: u32,
pub mip_count: u32,
pub _pad1: u32,
pub mip_occ_rel: [u32; 6],
pub mip_coff_rel: [u32; 6],
}Expand description
Per-grid static metadata: offsets into the concatenated storage buffers + the grid’s slot-pool dimensions. Uploaded once.
GPU.7 changes: chunks_dims and origin_chunk were dropped.
The shader uses modular slot indexing
(chunk_idx & (pool_dims - 1)) and verifies slot identity via
slot_chunk_idx[slot], so the upload-time bbox is no longer
relevant to the shader.
Fields§
§occupancy_offset: u32occupancy u32-word offset where this grid’s data starts.
color_offsets_offset: u32§colors_offset: u32§chunk_colors_base_offset: u32§chunk_occupancy_offset: u32§slot_chunk_idx_offset: u32New in GPU.7: u32-word offset where this grid’s
slot_chunk_idx array starts (one vec3<i32> per slot,
i.e. 3 u32 words each, plus 1 padding word for std430).
vsid: u32§total_slots: u32§pool_dims: [u32; 3]§_pad0: u32§occ_words_per_slot: u32GPU.11 — per-slot occupancy stride (sum over all mips).
meta_id’s occupancy slab starts at
occupancy_offset + meta_id * occ_words_per_slot.
offsets_words_per_slot: u32GPU.11 — per-slot color_offsets stride (sum over all mips).
mip_count: u32GPU.11 — number of mip levels stored per slot.
_pad1: u32§mip_occ_rel: [u32; 6]GPU.11 — within-slot u32 offset where mip m’s occupancy
starts. mip_occ_rel[0] == 0 so mip-0 reads are unchanged.
mip_coff_rel: [u32; 6]GPU.11 — within-slot u32 offset where mip m’s color_offsets
start. mip_coff_rel[0] == 0.
Trait Implementations§
Source§impl Clone for GridStaticMeta
impl Clone for GridStaticMeta
Source§fn clone(&self) -> GridStaticMeta
fn clone(&self) -> GridStaticMeta
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 GridStaticMeta
Source§impl Debug for GridStaticMeta
impl Debug for GridStaticMeta
impl Pod for GridStaticMeta
Auto Trait Implementations§
impl Freeze for GridStaticMeta
impl RefUnwindSafe for GridStaticMeta
impl Send for GridStaticMeta
impl Sync for GridStaticMeta
impl Unpin for GridStaticMeta
impl UnsafeUnpin for GridStaticMeta
impl UnwindSafe for GridStaticMeta
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.