-
Notifications
You must be signed in to change notification settings - Fork 244
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
Inline globals #857
base: main
Are you sure you want to change the base?
Inline globals #857
Conversation
For the SPIR-V disasm checks, that makes sense - you're removing some inlining requirements. I've tried looking at this PR, and while I believe the general idea makes sense (i.e. as a form of "parameter weakening", all call sites agreeing on a quasi-constant value for some parameter does allow removing the parameter from the signature), I can't easily reason about the specifics of the code in this PR at this time. At the very least, I feel like it should go into the
And use the I'm leaving this comment now as-is because I'm worried I might not be able to meaningfully review this any time soon, or at least not without doing some of the generalization work, to be able to convince myself this transform won't have subtle failure modes. |
Any update on this? I have a shader which compiles to 6000 lines of GLSL or WGSL code, while hand-crafted one was only 300 lines, and it would really help to not inline the functions, as my only parameter to the inlined functions is the single uniform struct reference |
inline(never)
that are not respectedfix #847
tests
My shader which compile to a single file of 2500 lines (dis glsl) now respect the
inline(never)
and result in 1400 lines of glslTODO:
some compiletests produce different result??
I was hoping by force inlining less functions, some shader can compile faster, but it is not the case yet, (need to look into if it actually result in less inlines?) af3cf2b74e8ef4f4bd98a3cd2cda64b9379d20d7 compile time: before:
222s
-> after:287s