GNOME Bugzilla – Bug 707458
Don't create a dummy texture for the texture pipeline template
Last modified: 2013-09-04 14:30:40 UTC
The meta_create_texture_pipeline function used to create a dummy 1x1 texture so that it could make sure that the all of the state that affects the shader generation would be set on the template pipeline so that Cogl could share the pipeline's shader with any other pipelines that are just rendering a texture. This is no longer necessary because the only thing that affects the shader generation is the texture type, not the actual texture data and Cogl now has a function to explicitly set the texture type which we can use instead. Additionally even if the template mechanism is not used at all Cogl will still end up reusing the same shader because it now has a shader cache which is indexed by the pipeline state so pipeline's don't strictly need to share ancestry in order to take advantage of it. However we still might as well use the function because if there is a common ancestry it is faster to look up the shader because Cogl doesn't need to hash the pipeline state.
Created attachment 254064 [details] [review] Don't create a dummy texture for the texture pipeline template
Review of attachment 254064 [details] [review]: OK.
Ok, thanks. I've pushed it to the master and wayland branches. https://git.gnome.org/browse/mutter/commit/?id=c5bf60eab427b2b3ec1fbbc7c95d