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

glsl: include unused items #2205

Merged
merged 4 commits into from
Jan 23, 2023
Merged

Conversation

robtfm
Copy link
Contributor

@robtfm robtfm commented Jan 11, 2023

  • added a back::glsl::WriterFlags flag INCLUDE_UNUSED_ITEMS.
    when set, unused globals, functions using unused globals, and named constants are included in the output glsl.

  • added a named copy of named constants in front::glsl into the module, to allow exporting them above. this adds a bit of unnecessary weight to the module, but hopefully it's not a problem?

motivation is for better glsl support in naga_oil, where i rely on modules to contain all members even if unused at point of construction.

src/front/glsl/variables.rs Outdated Show resolved Hide resolved
Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@teoxoy teoxoy merged commit 4142971 into gfx-rs:master Jan 23, 2023
@teoxoy teoxoy mentioned this pull request Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants