-
Notifications
You must be signed in to change notification settings - Fork 73
Integrate any one of the various GLSL / shader optimizers #167
base: master
Are you sure you want to change the base?
Conversation
@doug-moen would you happen to know a quick fix for this?
I'm guessing it's because the GLSL optimizer is outputting GLSL 3.30? |
Nevermind, it's glsl-optimizer that's expecting a certain GLSL variant. |
Agh, in the README:
Maybe https://github.com/aiekick/GlslOptimizerV2 will work better. |
I'm going to throw out the current code and rework it to use Khrono's SPIR-V optimizer stuff: https://stackoverflow.com/a/59770586 |
Bada-boom bada-bing. Optimizer is working. :) I went with https://github.com/google/shaderc which combines the things mentioned in that StackOverflow post. @doug-moen please run any heavy examples you may have privately. Everything I throw at it is basically rendering immediately. |
My skull and phone controller things seem to run well; the skull is still noticeably a tad staggering but I dont think it was like before. |
(I'll fix the CI after a few tests we do) |
git://len.falken.directory/code/Scadvent.git clone this and try out Day4. Anything with repetitions like that should be noticeably better than curv without the optimizer. Edit: Day5 seems to be even more tasking |
It looks like *into_preprocessed_text function doesn't do any size optimization (well it does but nothing actually noticeable) - I need to figure out how to load SPIR-V binary or assembly... |
Nevermind, you can ignore this PR again for now. I need to update |
@doug-moen I could use your expertise on this one. For some reason, the shader becomes optimized, and is loaded, but no output. I'm at a complete loss. |
We can have a debug session in the matrix channel if you'd like too: https://app.element.io/#/room/!BbbouYwtinZcRySkDA:matrix.org - it'd really help me. From what I'm reading everything should be setup ok, but it could be how the uniforms are connected or related. |
I'm signed into matrix. Let me know how you want to talk. |
Amazing glsl-optimizer bulids no problem! This should help resolve the massive GLSL code that curv generates before sending it to the glShaderCompiler. I noticed while curv does a small bit of optimization itself, actually not optimizing and using a library like this (which was developed mostly by the MESA people, who are extremely knowledgeable with shader compilers) will have great effects.
I just need to resolve some linking errors in the CMakefile (damn cmake...) and it should be good to go!