bevy/crates/bevy_render/src
James Liu e62a01f403
Make PersistentGpuBufferable a safe trait (#12744)
# Objective
Fixes #12727. All parts that `PersistentGpuBuffer` interact with should
be 100% safe both on the CPU and the GPU: `Queue::write_buffer_with`
zeroes out the slice being written to and when uploading to the GPU, and
all slice writes are bounds checked on the CPU side.

## Solution
Make `PersistentGpuBufferable` a safe trait. Enforce it's correct
implementation via assertions. Re-enable `forbid(unsafe_code)` on
`bevy_pbr`.
2024-03-29 13:14:34 +00:00
..
batching Disentangle bevy_utils/bevy_core's reexported dependencies (#12313) 2024-03-07 02:30:15 +00:00
camera Reflect default in some types on bevy_render (#12580) 2024-03-19 22:50:17 +00:00
diagnostic Fix CI for wasm atomics (#12730) 2024-03-26 14:26:21 +00:00
mesh Support calculating normals for indexed meshes (#11654) 2024-03-25 19:09:24 +00:00
primitives Reflect default in some types on bevy_render (#12580) 2024-03-19 22:50:17 +00:00
render_graph Replace bevy_log's tracing reexport with bevy_utils' (#12254) 2024-03-02 18:38:04 +00:00
render_phase Add pipeline statistics (#9135) 2024-03-17 20:29:35 +00:00
render_resource Make PersistentGpuBufferable a safe trait (#12744) 2024-03-29 13:14:34 +00:00
renderer Get Bevy building for WebAssembly with multithreading (#12205) 2024-03-25 19:10:18 +00:00
texture Update image requirement from 0.24 to 0.25 (#12458) 2024-03-29 06:40:09 +00:00
view Get Bevy building for WebAssembly with multithreading (#12205) 2024-03-25 19:10:18 +00:00
alpha.rs Move AlphaMode into bevy_render (#12012) 2024-02-21 19:34:10 +00:00
deterministic.rs Option to enable deterministic rendering (#11248) 2024-01-09 00:46:01 +00:00
extract_component.rs Revert rendering-related associated type name changes (#11027) 2024-01-22 15:01:55 +00:00
extract_instances.rs Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
extract_param.rs Enable the unsafe_op_in_unsafe_fn lint (#11591) 2024-01-28 23:18:11 +00:00
extract_resource.rs Replace bevy_log's tracing reexport with bevy_utils' (#12254) 2024-03-02 18:38:04 +00:00
globals.rs Reflect default in some types on bevy_render (#12580) 2024-03-19 22:50:17 +00:00
globals.wgsl
gpu_component_array_buffer.rs Reorder render sets, refactor bevy_sprite to take advantage (#9236) 2023-08-27 14:33:49 +00:00
lib.rs Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
maths.wgsl Add support for KHR_texture_transform (#11904) 2024-02-21 01:11:28 +00:00
pipelined_rendering.rs Simplified backtraces (#12305) 2024-03-10 12:18:59 +00:00
render_asset.rs reflect: remove manual Reflect impls which could be handled by macros (#12596) 2024-03-23 01:45:00 +00:00
settings.rs Update to wgpu 0.19 and raw-window-handle 0.6 (#11280) 2024-01-26 18:14:21 +00:00
spatial_bundle.rs Implement Clone for VisibilityBundle and SpatialBundle (#10394) 2023-11-07 21:25:00 +00:00