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

[Merged by Bors] - Docs for Bundle showing how to nest bundles #1570

Closed
wants to merge 17 commits into from
Closed

[Merged by Bors] - Docs for Bundle showing how to nest bundles #1570

wants to merge 17 commits into from

Conversation

alice-i-cecile
Copy link
Member

I've also added a clearer description of what bundles are used for, and explained that you can't query for bundles (a very common beginner confusion).

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Mar 6, 2021
alice-i-cecile and others added 2 commits March 5, 2021 19:46
crates/bevy_ecs/src/bundle.rs Outdated Show resolved Hide resolved
crates/bevy_ecs/src/bundle.rs Outdated Show resolved Hide resolved
crates/bevy_ecs/src/bundle.rs Outdated Show resolved Hide resolved
crates/bevy_ecs/src/bundle.rs Outdated Show resolved Hide resolved
rmsc and others added 10 commits March 6, 2021 01:42
Fix staging buffer required size calculation (fixes #1056)

The `required_staging_buffer_size` is currently calculated differently in two places, each will be correct in different situations:

* `prepare_staging_buffers()` based on actual `buffer_byte_len()`
* `set_required_staging_buffer_size_to_max()` based on item_size

In the case of render assets, `prepare_staging_buffers()` would only operate over changed assets. If some of the assets didn't change, their size wouldn't be taken into account for the `required_staging_buffer_size`. In some cases, this meant the buffers wouldn't be resized when they should. Now `prepare_staging_buffers()` is called over all assets, which may hit performance but at least gets the size right.

Shortly after `prepare_staging_buffers()`,  `set_required_staging_buffer_size_to_max()` would unconditionally overwrite the previously computed value, even if using `item_size` made no sense. Now it only overwrites the value if bigger.

This can be considered a short term hack, but should prevent a few hard to debug panics.
Added extra space, and hid user-inappropriate import.
Added extra space, and hid user-inappropriate import.
@cart
Copy link
Member

cart commented Mar 6, 2021

for future reference: rebasing instead of merging helps avoid pulling changes from main into the pr

@cart
Copy link
Member

cart commented Mar 6, 2021

bors r+

bors bot pushed a commit that referenced this pull request Mar 6, 2021
I've also added a clearer description of what bundles are used for, and explained that you can't query for bundles (a very common beginner confusion).

Co-authored-by: MinerSebas <[email protected]>
Co-authored-by: Renato Caldas <[email protected]>
@bors
Copy link
Contributor

bors bot commented Mar 6, 2021

@bors bors bot changed the title Docs for Bundle showing how to nest bundles [Merged by Bors] - Docs for Bundle showing how to nest bundles Mar 6, 2021
@bors bors bot closed this Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs An addition or correction to our documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants