bevy/crates
Patrick Walton 7767a8d161
Refactor batch_and_prepare_binned_render_phase in preparation for bin retention. (#16922)
This commit makes the following changes:

* `IndirectParametersBuffer` has been changed from a `BufferVec` to a
`RawBufferVec`. This won about 20us or so on Bistro by avoiding `encase`
overhead.

* The methods on the `GetFullBatchData` trait no longer have the
`entity` parameter, as it was unused.

* `PreprocessWorkItem`, which specifies a transform-and-cull operation,
now supplies the mesh instance uniform output index directly instead of
having the shader look it up from the indirect draw parameters.
Accordingly, the responsibility of writing the output index to the
indirect draw parameters has been moved from the CPU to the GPU. This is
in preparation for retained indirect instance draw commands, where the
mesh instance uniform output index may change from frame to frame, while
the indirect instance draw commands will be cached. We won't want the
CPU to have to upload the same indirect draw parameters again and again
if a batch didn't change from frame to frame.

* `batch_and_prepare_binned_render_phase` and
`batch_and_prepare_sorted_render_phase` now allocate indirect draw
commands for an entire batch set at a time when possible, instead of one
batch at a time. This change will allow us to retain the indirect draw
commands for whole batch sets.

* `GetFullBatchData::get_batch_indirect_parameters_index` has been
replaced with `GetFullBatchData::write_batch_indirect_parameters`, which
takes an offset and writes into it instead of allocating. This is
necessary in order to use the optimization mentioned in the previous
point.

* At the WGSL level, `IndirectParameters` has been factored out into
`mesh_preprocess_types.wgsl`. This is because we'll need a new compute
shader that zeroes out the instance counts in preparation for a new
frame. That shader will need to access `IndirectParameters`, so it was
moved to a separate file.

* Bins are no longer raw vectors but are instances of a separate type,
`RenderBin`. This is so that the bin can eventually contain its retained
batches.
2024-12-30 20:11:31 +00:00
..
bevy_a11y Replace bevy_a11y::Focus with InputFocus (#16863) 2024-12-18 00:16:19 +00:00
bevy_animation Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
bevy_app Add SubApp::take_extract() (#16862) 2024-12-24 18:26:32 +00:00
bevy_asset Fix path checking for FileWatcher for virtual workspace projects (#16958) 2024-12-29 19:43:42 +00:00
bevy_audio Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
bevy_color Fix msrvs (#17012) 2024-12-29 20:00:19 +00:00
bevy_core_pipeline Fix Docs // incorrect default value for ChromaticAberration intensity (#16994) 2024-12-29 19:32:44 +00:00
bevy_derive Add benchmarks and compile_fail tests back to workspace (#16858) 2024-12-21 22:30:29 +00:00
bevy_dev_tools Draw the UI debug overlay using the UI renderer (#16693) 2024-12-11 00:49:47 +00:00
bevy_diagnostic Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_dylib
bevy_ecs Remove unsound Clone impl for EntityMutExcept (#17032) 2024-12-30 05:17:46 +00:00
bevy_encase_derive Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_gilrs Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_gizmos Refactor non-core Curve methods into extension traits (#16930) 2024-12-29 19:26:49 +00:00
bevy_gltf Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
bevy_hierarchy Add no_std support to bevy_hierarchy (#16998) 2024-12-29 19:12:29 +00:00
bevy_image Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_input Add no_std support to bevy_input (#16995) 2024-12-29 22:46:30 +00:00
bevy_input_focus Fix msrvs (#17012) 2024-12-29 20:00:19 +00:00
bevy_internal Expose bevy_image as a feature (#16948) 2024-12-24 03:11:01 +00:00
bevy_log Basic filtering examples for users of the bevy_log. (#16455) 2024-12-29 22:56:40 +00:00
bevy_macro_utils Use one BevyManifest instance in proc macros (#16766) 2024-12-15 15:00:05 +00:00
bevy_math Add no_std support to bevy_input (#16995) 2024-12-29 22:46:30 +00:00
bevy_mesh Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_mikktspace Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_pbr Refactor batch_and_prepare_binned_render_phase in preparation for bin retention. (#16922) 2024-12-30 20:11:31 +00:00
bevy_picking Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
bevy_ptr Fix MSRVs for standalone crates (#16333) 2024-11-17 09:38:13 +00:00
bevy_reflect Add no_std support to bevy_hierarchy (#16998) 2024-12-29 19:12:29 +00:00
bevy_remote BRP registry JSON schema endpoint (#16882) 2024-12-26 22:14:08 +00:00
bevy_render Refactor batch_and_prepare_binned_render_phase in preparation for bin retention. (#16922) 2024-12-30 20:11:31 +00:00
bevy_scene Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
bevy_sprite Refactor batch_and_prepare_binned_render_phase in preparation for bin retention. (#16922) 2024-12-30 20:11:31 +00:00
bevy_state Add no_std support to bevy_state (#17028) 2024-12-29 23:28:18 +00:00
bevy_tasks Move futures.rs, ConditionalSend and BoxedFuture types to bevy_tasks (#16951) 2024-12-29 19:29:53 +00:00
bevy_text Fix Text2d performance regression (#16991) 2024-12-29 23:14:33 +00:00
bevy_time Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_transform track_change_detection: Also track spawns/despawns (#16047) 2024-12-17 04:46:31 +00:00
bevy_ui Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
bevy_utils Add portable-atomic support to bevy_utils for once! (#17027) 2024-12-29 22:50:08 +00:00
bevy_window Make RawHandleWrapper fields private to save users from themselves (#16968) 2024-12-29 19:54:57 +00:00
bevy_winit Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00