Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from bevyengine:main #48

Open
wants to merge 6,225 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
6225 commits
Select commit Hold shift + click to select a range
e66aef2
Correct 'Text2dBundle' to 'Text2d' in example comment (#17425)
theotherphil Jan 19, 2025
5d0e9cf
Flattened `PointerAction::Pressed` into `Press` and `Release`. (#17424)
AlephCubed Jan 19, 2025
8f32c79
Switch `bevy_asset` to `core::prelude` (#17442)
bushrat011899 Jan 20, 2025
edb34cd
Run example validation jobs on `ubuntu-latest` (#17169)
rparrett Jan 20, 2025
a64446b
Create `bevy_platform_support` Crate (#17250)
bushrat011899 Jan 20, 2025
a99674a
`FromWorld` derive macro (#17352)
ecoskey Jan 20, 2025
3f99a3e
Text 2d alignment fix (#17365)
ickshonpe Jan 20, 2025
b2f3248
Make the `animated_mesh` example more intuitive (#17421)
greeble-dev Jan 20, 2025
1dd30a6
Add docs to custom vertex attribute example (#17422)
ChristopherBiscardi Jan 20, 2025
5a9bc28
Support non-Vec data structures in relations (#17447)
alice-i-cecile Jan 20, 2025
59657ed
remove unsound DerefMut impls from `EntityHashMap`/`EntityHashSet` (#…
Victoronz Jan 20, 2025
6fc965e
Expose a few primitive builders, which seemed to be missed? (#17454)
Vrixyz Jan 20, 2025
15facbb
Fixing ui antialiasing clamp call parameters order (#14970) (#17456)
hexroll Jan 20, 2025
ebbd961
docs: enhance documentation in `query.rs` to clarify borrowing rules …
younes-io Jan 20, 2025
a7051a4
Diagnostics for label traits (#17441)
SpecificProtagonist Jan 20, 2025
de54867
Add DefaultQueryFilters (#13120)
NiseVoid Jan 20, 2025
000c362
Include ReflectFromReflect in all dynamic data types. (#17453)
anlumo Jan 20, 2025
ba5e71f
Parent -> ChildOf (#17427)
cart Jan 20, 2025
b34833f
Add an example teaching users about custom relationships (#17443)
alice-i-cecile Jan 20, 2025
42b928b
Added helper methods to `Bundles`. (#17464)
AlephCubed Jan 21, 2025
85eceb0
Add insert and remove recursive methods on `EntityWorldMut` and `Enti…
alice-i-cecile Jan 21, 2025
44ad3bf
Move `Resource` trait to its own file (#17469)
alice-i-cecile Jan 21, 2025
fe24652
Change `World::try_despawn` and `World::try_insert_batch` to return `…
JaySpruce Jan 21, 2025
93e5e6c
fix double comment characters (#17484)
LucDrenth Jan 21, 2025
72ddac1
Retain `RenderMaterialInstances` and `RenderMeshMaterialIds` from fra…
pcwalton Jan 22, 2025
d56536a
Add reflection to the remaining `glam` `Vec` types (#17493)
ilyvion Jan 22, 2025
5c43890
`no_std` Support for `bevy_input_focus` (#17490)
bushrat011899 Jan 22, 2025
f32a6fb
Track callsite for observers & hooks (#15607)
SpecificProtagonist Jan 22, 2025
d921fdc
Add `no_std` Support to `bevy_time` (#17491)
bushrat011899 Jan 22, 2025
784a9d3
Add warning for font sizes `<= 0.0` (#17501)
rparrett Jan 23, 2025
c7ddec5
Fix Time (#17504)
bushrat011899 Jan 23, 2025
41e79ae
Refactored `ComponentHook` Parameters into `HookContext` (#17503)
bushrat011899 Jan 23, 2025
434bbe6
`flex_basis` doc comment fix (#17502)
ickshonpe Jan 23, 2025
9387fcf
Add `no_std` Support to `bevy_a11y` (#17505)
bushrat011899 Jan 23, 2025
fd2afee
Mesh::merge to return a Result (#17475)
Vrixyz Jan 23, 2025
da57dfb
DeriveWorld for enums (#17496)
Bleachfuel Jan 23, 2025
8e6bf06
Add `no_std` support to `bevy_diagnostic` (#17507)
bushrat011899 Jan 23, 2025
17294ee
Update `async-broadcast` (#17500)
rparrett Jan 23, 2025
56aa902
Only include distance fog in the PBR shader if the view uses it. (#17…
pcwalton Jan 23, 2025
68c19de
`Readback`: Add support for texture depth/array layers (#17479)
EmbersArc Jan 23, 2025
dd2d84b
Remove `ViewVisibility` from UI nodes (#17405)
ickshonpe Jan 23, 2025
04990fc
Move `spin` to `bevy_platform_support` out of other crates (#17470)
bushrat011899 Jan 23, 2025
9bc0ae3
Move `hashbrown` and `foldhash` out of `bevy_utils` (#17460)
bushrat011899 Jan 23, 2025
94e0e1f
Updated the 2D examples to make them uniform (#17237)
chamaloriz Jan 23, 2025
d9ba1af
Fix Typo in `bevy_platform_support`'s `spin` Feature (#17516)
bushrat011899 Jan 23, 2025
81a25bb
Procedural atmospheric scattering (#16314)
ecoskey Jan 23, 2025
e459dd9
Replace checks for empty uinodes (#17520)
ickshonpe Jan 24, 2025
14ad252
Make CustomCursor variants CustomCursorImage/CustomCursorUrl structs …
mgi388 Jan 24, 2025
94a238b
implement FromEntitySetIterator (#17513)
Victoronz Jan 24, 2025
e20ac69
Clarify docs for OnAdd, OnInsert, OnReplace, OnRemove triggers (#17512)
RJ Jan 24, 2025
af3a84f
Add many_materials stress test (#17346)
CrazyRoka Jan 24, 2025
40007cd
Adds update interval config for FpsOverlayPlugin (#17489)
spvky Jan 24, 2025
39a1e2b
implement EntityIndexMap/Set (#17449)
Victoronz Jan 24, 2025
deb135c
Proportional scaling for the sprite's texture. (#17258)
silvestrpredko Jan 24, 2025
fc831c3
Implement basic clustered decal projectors. (#17315)
pcwalton Jan 26, 2025
1c765c9
Add support for specular tints and maps per the `KHR_materials_specul…
pcwalton Jan 26, 2025
4995104
impl Eq + Hash for BindGroup/Layout (#17547)
djeedai Jan 26, 2025
1612d21
added Hash to MouseScrollUnit; (#17538)
AustinHellerRepo Jan 26, 2025
eb04f8a
Simplify derive_from_world (#17534)
Bleachfuel Jan 26, 2025
8620cd7
Make the default directional light shadow cascade settings similar to…
pcwalton Jan 27, 2025
dda9788
Implement experimental GPU two-phase occlusion culling for the standa…
pcwalton Jan 27, 2025
7aeb1c5
Disable clustered decals on Metal. (#17554)
pcwalton Jan 27, 2025
37893a3
Fix `Visibility` link on b0004 error page (#17562)
yrns Jan 27, 2025
c0ccc87
UI material border radius (#15171)
ickshonpe Jan 28, 2025
514a35c
Share implementation of sort methods. (#16203)
chescock Jan 28, 2025
15f0027
Rename `ArgList::push` methods to `with` and add new `push` methods w…
atornity Jan 28, 2025
68b779c
Add alpha mode implementation to shader_material_2d (#16603)
Leinnan Jan 28, 2025
99b0d57
Update render_resource gpu buffer doc comments (#17118)
Weshnaw Jan 28, 2025
581034a
Reflect and register the wireframe materials (#17334)
SludgePhD Jan 28, 2025
95174f3
Fix docs mistake in bevy_ecs::world (#17336)
berylllium Jan 28, 2025
644efd6
Fix calculation of skybox rotation (#17476)
hukasu Jan 28, 2025
203d0b4
Move bounding_2d example to math folder (#17523)
NiseVoid Jan 28, 2025
51bb4f0
expose OverflowAxis::Hidden as Overflow functions (#17528)
LucDrenth Jan 28, 2025
dfac3b9
Fix window close in example cause panic (#17533)
jiangheng90 Jan 28, 2025
e8cd12d
Automatically transform cursor hotspot user asks to flip cursor image…
mgi388 Jan 28, 2025
b25bbb7
`Image::get_color_at_3d` and `Image::set_color_at_3d`: Support 2D ima…
EmbersArc Jan 28, 2025
b039bf6
implement UniqueEntityVec (#17549)
Victoronz Jan 28, 2025
a80263a
`no-camera` `many_buttons` argument, only emit UI camera warnings onc…
ickshonpe Jan 28, 2025
5bbcf64
Improved UI camera mapping (#17244)
ickshonpe Jan 28, 2025
d435606
`UiSurface::upsert_node` refactor (#8831)
ickshonpe Jan 28, 2025
b58eda0
feat(ecs): add `EntityEntryCommands::entity()` method chaining (#17580)
JeanMertz Jan 29, 2025
f232674
Remove unnecessary `PartialReflect` bound on `DeserializeWithRegistry…
aecsocket Jan 29, 2025
f7c27b5
Fixes #17508: bevy_color::Color constructor docs get docs matching un…
janis-bhm Jan 29, 2025
909b02e
Fix link to states example (#17595)
scvalex Jan 29, 2025
6bda03c
chore: impl `PartialEq` for `bevy_ui::Text` and `bevy_text::TextColor…
JeanMertz Jan 30, 2025
2c9950f
Remove IDE gitignores (#17603)
SpecificProtagonist Jan 30, 2025
7d68ac0
Use the provided `caller` instead of `Location::caller()` in `despawn…
chescock Jan 30, 2025
59697f9
Make `EntityHashMap::new` and `EntityHashSet::new` const (#17615)
Jondolf Jan 30, 2025
ba1b009
Extract UI nodes into a Vec (#17618)
ickshonpe Jan 30, 2025
fcd1847
`Image::get_color_at` and `Image::set_color_at`: Support 16-bit float…
EmbersArc Jan 31, 2025
e57f732
Smarter testbeds (#17573)
mockersf Jan 31, 2025
082d871
Run handle_lifetime only when AudioSink is added to the world (#17637)
silvestrpredko Feb 2, 2025
33c5e0b
Tiny ci improvements (#17627)
mockersf Feb 2, 2025
361397f
Add a test for direct recursion in required components. (#17626)
ElliottjPierce Feb 2, 2025
7774a62
Fix Maya-exported rigs by not trying to topologically sort glTF nodes…
pcwalton Feb 2, 2025
74acb95
anti-alias outside the edges of UI nodes, not across them (#17631)
ickshonpe Feb 2, 2025
afef7d5
`queue_sprites` comment fix (#17621)
ickshonpe Feb 2, 2025
89a1c49
Fix Taffy viewport node leaks (#17596)
ickshonpe Feb 2, 2025
a893c5d
feat: impl `Ease` for `Isometry[2/3]d` (#17545)
RobWalt Feb 2, 2025
416100a
Fixing `ValArithmeticError` typo and unused variant (#17597)
eckz Feb 2, 2025
9c5ce33
Use more headers in AsBindGroup docs (#17586)
IceSentry Feb 2, 2025
9165fb0
Implement `Serialize`/`Deserialize` for entity collections (#17620)
Jondolf Feb 2, 2025
469b218
Improve ergonomics of `platform_support`'s `Instant` (#17577)
Mathspy Feb 2, 2025
756948e
Fix cursor hotspot out of bounds when flipping (#17571)
mgi388 Feb 2, 2025
55283bb
Revert "Fix rounding bug in camera projection (#16828)" (#17592)
hukasu Feb 2, 2025
75e8e8c
Expose ObserverDescriptor fields (#17623)
cBournhonesque Feb 2, 2025
62285a4
Add simple Disabled marker (#17514)
NiseVoid Feb 2, 2025
aab39d5
Move sprite batches to resource (#17636)
tychedelia Feb 2, 2025
da50648
Add required serde_derive feature flag to bevy_ecs (#17651)
alice-i-cecile Feb 3, 2025
d9df371
Bump crate-ci/typos from 1.29.4 to 1.29.5 (#17655)
dependabot[bot] Feb 3, 2025
f627752
Revert #17631 (#17660)
ickshonpe Feb 3, 2025
adcc80c
Improve `TextSpan` docs (#17415)
rparrett Feb 3, 2025
721bb91
Add basic debug checks for read-only `UnsafeWorldCell` (#17393)
joseph-gio Feb 3, 2025
f22ea72
Atmosphere LUT parameterization improvements (#17555)
mate-h Feb 3, 2025
b978b13
Implementing Reflect on *MeshBuilder types (#17600)
eckz Feb 3, 2025
2d66099
Fix access checks for DeferredWorld as SystemParam. (#17616)
chescock Feb 3, 2025
bdf60d6
Warnings and docs for exponential denormalization in rotate functions…
Novakasa Feb 3, 2025
29d0ef6
Added `try_map_unchanged`. (#17653)
mintlu8 Feb 3, 2025
0ca9d69
Improve docs for `WorldQuery` (#17654)
alice-i-cecile Feb 3, 2025
18c4050
Make `batch_and_prepare_binned_render_phase` only record information …
pcwalton Feb 4, 2025
8c7f1b3
Fix text-2d. (#17674)
tychedelia Feb 4, 2025
642e016
Bump to `uuid` 1.13.1 and enable `js` on `wasm` targets (#17689)
bushrat011899 Feb 5, 2025
48049f7
Don't mark a previous mesh transform as changed if it didn't actually…
pcwalton Feb 5, 2025
69b2ae8
Don't reallocate work item buffers every frame. (#17684)
pcwalton Feb 5, 2025
be9b38e
implement UniqueEntitySlice (#17589)
Victoronz Feb 5, 2025
2ea5e9b
Cold Specialization (#17567)
tychedelia Feb 5, 2025
6f39e44
Introduce methods on QueryState to obtain a Query (#15858)
chescock Feb 5, 2025
6be11a8
Change `GhostNode` into a unit type (#17692)
ickshonpe Feb 5, 2025
03af547
Move `Item` and `fetch` to `QueryData` from `WorldQuery` (#17679)
couyit Feb 5, 2025
ca6b07c
Fix a couple of doc typos (#17673)
theotherphil Feb 5, 2025
03ec644
Basic UI text shadows (#17559)
ickshonpe Feb 5, 2025
ff466a3
Add `weak_handle!` convenience macro (#17384)
SludgePhD Feb 5, 2025
d0c0bad
Split `Component::register_component_hooks` into individual methods (…
bushrat011899 Feb 5, 2025
1b2cf7d
Isolate component registration (#17671)
ElliottjPierce Feb 5, 2025
fdc7cb3
Add a Sphere to `anisotropy` example (#17676)
hukasu Feb 5, 2025
0335f34
Add missing return in default `Relationship::on_insert` impl (#17675)
grind086 Feb 5, 2025
989f547
Weak handle migration (#17695)
SludgePhD Feb 5, 2025
9ea9c5d
Add `edit_material_on_gltf` example (#17677)
hukasu Feb 5, 2025
f2a65c2
Schedule build pass (#11094)
Neo-Zhixing Feb 5, 2025
3c8fae2
Improved Entity Mapping and Cloning (#17687)
cart Feb 6, 2025
6ed3c32
Missing UI glpyhs fix (#17729)
ickshonpe Feb 7, 2025
bcfc086
Include the material bind group in the shadow batch set key. (#17738)
pcwalton Feb 8, 2025
7c2d54c
EaseFunction svg graphs in doc (#17461)
SpecificProtagonist Feb 8, 2025
a9de516
Tidy up `easing_functions` example (#17742)
rparrett Feb 8, 2025
f3d8eb8
Fix rounding in steps easing function (#17743)
rparrett Feb 8, 2025
7fc122a
Retain bins from frame to frame. (#17698)
pcwalton Feb 8, 2025
9f9373c
Fix shadow retention by keying off the `RetainedViewEntity`, not the …
pcwalton Feb 9, 2025
556b750
Set late indirect parameter offsets every frame again. (#17736)
pcwalton Feb 9, 2025
2d62026
main_transparent_pass_2d render node command encoding parallelization…
PPakalns Feb 9, 2025
af6629c
Move specialize_* to QueueMeshes. (#17719)
tychedelia Feb 9, 2025
7400e7a
Cleanup publish process (#17728)
mockersf Feb 9, 2025
0b11b1f
deps: bump notify-debouncer-full to remove unmaintained crate (#17741)
SilentSpaceTraveller Feb 9, 2025
33e8333
Add entity disabling example (#17710)
alice-i-cecile Feb 9, 2025
669d139
Upgrade to wgpu v24 (#17542)
JMS55 Feb 9, 2025
1b7db89
Harden proc macro path resolution and add integration tests. (#17330)
raldone01 Feb 9, 2025
c679b86
adds example for local defaults (#17751)
newclarityex Feb 9, 2025
ea57841
Improved Spawn APIs and Bundle Effects (#17521)
cart Feb 9, 2025
300fe4d
Store UI render target info locally per node (#17579)
ickshonpe Feb 10, 2025
232824c
Fix meshlets when bindless disabled. (#17770)
tychedelia Feb 10, 2025
f176448
Remove `labeled_assets` from `LoadedAsset` and `ErasedLoadedAsset` (#…
andriyDev Feb 10, 2025
8e84b46
many_components stress test improvements (#16913)
hymm Feb 10, 2025
4ecbe00
Add a custom render phase example (#16916)
IceSentry Feb 10, 2025
eee7fd5
Encapsulate `cfg(feature = "track_location")` in a type. (#17602)
chescock Feb 10, 2025
2660ddc
Support decibels in bevy_audio::Volume (#17605)
mgi388 Feb 10, 2025
8435951
Add scroll functionality to bevy_picking (#17704)
colepoirier Feb 10, 2025
7f9588d
Fix documentation of `Entities::get` (#17721)
urben1680 Feb 10, 2025
c34a2c2
`Query::get_many` should not check for duplicates (#17724)
chescock Feb 10, 2025
4fe5776
make bevy math publishable (#17727)
mockersf Feb 10, 2025
db03565
CosmicBuffer is a public type but not not used or accessible in any p…
fschlee Feb 10, 2025
3978ba9
Allowed creating uninitialized images (for use as storage textures) (…
Lege19 Feb 10, 2025
f27e00b
Derive Reflect on Skybox (#17781)
jf908 Feb 10, 2025
359cd43
UI clipping update function comments fix (#17785)
ickshonpe Feb 10, 2025
7d14182
run example in CI on windows using static dxc (#17783)
mockersf Feb 10, 2025
71b2239
Expand `EasingCurve` documentation (#17778)
greeble-dev Feb 10, 2025
a861452
Add user supplied mesh tag (#17648)
tychedelia Feb 10, 2025
69db29e
Sweep bins after queuing so as to only sweep them once. (#17787)
pcwalton Feb 10, 2025
83370e0
Use dual-source blending for rendering the sky (#17672)
ecoskey Feb 10, 2025
575f665
Silence deprecation warning in `Bundle` derive macro (#17369) (#17790)
Person-93 Feb 11, 2025
5e9da92
Add links to the types on the documentation of `GltfAssetLabel` (#17791)
hukasu Feb 11, 2025
fcc77fe
Allow users to register their own disabling components / default quer…
alice-i-cecile Feb 11, 2025
fb0e5c4
Fix failing proc macros when depending on bevy through dev and normal…
raldone01 Feb 11, 2025
c896ad6
Split the labels in many_buttons (#17802)
ickshonpe Feb 11, 2025
fd67ca7
feat(ecs): configurable error handling for fallible systems (#17753)
JeanMertz Feb 11, 2025
5eff6e8
Add relative position reporting to UI picking (#17681)
bytemunch Feb 11, 2025
d6725d3
Expose method to update the internal ticks of Ref and Mut (#17716)
cBournhonesque Feb 11, 2025
5b0d898
Trait tags on docs.rs (#17758)
SpecificProtagonist Feb 11, 2025
7d8504f
feat(ecs): implement fallible observer systems (#17731)
JeanMertz Feb 11, 2025
98dcee2
UI text extraction refactor (#17805)
ickshonpe Feb 11, 2025
aa8793f
Add ways to configure `EasingFunction::Steps` via new `StepConfig` (#…
RobWalt Feb 11, 2025
0cb3eae
Fix validation errors in `Fox.glb` (#17801)
rparrett Feb 11, 2025
fe7a29e
Fix error in scene example (#17799)
rparrett Feb 11, 2025
fc98664
Add tonemapping switch to bloom 2d example (#17789)
hukasu Feb 11, 2025
7a62a4f
gate get_tag behind ndef MESHLET_MESH_MATERIAL_PASS (#17809)
mockersf Feb 11, 2025
ce43395
Don't relocate the meshes when mesh slabs grow. (#17793)
pcwalton Feb 11, 2025
85b366a
Cache `MeshInputUniform` indices in each `RenderBin`. (#17772)
pcwalton Feb 11, 2025
94deca8
Use `target_abi = "sim"` instead of `ios_simulator` feature (#17702)
madsmtm Feb 11, 2025
7398d33
Panic on failure in `scene` example (#17812)
rparrett Feb 11, 2025
cff1736
Deterministic fallible_systems example (#17813)
mockersf Feb 11, 2025
153ce46
implement iterators that yield UniqueEntitySlice (#17796)
Victoronz Feb 12, 2025
15b795d
Use unchecked shaders for better performance (#17767)
JMS55 Feb 12, 2025
c34eaf1
Add separate option to control font size behavior in `many_text2d` (#…
rparrett Feb 12, 2025
2f9613f
Minor tidying in `font_atlas_debug` (#17825)
rparrett Feb 12, 2025
2fd4cc4
Meshlet texture atomics (#17765)
JMS55 Feb 12, 2025
267a0d0
Add ComponentId-taking functions to Entity{Ref,Mut}Except to mirror F…
anlumo Feb 12, 2025
5ff7062
Switch bins from parallel key/value arrays to `IndexMap`s. (#17819)
pcwalton Feb 12, 2025
62c1812
Shorten the 'world lifetime returned from `QueryLens::query()`. (#17694)
chescock Feb 12, 2025
0ede857
Build batches across phases in parallel. (#17764)
pcwalton Feb 13, 2025
610fe51
Update `HitData` position docs (#17833)
bytemunch Feb 13, 2025
2760692
Update `typos` to 1.29.6 (#17850)
rparrett Feb 13, 2025
5ec59cf
Add `NodeImageMode` to the UI prelude (#17848)
ickshonpe Feb 13, 2025
96a4028
Improve clarity of existing bevy_assets documentation (#17830)
alice-i-cecile Feb 13, 2025
05e61d6
implement par_iter_many and par_iter_many_unique (#17815)
Victoronz Feb 13, 2025
101fcaa
Combine `output_index` and `indirect_parameters_index` into one field…
pcwalton Feb 13, 2025
02985c3
`ui_material` example webgl2 fix (#17852)
ickshonpe Feb 13, 2025
0f1c757
Fill out some missing docs for bevy_assets (#17829)
alice-i-cecile Feb 13, 2025
6b837dd
Remove prepasses from the render world when they're removed from the …
pcwalton Feb 14, 2025
3c9e696
Actually add objects to the scene buffers in sorted render phases. (#…
pcwalton Feb 14, 2025
253cc6a
Add `TypeRegistry::register_by_val` (#17817)
NyxAlexandra Feb 15, 2025
7935c7e
Update picking docs to include position space (#17859)
bytemunch Feb 15, 2025
d7fd00a
Bump Rust tracy client version (#17867)
mate-h Feb 15, 2025
0a32450
Support using FilteredResources with ReflectResource. (#15624)
chescock Feb 16, 2025
794bf6a
Move implementations of `Query` methods from `QueryState` to `Query`.…
chescock Feb 16, 2025
7801ed3
Don't delete the buffers that batch building writes into every frame.…
pcwalton Feb 16, 2025
137878a
Replace `BufferVec<PreprocessWorkItem>` with `RawBufferVec<Preprocess…
pcwalton Feb 16, 2025
e186c7c
Fix panic in `custom_render_phase` example (#17866)
rparrett Feb 16, 2025
ee44560
Add `EntityDoesNotExistError`, replace cases of `Entity` as an error,…
JaySpruce Feb 16, 2025
be3c6f7
Improve the docs for ChildOf and Children (#17886)
alice-i-cecile Feb 17, 2025
4045b91
Fix `dds` feature enabling `bevy_gltf` (#17888)
rparrett Feb 17, 2025
45c2666
Fixed `bevy_image` and `bevy_gltf` failing to compile with some featu…
AlephCubed Feb 17, 2025
82f6f70
Fix typos CREDITS.md (#17899)
axlitEels Feb 17, 2025
8e783d3
Sweep old entities from 2D binned render phases (#17903)
superdump Feb 17, 2025
fb1e829
Bump `typos` to 1.29.7 (#17902)
rparrett Feb 17, 2025
8f36106
Split out the `IndirectParametersMetadata` into CPU-populated and GPU…
pcwalton Feb 18, 2025
8976a45
Retain skins from frame to frame. (#17818)
pcwalton Feb 18, 2025
5e569af
Make the specialized pipeline cache two-level. (#17915)
pcwalton Feb 18, 2025
0517b96
Fix motion vector computation after #17688. (#17717)
pcwalton Feb 18, 2025
73970d0
Don't mark newly-hidden meshes invisible until all visibility-determi…
pcwalton Feb 18, 2025
c818c92
Add option to animate materials in many_cubes (#17927)
DGriffin91 Feb 18, 2025
ed62e59
Shader validation enum (#17824)
fjkorf Feb 20, 2025
9e11e96
Fix false positive GPU frustum culling (#17939)
mate-h Feb 20, 2025
f15437e
Rewrite the multidrawable batch set builder for performance. (#17923)
pcwalton Feb 20, 2025
8de6b16
Implement occlusion culling for the deferred rendering pipeline. (#17…
pcwalton Feb 20, 2025
6bcb2b6
Remove unused `#[must_used]` (#17959)
bushrat011899 Feb 21, 2025
2844133
Use global binding arrays for bindless resources. (#17898)
pcwalton Feb 21, 2025
4880a23
Implement occlusion culling for directional light shadow maps. (#17951)
pcwalton Feb 21, 2025
052b9d8
Fix issue with `define_label!` instantiation in a 3rd party crate (#1…
ItsDoot Feb 21, 2025
f3b2139
Only despawn scene entities still in the hierarchy (#17938)
cart Feb 22, 2025
63e0f79
Enable `nonstandard_macro_braces` and enforce `[]` for `children!` (#…
BD103 Feb 22, 2025
a7cb061
Use fully qualified syntax in assertions. (#17936)
DragonGamesStudios Feb 22, 2025
9046859
Fix 1x1 dds textures being interpreted as 1-dimensional (#17890)
rparrett Feb 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't reallocate work item buffers every frame. (bevyengine#17684)
We were calling `clear()` on the work item buffer table, which caused us
to deallocate all the CPU side buffers. This patch changes the logic to
instead just clear the buffers individually, but leave their backing
stores. This has two consequences:

1. To effectively retain work item buffers from frame to frame, we need
to key them off `RetainedViewEntity` values and not the render world
`Entity`, which is transient. This PR changes those buffers accordingly.

2. We need to clean up work item buffers that belong to views that went
away. Amusingly enough, we actually have a system,
`delete_old_work_item_buffers`, that tries to do this already, but it
wasn't doing anything because the `clear_batched_gpu_instance_buffers`
system already handled that. This patch actually makes the
`delete_old_work_item_buffers` system useful, by removing the clearing
behavior from `clear_batched_gpu_instance_buffers` and instead making
`delete_old_work_item_buffers` delete buffers corresponding to
nonexistent views.

On Bistro, this PR improves the performance of
`batch_and_prepare_binned_render_phase` from 61.2 us to 47.8 us, a 28%
speedup.

![Screenshot 2025-02-04
135542](https://github.com/user-attachments/assets/b0ecb551-f6c8-4677-8e4e-e39aa28115a3)
  • Loading branch information
pcwalton authored Feb 5, 2025
commit 69b2ae871c368d91393046b3173b058d636b8b4e
28 changes: 20 additions & 8 deletions crates/bevy_pbr/src/render/gpu_preprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use bevy_render::{
},
renderer::{RenderContext, RenderDevice, RenderQueue},
settings::WgpuFeatures,
view::{NoIndirectDrawing, ViewUniform, ViewUniformOffset, ViewUniforms},
view::{ExtractedView, NoIndirectDrawing, ViewUniform, ViewUniformOffset, ViewUniforms},
Render, RenderApp, RenderSet,
};
use bevy_utils::TypeIdMap;
Expand Down Expand Up @@ -100,7 +100,7 @@ pub struct GpuMeshPreprocessPlugin {
pub struct EarlyGpuPreprocessNode {
view_query: QueryState<
(
Entity,
Read<ExtractedView>,
Option<Read<PreprocessBindGroups>>,
Option<Read<ViewUniformOffset>>,
Has<NoIndirectDrawing>,
Expand All @@ -120,7 +120,11 @@ pub struct EarlyGpuPreprocessNode {
/// metadata for the subsequent [`LatePrepassBuildIndirectParametersNode`].
pub struct LateGpuPreprocessNode {
view_query: QueryState<
(Entity, Read<PreprocessBindGroups>, Read<ViewUniformOffset>),
(
Read<ExtractedView>,
Read<PreprocessBindGroups>,
Read<ViewUniformOffset>,
),
(
Without<SkipGpuPreprocess>,
Without<NoIndirectDrawing>,
Expand Down Expand Up @@ -580,7 +584,8 @@ impl Node for EarlyGpuPreprocessNode {
};

// Grab the work item buffers for this view.
let Some(phase_work_item_buffers) = index_buffers.get(&view) else {
let Some(phase_work_item_buffers) = index_buffers.get(&view.retained_view_entity)
else {
warn!("The preprocessing index buffer wasn't present");
continue;
};
Expand Down Expand Up @@ -791,7 +796,8 @@ impl Node for LateGpuPreprocessNode {
// Run the compute passes.
for (view, bind_groups, view_uniform_offset) in self.view_query.iter_manual(world) {
// Grab the work item buffers for this view.
let Some(phase_work_item_buffers) = work_item_buffers.get(&view) else {
let Some(phase_work_item_buffers) = work_item_buffers.get(&view.retained_view_entity)
else {
warn!("The preprocessing index buffer wasn't present");
continue;
};
Expand Down Expand Up @@ -1619,6 +1625,7 @@ impl BuildIndirectParametersPipeline {
)]
pub fn prepare_preprocess_bind_groups(
mut commands: Commands,
views: Query<(Entity, &ExtractedView)>,
view_depth_pyramids: Query<(&ViewDepthPyramid, &PreviousViewUniformOffset)>,
render_device: Res<RenderDevice>,
batched_instance_buffers: Res<BatchedInstanceBuffers<MeshUniform, MeshInputUniform>>,
Expand Down Expand Up @@ -1651,14 +1658,19 @@ pub fn prepare_preprocess_bind_groups(
let mut any_indirect = false;

// Loop over each view.
for (view, phase_work_item_buffers) in work_item_buffers {
for (view_entity, view) in &views {
let Some(phase_work_item_buffers) = work_item_buffers.get(&view.retained_view_entity)
else {
continue;
};

let mut bind_groups = TypeIdMap::default();

// Loop over each phase.
for (&phase_id, work_item_buffers) in phase_work_item_buffers {
// Create the `PreprocessBindGroupBuilder`.
let preprocess_bind_group_builder = PreprocessBindGroupBuilder {
view: *view,
view: view_entity,
late_indexed_indirect_parameters_buffer,
late_non_indexed_indirect_parameters_buffer,
render_device: &render_device,
Expand Down Expand Up @@ -1719,7 +1731,7 @@ pub fn prepare_preprocess_bind_groups(

// Save the bind groups.
commands
.entity(*view)
.entity(view_entity)
.insert(PreprocessBindGroups(bind_groups));
}

Expand Down
62 changes: 46 additions & 16 deletions crates/bevy_render/src/batching/gpu_preprocessing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use core::any::TypeId;

use bevy_app::{App, Plugin};
use bevy_ecs::{
entity::{hash_map::EntityHashMap, Entity},
query::{Has, With},
resource::Resource,
schedule::IntoSystemConfigs as _,
Expand All @@ -13,7 +12,7 @@ use bevy_ecs::{
};
use bevy_encase_derive::ShaderType;
use bevy_math::UVec4;
use bevy_platform_support::collections::hash_map::Entry;
use bevy_platform_support::collections::{hash_map::Entry, HashMap, HashSet};
use bevy_utils::{default, TypeIdMap};
use bytemuck::{Pod, Zeroable};
use nonmax::NonMaxU32;
Expand All @@ -30,7 +29,7 @@ use crate::{
},
render_resource::{Buffer, BufferVec, GpuArrayBufferable, RawBufferVec, UninitBufferVec},
renderer::{RenderAdapter, RenderDevice, RenderQueue},
view::{ExtractedView, NoIndirectDrawing},
view::{ExtractedView, NoIndirectDrawing, RetainedViewEntity},
Render, RenderApp, RenderSet,
};

Expand Down Expand Up @@ -157,7 +156,7 @@ where
/// corresponds to each instance.
///
/// This is keyed off each view. Each view has a separate buffer.
pub work_item_buffers: EntityHashMap<TypeIdMap<PreprocessWorkItemBuffers>>,
pub work_item_buffers: HashMap<RetainedViewEntity, TypeIdMap<PreprocessWorkItemBuffers>>,

/// The uniform data inputs for the current frame.
///
Expand Down Expand Up @@ -409,8 +408,8 @@ impl Default for LatePreprocessWorkItemIndirectParameters {
/// You may need to call this function if you're implementing your own custom
/// render phases. See the `specialized_mesh_pipeline` example.
pub fn get_or_create_work_item_buffer<'a, I>(
work_item_buffers: &'a mut EntityHashMap<TypeIdMap<PreprocessWorkItemBuffers>>,
view: Entity,
work_item_buffers: &'a mut HashMap<RetainedViewEntity, TypeIdMap<PreprocessWorkItemBuffers>>,
view: RetainedViewEntity,
no_indirect_drawing: bool,
gpu_occlusion_culling: bool,
late_indexed_indirect_parameters_buffer: &'_ mut RawBufferVec<
Expand Down Expand Up @@ -493,6 +492,28 @@ impl PreprocessWorkItemBuffers {
}
}
}

/// Clears out the GPU work item buffers in preparation for a new frame.
pub fn clear(&mut self) {
match *self {
PreprocessWorkItemBuffers::Direct(ref mut buffer) => {
buffer.clear();
}
PreprocessWorkItemBuffers::Indirect {
indexed: ref mut indexed_buffer,
non_indexed: ref mut non_indexed_buffer,
ref mut gpu_occlusion_culling,
} => {
indexed_buffer.clear();
non_indexed_buffer.clear();

if let Some(ref mut gpu_occlusion_culling) = *gpu_occlusion_culling {
gpu_occlusion_culling.late_indexed.clear();
gpu_occlusion_culling.late_non_indexed.clear();
}
}
}
}
}

/// One invocation of the preprocessing shader: i.e. one mesh instance in a
Expand Down Expand Up @@ -942,7 +963,7 @@ where
pub fn new() -> Self {
BatchedInstanceBuffers {
data_buffer: UninitBufferVec::new(BufferUsages::STORAGE),
work_item_buffers: EntityHashMap::default(),
work_item_buffers: HashMap::default(),
current_input_buffer: InstanceInputUniformBuffer::new(),
previous_input_buffer: InstanceInputUniformBuffer::new(),
late_indexed_indirect_parameters_buffer: RawBufferVec::new(
Expand All @@ -968,7 +989,14 @@ where
self.data_buffer.clear();
self.late_indexed_indirect_parameters_buffer.clear();
self.late_non_indexed_indirect_parameters_buffer.clear();
self.work_item_buffers.clear();

// Clear each individual set of buffers, but don't depopulate the hash
// table. We want to avoid reallocating these vectors every frame.
for view_work_item_buffers in self.work_item_buffers.values_mut() {
for phase_work_item_buffers in view_work_item_buffers.values_mut() {
phase_work_item_buffers.clear();
}
}
}
}

Expand Down Expand Up @@ -1074,13 +1102,17 @@ pub fn delete_old_work_item_buffers<GFBD>(
mut gpu_batched_instance_buffers: ResMut<
BatchedInstanceBuffers<GFBD::BufferData, GFBD::BufferInputData>,
>,
extracted_views: Query<Entity, With<ExtractedView>>,
extracted_views: Query<&ExtractedView>,
) where
GFBD: GetFullBatchData,
{
let retained_view_entities: HashSet<_> = extracted_views
.iter()
.map(|extracted_view| extracted_view.retained_view_entity)
.collect();
gpu_batched_instance_buffers
.work_item_buffers
.retain(|entity, _| extracted_views.contains(*entity));
.retain(|retained_view_entity, _| retained_view_entities.contains(retained_view_entity));
}

/// Batch the items in a sorted render phase, when GPU instance buffer building
Expand All @@ -1091,7 +1123,6 @@ pub fn batch_and_prepare_sorted_render_phase<I, GFBD>(
mut indirect_parameters_buffers: ResMut<IndirectParametersBuffers>,
mut sorted_render_phases: ResMut<ViewSortedRenderPhases<I>>,
mut views: Query<(
Entity,
&ExtractedView,
Has<NoIndirectDrawing>,
Has<OcclusionCulling>,
Expand All @@ -1110,15 +1141,15 @@ pub fn batch_and_prepare_sorted_render_phase<I, GFBD>(
..
} = gpu_array_buffer.into_inner();

for (view, extracted_view, no_indirect_drawing, gpu_occlusion_culling) in &mut views {
for (extracted_view, no_indirect_drawing, gpu_occlusion_culling) in &mut views {
let Some(phase) = sorted_render_phases.get_mut(&extracted_view.retained_view_entity) else {
continue;
};

// Create the work item buffer if necessary.
let work_item_buffer = get_or_create_work_item_buffer::<I>(
work_item_buffers,
view,
extracted_view.retained_view_entity,
no_indirect_drawing,
gpu_occlusion_culling,
late_indexed_indirect_parameters_buffer,
Expand Down Expand Up @@ -1248,7 +1279,6 @@ pub fn batch_and_prepare_binned_render_phase<BPI, GFBD>(
mut binned_render_phases: ResMut<ViewBinnedRenderPhases<BPI>>,
mut views: Query<
(
Entity,
&ExtractedView,
Has<NoIndirectDrawing>,
Has<OcclusionCulling>,
Expand All @@ -1270,7 +1300,7 @@ pub fn batch_and_prepare_binned_render_phase<BPI, GFBD>(
..
} = gpu_array_buffer.into_inner();

for (view, extracted_view, no_indirect_drawing, gpu_occlusion_culling) in &mut views {
for (extracted_view, no_indirect_drawing, gpu_occlusion_culling) in &mut views {
let Some(phase) = binned_render_phases.get_mut(&extracted_view.retained_view_entity) else {
continue;
};
Expand All @@ -1279,7 +1309,7 @@ pub fn batch_and_prepare_binned_render_phase<BPI, GFBD>(
// used this frame.
let work_item_buffer = get_or_create_work_item_buffer::<BPI>(
work_item_buffers,
view,
extracted_view.retained_view_entity,
no_indirect_drawing,
gpu_occlusion_culling,
late_indexed_indirect_parameters_buffer,
Expand Down
13 changes: 3 additions & 10 deletions examples/shader/specialized_mesh_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ fn queue_custom_mesh_pipeline(
),
mut specialized_mesh_pipelines: ResMut<SpecializedMeshPipelines<CustomMeshPipeline>>,
views: Query<(
Entity,
&RenderVisibleEntities,
&ExtractedView,
&Msaa,
Expand Down Expand Up @@ -318,14 +317,8 @@ fn queue_custom_mesh_pipeline(
// Render phases are per-view, so we need to iterate over all views so that
// the entity appears in them. (In this example, we have only one view, but
// it's good practice to loop over all views anyway.)
for (
view_entity,
view_visible_entities,
view,
msaa,
no_indirect_drawing,
gpu_occlusion_culling,
) in views.iter()
for (view_visible_entities, view, msaa, no_indirect_drawing, gpu_occlusion_culling) in
views.iter()
{
let Some(opaque_phase) = opaque_render_phases.get_mut(&view.retained_view_entity) else {
continue;
Expand All @@ -336,7 +329,7 @@ fn queue_custom_mesh_pipeline(
// enabled.
let work_item_buffer = gpu_preprocessing::get_or_create_work_item_buffer::<Opaque3d>(
work_item_buffers,
view_entity,
view.retained_view_entity,
no_indirect_drawing,
gpu_occlusion_culling,
late_indexed_indirect_parameters_buffer,
Expand Down