Eric Anholt wrote: > On Tue, 2008-12-09 at 21:03 +0200, Pekka Paalanen wrote: >> On Mon, 08 Dec 2008 14:48:33 +0100 >> Philipp Klaus Krause <[EMAIL PROTECTED]> wrote: >> >>> - From time to time people say that they want support for precompiled >>> shaders in the OpenGL API. The main point for this they bring forth is >>> reducing loading times for their applications. >>> >>> I think this advantage of precompiled shaders can be had without support >>> for it in the API: It can be inmplemented transparently in the driver. >> Is it just a theoretical gain, or do the people actually have public >> benchmark results showing that the net gain with cold/hot disk cache is >> is noticeable? A quick spin in Google gave me nothing, but I would not >> be surprised if I just missed the right keywords. >> >> Or is compiling shaders with Mesa so hideously slow that it would be a >> clear benefit even without benchmarking? >> >> I can also come up with another reason to have precompiled shaders: >> "protecting" the shader source code. I am not sure that makes any sense, >> though. > > sauerbraten with the ARB_[fv]p path just spent 60% of its 45-second > startup time with a hot cache in mesa's program parsing, and it doesn't > have that many programs. However, I'd love to see a conversion of > mesa's ARB_[fv]p parsing to lex/yacc before we built a complicated > infrastructure to work around the performance of the current homebrew > code. Similarly for GLSL -- hopefully the GLSL rewrite can show some > results soon.
Right now, there's very little optimization done on shaders. I think the stuff done in Radeon fragment shaders, even, is not a lot compared to the eventual compilation path being laid out for Gallium. Caching IR would work great for this, I think, especially once stuff begins to go through LLVM. Precompiled shaders? No. Just no. There's very few formats which could be accepted, and I doubt that anybody would want to write parsers for them. More importantly, it doesn't matter whether or not it's compiled; anybody could still dump said shaders and use them verbatim in their own applications with a trivial amount of effort. Nothing gained. ~ C. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev