Hi, For some reason, st/mesa assumes that shaders can't be shared by multiple contexts and therefore has a context pointer in shader keys. I'd like to get rid of this dependency, because there is no reason why shaders would need to be tied to a context. In fact, shaders don't even need a device, they just need a compiler.
This is becoming a bigger issue with latest games that might prefer compiling shaders in another thread using a different GL context. As far as I know, shaders should be context-shareable on all hardware drivers. I see only 2 options out of this: 1) Removing the context pointer from the shader keys. If drivers need this, they should handle it by themselves. This will simplify st/mesa, because TCS, TES, GS won't need the variant-tracking machinery. 2) Adding PIPE_CAP_SHAREABLE_SHADERS and if the cap is 1, set the context pointer to NULL in all keys. What do you think? Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev