GNOME Bugzilla – Bug 650966
CoglPipeline doesn't support any layers on fixed function hardware
Last modified: 2011-06-15 23:22:58 UTC
The flushing code for CoglPipelines tries to determine how many texture units it can access at a maximum and ignores any layers above that count. However on GL it was always using the GLSL and ARBfp enums which aren't available on fixed function only hardware so it would end up thinking it can't support any layers at all.
Created attachment 188456 [details] [review] cogl-pipeline-opengl: Don't use number of tex units on fixed-function The CoglPipeline code uses a combination of GL_MAX_TEXTURE_COORDS, GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS and GL_MAX_TEXTURE_UNITS to determine the maximum number of layers to allow in a pipeline. However on fixed function hardware that doesn't advertise either GLSL or ARBfp it was still using the first two enums which will probably just return 0 and set a GLerror. This meant that we effectively didn't support using any layers on purely fixed function hardware. This patch changes it to only use those two enums if the appropriate extensions are advertised and to always use GL_MAX_TEXTURE_UNITS except on GLES2 where there is no fixed function.
Pushed to the Cogl master branch as d8df30cb9cf and to the Clutter 1.6 branch as 930cf5483
Moving Clutter bugs under the CoglPipeline component to be under the Cogl product and CoglPipeline component.