mutter/cogl/driver/gl
Robert Bragg 1c449c67f6 Remove the varying array for tex_coords
This removes the need to maintain an array of tex_coord varyings and
instead we now just emit a varying per-layer uniquely named using a
layer_number infix like cogl_tex_coord0_out and cogl_tex_coord0_in.

Notable this patch also had to change the journal flushing code to use
pipeline layer numbers to determine the name of texture coordinate
attributes.

We now also break batches by using a deeper comparison of layers so
such that two pipelines with the same number of layers can now cause a
batch break if they use different layer numbers.

This adds an internal _cogl_pipeline_layer_numbers_equal() function that
takes two pipelines and returns TRUE if they have the same number of
layers and all the layer numbers are the same too, otherwise it returns
FALSE.

Where we used to break batches based on changes to the number of layers
we now break according to the status of
_cogl_pipeline_layer_numbers_equal

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit e55b64a9cdc93285049d9b969bef67484c2d9fb3)

Note: this will cause a temporary regression for the Cogl 1.x CoglShader
api since it will break compatibility with existing shaders that
reference the texture varyings from the fragment shader.

The intention is to follow up with another patch to add back
CoglShader compatibility.
2013-01-22 17:48:06 +00:00
..
gl Remove the varying array for tex_coords 2013-01-22 17:48:06 +00:00
gles Use GL_ARB_texture_swizzle to emulate GL_ALPHA textures 2013-01-22 17:48:04 +00:00
cogl-attribute-gl-private.h buffer: splits out GL specific code 2013-01-22 17:47:59 +00:00
cogl-attribute-gl.c Remove the varying array for tex_coords 2013-01-22 17:48:06 +00:00
cogl-buffer-gl-private.h Add cogl_buffer_map_range() 2013-01-22 17:48:03 +00:00
cogl-buffer-gl.c Add cogl_buffer_map_range() 2013-01-22 17:48:03 +00:00
cogl-clip-stack-gl-private.h clip-stack: Splits out opengl specific code 2013-01-22 17:47:59 +00:00
cogl-clip-stack-gl.c Remove the varying array for tex_coords 2013-01-22 17:48:06 +00:00
cogl-framebuffer-gl-private.h Adds CoglError api 2013-01-22 17:47:39 +00:00
cogl-framebuffer-gl.c Add a GL 3 driver 2013-01-22 17:48:01 +00:00
cogl-pipeline-fragend-fixed-private.h Re-organize the source layout 2013-01-22 17:47:19 +00:00
cogl-pipeline-fragend-fixed.c Remove the varying array for tex_coords 2013-01-22 17:48:06 +00:00
cogl-pipeline-fragend-glsl-private.h Re-organize the source layout 2013-01-22 17:47:19 +00:00
cogl-pipeline-fragend-glsl.c Remove the varying array for tex_coords 2013-01-22 17:48:06 +00:00
cogl-pipeline-opengl-private.h Remove the varying array for tex_coords 2013-01-22 17:48:06 +00:00
cogl-pipeline-opengl.c Remove the varying array for tex_coords 2013-01-22 17:48:06 +00:00
cogl-pipeline-progend-fixed-private.h Re-organize the source layout 2013-01-22 17:47:19 +00:00
cogl-pipeline-progend-fixed.c Add a GL 3 driver 2013-01-22 17:48:01 +00:00
cogl-pipeline-progend-glsl-private.h Re-organize the source layout 2013-01-22 17:47:19 +00:00
cogl-pipeline-progend-glsl.c Remove the varying array for tex_coords 2013-01-22 17:48:06 +00:00
cogl-pipeline-vertend-fixed-private.h Re-organize the source layout 2013-01-22 17:47:19 +00:00
cogl-pipeline-vertend-fixed.c Remove the varying array for tex_coords 2013-01-22 17:48:06 +00:00
cogl-pipeline-vertend-glsl-private.h Re-organize the source layout 2013-01-22 17:47:19 +00:00
cogl-pipeline-vertend-glsl.c Remove the varying array for tex_coords 2013-01-22 17:48:06 +00:00
cogl-texture-2d-gl-private.h Fix a warning in the vtable for texture_2d_get_data 2013-01-22 17:48:00 +00:00
cogl-texture-2d-gl.c Check for out-of-memory when allocating 2d textures 2013-01-22 17:48:06 +00:00
cogl-util-gl-private.h Check for out-of-memory when allocating 2d textures 2013-01-22 17:48:06 +00:00
cogl-util-gl.c Check for out-of-memory when allocating 2d textures 2013-01-22 17:48:06 +00:00