forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
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
BindGroupEntries #2
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
Co-authored-by: IceSentry <[email protected]>
Co-authored-by: IceSentry <[email protected]>
robtfm
pushed a commit
that referenced
this pull request
Jul 29, 2024
…3906) # Objective - Second part of bevyengine#13900 - based on bevyengine#13905 ## Solution - check_dir_light_mesh_visibility defers setting the entity's `ViewVisibility `so that Bevy can schedule it to run in parallel with `check_point_light_mesh_visibility`. - Reduce HashMap lookups for directional light checking as much as possible - Use `par_iter `to parallelize the checking process within each system. --------- Co-authored-by: Kristoffer Søholm <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
Simplify bind group creation code. alternative to (and based on) bevyengine#9476
Solution
BindGroupEntries
struct that can transparently be used where&[BindGroupEntry<'b>]
is required in BindGroupDescriptors.Allows constructing the descriptor's entries as:
instead of
or
instead of
the structs has no user facing macros, is tuple-type-based so stack allocated, and has no noticeable impact on compile time.
DynamicBindGroupEntries
struct with a similar api that uses aVec
under the hood and allows extending the entries.RenderDevice::create_bind_group
to take separate argumentslabel
,layout
andentries
instead of aBindGroupDescriptor
struct. The struct can't be stored due to the internal references, and with only 3 members arguably does not add enough context to justify itself.BindGroupEntries
/DynamicBindGroupEntries
structs where appropriate (whenever the entries slice contains more than 1 member).Migration Guide
Calls to
RenderDevice::create_bind_group({BindGroupDescriptor { label, layout, entries })
must be amended toRenderDevice::create_bind_group(label, layout, entries)
.