Skip to main content

GridStaticMeta

Struct GridStaticMeta 

Source
#[repr(C)]
pub struct GridStaticMeta {
Show 20 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], pub aabb_min: [i32; 3], pub _pad2: i32, pub aabb_max: [i32; 3], pub _pad3: i32,
}
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: u32

occupancy 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: u32

New 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: u32

GPU.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: u32

GPU.11 — per-slot color_offsets stride (sum over all mips).

§mip_count: u32

GPU.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.

§aabb_min: [i32; 3]

GPU.13.0 — occupied chunk-AABB (inclusive) in chunk-index space. The outer DDA stops once p_chunk passes this box along the ray’s travel direction (no resident chunk can lie ahead). An empty grid uses the inverted sentinel (aabb_min = i32::MAX, aabb_max = i32::MIN) so every ray early-outs immediately. Maintained live: GpuSceneResident::refresh_chunk / GpuSceneResident::evict_chunk recompute + re-upload it.

§_pad2: i32§aabb_max: [i32; 3]§_pad3: i32

Trait Implementations§

Source§

impl Clone for GridStaticMeta

Source§

fn clone(&self) -> GridStaticMeta

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for GridStaticMeta

Source§

impl Debug for GridStaticMeta

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Pod for GridStaticMeta

Source§

impl Zeroable for GridStaticMeta

Source§

fn zeroed() -> Self

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

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

If this function returns true, then it must be valid to reinterpret bits as &Self.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> NoUninit for T
where T: Pod,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,