Bind group layout entries#10224
Merged
alice-i-cecile merged 24 commits intobevyengine:mainfrom Nov 28, 2023
Merged
Conversation
4945418 to
5369d6b
Compare
5369d6b to
30f4278
Compare
4d132f1 to
fabb71b
Compare
JMS55
approved these changes
Nov 22, 2023
Contributor
JMS55
left a comment
There was a problem hiding this comment.
Small typos: *_mutlisampled -> *_multisampled
Otherwise lgtm, so pre-emptivley leaving my approval.
1b9708f to
cf09ecd
Compare
Contributor
Author
|
Fixed the typo + fixed ci + rebased |
Contributor
Author
|
We might want to wait after 0.12.1 to merge this |
robtfm
reviewed
Nov 23, 2023
Contributor
robtfm
left a comment
There was a problem hiding this comment.
nice.
the tradeoff in what to make explicit functions for, vs arguments to a generic fn is a bit tricky. i definitely think you've done the right thing by making generic functions and more specific variants as well. if anything i'd say we could go even further (sampler_filtering(), texture_storage_2d_readonly() etc), but that's definitely subjective/stylistic and i would understand if others disagree.
crates/bevy_render/src/render_resource/bind_group_layout_entries.rs
Outdated
Show resolved
Hide resolved
crates/bevy_render/src/render_resource/bind_group_layout_entries.rs
Outdated
Show resolved
Hide resolved
600db4c to
009cf1e
Compare
robtfm
approved these changes
Nov 23, 2023
JMS55
approved these changes
Nov 25, 2023
This file contains hidden or 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
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
Solution
BindGroupLayoutEntryShaderStagesvisibilty for all entries by defaultBindingTypehelper function that mirror the wgsl equivalent and that make writing layouts much simpler.Before:
After:
Here's a more extreme example in bevy_solari: JMS55@86dab7f
Changelog
BindGroupLayoutEntriesand allBindingTypehelper functions.Migration Guide
RenderDevice::create_bind_group_layout()doesn't take aBindGroupLayoutDescriptoranymore. You need to provide the parameters separatelyTODO
DynamicvariantRenderDevice::create_bind_group_layout()api to match the one fromRenderDevice::creat_bind_group()