pub struct SceneUnpackingJob {
pub render_binned_mesh_instance_buffer: Buffer,
pub bin_metadata_buffer: Buffer,
pub fan_buffer: Buffer,
pub bin_index_to_bin_metadata_index_buffer: Buffer,
pub bin_unpacking_metadata_index: BinUnpackingMetadataIndex,
pub uniform_allocation_metadata_index: UniformAllocationMetadataIndex,
pub mesh_instance_count: u32,
pub bin_count: u32,
}Expand description
CPU-side information needed to construct the bind groups and issue the
dispatch for the unpack_bins and allocate_uniforms shaders, for a single
batch set.
Because those two shaders are always invoked together, we combine the information together for efficiency’s sake.
Fields§
§render_binned_mesh_instance_buffer: BufferThe GPU buffer of GpuRenderBinnedMeshInstances corresponding to the
mesh instances that this batch set contains.
This is used in the unpack_bins shader.
bin_metadata_buffer: BufferThe GPU buffer that stores various metadata for each bin, including the indirect parameters offset and the instance count.
This is used in both the allocate_uniforms and unpack_bins shaders.
fan_buffer: BufferA temporary GPU buffer that stores the mesh uniform index of the last instance plus one for each workgroup (i.e. for each 256-bin chunk).
This is accumulated in the second stage of the allocate_uniforms
shader and written out in the third.
bin_index_to_bin_metadata_index_buffer: BufferA GPU buffer that maps the stable index of each bin to the index of the
metadata in the Self::bin_metadata_buffer.
bin_unpacking_metadata_index: BinUnpackingMetadataIndexThe index of this batch set’s GpuBinUnpackingMetadata in the
SceneUnpackingBuffers::bin_unpacking_metadata buffer.
uniform_allocation_metadata_index: UniformAllocationMetadataIndexThe index of this batch set’s GpuUniformAllocationMetadata in the
SceneUnpackingBuffers::uniform_allocation_metadata buffer.
mesh_instance_count: u32The total number of mesh instances in this batch set.
bin_count: u32The total number of bins (i.e. draws, i.e. separate meshes) in this batch set.
Auto Trait Implementations§
impl !RefUnwindSafe for SceneUnpackingJob
impl !UnwindSafe for SceneUnpackingJob
impl Freeze for SceneUnpackingJob
impl Send for SceneUnpackingJob
impl Sync for SceneUnpackingJob
impl Unpin for SceneUnpackingJob
impl UnsafeUnpin for SceneUnpackingJob
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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
impl<T> ConditionalSend for Twhere
T: Send,
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>, which can then be
downcast into Box<dyn 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>, which 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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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