Am Mittwoch 10 Dezember 2008 00:49:43 schrieb Ian Romanick: > Corbin Simpson wrote: > > 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. > > There are two cases where app developers want precompiled shaders. The > first, and most important, is for embedded environments. You really > don't want to have to compile shaders on your G1 or iPhone. The other > case is to implement a compiler cache. > > In both cases, after compiling the program, you get back a token telling > you what format it is. You resubmit that token along with the compiled > blob. If the driver doesn't like the token or the blob, it rejects it. > When it rejects it, you have to resubmit the source (i.e., just like > now). In the usual case where the user doesn't change hardware or > driver, the cached blob just keeps on working.
If the driver has a way to persist the compiled program, then wouldn't it be better to do the caching driver-side instead of application-side? That way, the caching automatically benefits all applications, without having to change every single (non-fixed function) OpenGL app out there. Not to mention that the driver probably has a better idea of what can really be cached and how it works - even in this thread, people mentioned recompiling after OpenGL state changes, which could be covered easily in the driver, but might be more problematic to support on the application side. cu, Nicolai ------------------------------------------------------------------------------ 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