1c449c67f6
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. |
||
---|---|---|
.. | ||
gl | ||
gles | ||
cogl-attribute-gl-private.h | ||
cogl-attribute-gl.c | ||
cogl-buffer-gl-private.h | ||
cogl-buffer-gl.c | ||
cogl-clip-stack-gl-private.h | ||
cogl-clip-stack-gl.c | ||
cogl-framebuffer-gl-private.h | ||
cogl-framebuffer-gl.c | ||
cogl-pipeline-fragend-fixed-private.h | ||
cogl-pipeline-fragend-fixed.c | ||
cogl-pipeline-fragend-glsl-private.h | ||
cogl-pipeline-fragend-glsl.c | ||
cogl-pipeline-opengl-private.h | ||
cogl-pipeline-opengl.c | ||
cogl-pipeline-progend-fixed-private.h | ||
cogl-pipeline-progend-fixed.c | ||
cogl-pipeline-progend-glsl-private.h | ||
cogl-pipeline-progend-glsl.c | ||
cogl-pipeline-vertend-fixed-private.h | ||
cogl-pipeline-vertend-fixed.c | ||
cogl-pipeline-vertend-glsl-private.h | ||
cogl-pipeline-vertend-glsl.c | ||
cogl-texture-2d-gl-private.h | ||
cogl-texture-2d-gl.c | ||
cogl-util-gl-private.h | ||
cogl-util-gl.c |