SCons: Apply generated_wrapper
to shader builders
#91840
Closed
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.
Followup to #91624
Next wave of prettified/reformatted generated files is for the
.glsl
shaders. Kept the scope to just these, because despite having only two build scriptsgles3_builders
/glsl_builders
, they're arguably the most complicated build scripts in the repo. They're certainly the most involved, as they utilize dedicatedpytest
scripts to ensure their outputs come out as expected; as such, this had to update the*_expected_full.glsl
files as well. I also made sure that the pytests properly work on Windows as well (supersedes #86083 in the process).In addition to the above, two other adjustments were made. The first and more simple of the two is adding
.*_cache
to.gitignore
in order to broadly catch python module cache folders (removed.mypy_cache
entry because that's now covered). The second was further expanding the functionality ofgenerated_wrapper
, featuring better logic for generating header guards (now its own function) & automatically formatting multiline#define
to ensure their\
wrappers are right-justified (also its own function). Documentation has been added to each function as well, hopefully making their intended usage as unambiguous as possible.