bevy/crates/bevy_pbr/src/meshlet
James Liu a4ed1b88b8
Relax BufferVec's type constraints (#12866)
# Objective
Since BufferVec was first introduced, `bytemuck` has added additional
traits with fewer restrictions than `Pod`. Within BufferVec, we only
rely on the constraints of `bytemuck::cast_slice` to a `u8` slice, which
now only requires `T: NoUninit` which is a strict superset of `Pod`
types.

## Solution
Change out the `Pod` generic type constraint with `NoUninit`. Also
taking the opportunity to substitute `cast_slice` with
`must_cast_slice`, which avoids a runtime panic in place of a compile
time failure if `T` cannot be used.

---

## Changelog
Changed: `BufferVec` now supports working with types containing
`NoUninit` but not `Pod` members.
Changed: `BufferVec` will now fail to compile if used with a type that
cannot be safely read from. Most notably, this includes ZSTs, which
would previously always panic at runtime.
2024-04-05 02:11:41 +00:00
..
asset.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
copy_material_depth.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
cull_meshlets.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
downsample_depth.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
dummy_visibility_buffer_resolve.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
from_mesh.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
gpu_scene.rs Relax BufferVec's type constraints (#12866) 2024-04-05 02:11:41 +00:00
material_draw_nodes.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
material_draw_prepare.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
meshlet_bindings.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
meshlet_mesh_material.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
meshlet_preview.png Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
mod.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
persistent_buffer_impls.rs Make PersistentGpuBufferable a safe trait (#12744) 2024-03-29 13:14:34 +00:00
persistent_buffer.rs Make PersistentGpuBufferable a safe trait (#12744) 2024-03-29 13:14:34 +00:00
pipelines.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
visibility_buffer_raster_node.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
visibility_buffer_raster.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
visibility_buffer_resolve.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
write_index_buffer.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00