Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

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.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants