-
-
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
Upstream naga_oil
#16491
base: main
Are you sure you want to change the base?
Upstream naga_oil
#16491
Conversation
Realizing that the squash merge will obliterate the history, unfortunately. |
|
||
match module_set { | ||
None => { | ||
// TODO this should be unreachable? |
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.
This should have an open issue or an unreachable!()
with a better comment explaining why
|
||
if self.validate && create_headers { | ||
// check that identifiers haven't been renamed | ||
#[allow(clippy::single_element_loop)] |
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.
There is probably a better way to handle this
Ok(composable_module) | ||
} | ||
|
||
// shunt all data owned by a composable into a derived module |
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.
// shunt all data owned by a composable into a derived module | |
/// Shunts all data owned by a composable into a derived module. |
derived.clear_shader_source(); | ||
} | ||
|
||
// add an import (and recursive imports) into a derived module |
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.
// add an import (and recursive imports) into a derived module | |
/// Adds an import (and recursive imports) into a derived module. |
.map_err(|err| err.into()) | ||
} | ||
|
||
// build required ComposableModules for a given set of shader_defs |
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.
// build required ComposableModules for a given set of shader_defs | |
// Builds the required [`ComposableModules`] for a given set of shader_defs. |
Co-authored-by: Benjamin Brienen <[email protected]>
Co-authored-by: Benjamin Brienen <[email protected]>
Co-authored-by: Benjamin Brienen <[email protected]>
Co-authored-by: Benjamin Brienen <[email protected]>
Co-authored-by: Benjamin Brienen <[email protected]>
Co-authored-by: Benjamin Brienen <[email protected]>
Thanks for all the copyediting @BenjaminBrienen! It's very much appreciated. |
If it's interesting to keep the history then someone with privileges could merge it instead? |
@@ -0,0 +1,203 @@ | |||
# Bevy Naga Oil | |||
|
|||
Bevy Naga Organized Integration Library (`bevy_naga-oil`) is a crate for combining and manipulating shaders. |
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.
Any reason to mix _
and -
? It's already bad that Rust crates use both, but within the same name...
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.
Oh no that's just a mistake!
naga_oil
is a foundational crate for Bevy, but doesn't get enough love from community maintainers. We should include it in the monorepo so that it gets more care and attention. The crate was originally left out of the repo under the "useful to other external users" metric. However, since then, we have included other crates likebevy_color
in the monorepo under and haven't seen uptake from external users that benefitsnaga_oil
maintenence.On the horizon, WESL promises to solve a lot of problems that we currently rely on
naga_oil
for. However, in the meantime, there are a number of important initiatives that would benefit from improvements made tonaga_oil
, including future initiatives like upstreamingbevy_hanabi
and improvements toAsBindGroup
that may require code generation strategies. Additionally, there are number of outstanding bugs ex. bevyengine/naga_oil#54 that are more likely to get fixed if they live in our issue tracker.Changes
bevy_naga_oil
so that its version can be reset to match the rest of the bevy crates.bevy_naga_oil
.