-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Bind group layout entries #10224
Bind group layout entries #10224
Conversation
4945418
to
5369d6b
Compare
5369d6b
to
30f4278
Compare
4d132f1
to
fabb71b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typos: *_mutlisampled
-> *_multisampled
Otherwise lgtm, so pre-emptivley leaving my approval.
1b9708f
to
cf09ecd
Compare
Fixed the typo + fixed ci + rebased |
We might want to wait after 0.12.1 to merge this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Objective
Solution
BindGroupLayoutEntry
ShaderStages
visibilty for all entries by defaultBindingType
helper 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
BindGroupLayoutEntries
and allBindingType
helper functions.Migration Guide
RenderDevice::create_bind_group_layout()
doesn't take aBindGroupLayoutDescriptor
anymore. You need to provide the parameters separatelyTODO
Dynamic
variantRenderDevice::create_bind_group_layout()
api to match the one fromRenderDevice::creat_bind_group()