bevy/crates/bevy_render/src
IceSentry a22ecede49
Only create changed buffer if it already exists (#13242)
# Objective

- `DynamicUniformBuffer` tries to create a buffer as soon as the changed
flag is set to true. This doesn't work correctly when the buffer wasn't
already created. This currently creates a crash because it's trying to
create a buffer of size 0 if the flag is set but there's no buffer yet.

## Solution

- Don't create a changed buffer until there's data that needs to be
written to a buffer.

## Testing

- run `cargo run --example scene_viewer` and see that it doesn't crash
anymore

Fixes #13235
2024-05-05 22:16:11 +00:00
..
batching Add BufferVec, an higher-performance alternative to StorageBuffer, and make GpuArrayBuffer use it. (#13199) 2024-05-03 11:39:21 +00:00
camera Doc custom CameraProjection requires use of plugin (#13140) 2024-05-05 15:14:00 +00:00
diagnostic Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
mesh Throttle render assets (#12622) 2024-04-26 23:43:33 +00:00
primitives Implement clone for most bundles. (#12993) 2024-04-16 16:37:09 +00:00
render_graph Fix beta lints (#12980) 2024-04-16 02:46:46 +00:00
render_phase Implement GPU frustum culling. (#12889) 2024-04-28 12:50:00 +00:00
render_resource Only create changed buffer if it already exists (#13242) 2024-05-05 22:16:11 +00:00
renderer Disable RAY_QUERY and RAY_TRACING_ACCELERATION_STRUCTURE by default (#12862) 2024-04-04 19:20:19 +00:00
texture Throttle render assets (#12622) 2024-04-26 23:43:33 +00:00
view Only create changed buffer if it already exists (#13242) 2024-05-05 22:16:11 +00:00
alpha.rs Implement alpha to coverage (A2C) support. (#12970) 2024-04-15 20:37:52 +00:00
color_operations.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
extract_component.rs Fix some nightly Clippy lints (#12927) 2024-04-13 02:05:38 +00:00
extract_instances.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +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 Add error when extract resource build fails (#4964) 2024-04-28 05:20:59 +00:00
globals.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
globals.wgsl Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
gpu_component_array_buffer.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
lib.rs Re-export IntoDynamicImageError as public (#13223) 2024-05-04 13:13:49 +00:00
maths.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
pipelined_rendering.rs Make AppExit more specific about exit reason. (#13022) 2024-04-22 16:48:18 +00:00
render_asset.rs asset throttling: don't be exhausted if there is no limit (#13112) 2024-04-27 09:00:10 +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