cairo OpenGL ES 2.0 backend

Registered by Jesse Barker on 2010-10-20

Add backend that uses GPU (OpenGL ES 2.x)

Blueprint information

Status:
Complete
Approver:
Jesse Barker
Priority:
High
Drafter:
Alexandros Frantzis
Direction:
Approved
Assignee:
Alexandros Frantzis
Definition:
Approved
Series goal:
Accepted for 11.05
Implementation:
Implemented
Milestone target:
milestone icon 11.05-final
Started by
Jamie Bennett
Completed by
Alexandros Frantzis

Related branches

Sprints

Whiteboard

[alf Nov 23]: Discussion with upstream cairo ongoing at http://lists.cairographics.org/archives/cairo/2010-November/021142.html
[alf Nov 23]: cairo gl enabled packages in ppa:afrantzis/cairo-gl
[alf Dec 7]: Patch "Use dispatch mechanism to abstract differences between GL versions (and remove GLEW)" sent upstream for review (http://lists.cairographics.org/archives/cairo/2010-December/021294.html)
[alf Dec 15]: Patch "Use dispatch mechanism to abstract differences between GL versions (and remove GLEW)" accepted in cairo git master \o/
[alf Dec 18]: Reorganized work items around the new graphics WG milestones
[alf Jan 06]: Updated cairo gl package in ppa:afrantzis/cairo-gl
[alf Jan 06]: Uploaded cairogears (gl) to ppa:afrantzis/cairo-gl
[alf Jan 07]: Sent patches for bugs to cairo-gl backend: http://lists.cairographics.org/archives/cairo/2011-January/021467.html
[alf Jan 17]: Update patches for bug in cairo-gl: http://lists.cairographics.org/archives/cairo/2011-January/021532.html
[alf Jan 18]: Patches for cairo-gl bug fix accepted in cairo master: http://lists.cairographics.org/archives/cairo/2011-January/021533.html
[alf Jan 24]: cairo-gears GL package uploaded to ppa:afrantzis/cairo-gl
[alf Jan 28]: Patchset "gl: Remove fixed-function support" sent upstream for review: http://lists.cairographics.org/archives/cairo/2011-January/021584.html
[alf Feb 01]: Patchset "gl: Remove fixed-function support" accepted in cairo master 7f153196
[alf Feb 01]: WIP patchset "gl: Replace built-in shader variables" sent upstream as an alternative to another proposed patch http://lists.cairographics.org/archives/cairo/2011-February/021617.html
[alf Feb 08]: Patchset "gl: Replace built-in shader variables with custom variables" sent upstream for review: http://lists.cairographics.org/archives/cairo/2011-February/021648.html
[alf Feb 08]: Filed Mesa bug blocking cairo-egl (https://bugs.freedesktop.org/show_bug.cgi?id=34042)
[alf Feb 10]: Patchset "gl: Replace built-in shader variables with custom variables" accepted in cairo master (first commit: 966e4a17)
[alf Feb 11]: Patchset "EGL fixes" sent upstream for review: http://lists.cairographics.org/archives/cairo/2011-February/021687.html
[alf Feb 18]: RFC mail regarding Cairo GLES2 and GL_CLAMP_TO_BORDER sent to cairo mailing list: http://lists.cairographics.org/archives/cairo/2011-February/021715.html
[alf Feb 21]: Patchset "EGL fixes" accepted in cairo master (last commit: 00ffb09)
[alf Feb 24]: Reorganized work items for approaching milestone
[alf Mar 03]: Refactored work items to reflect the reality and recently discovered complications of the situation
[alf Mar 04]: Patchset "Add GLESv2 support to the GL backend" sent upstream for review: http://lists.cairographics.org/archives/cairo/2011-March/021808.html
[alf Mar 18]: Patchset "Add r8g8b8a8 and r8g8b8x8 formats" sent upstream for review: http://lists.freedesktop.org/archives/pixman/2011-March/001137.html
[alf Mar 21]: Updated cairo gles2 branch with support for drivers with strict (conformant) eglGetProcAddress() and fallback for missing GL_OES_mapbuffer extension: http://git.linaro.org/gitweb?p=people/afrantzis/cairo.git;a=shortlog;h=refs/heads/gles2
[alf Mar 24]: Rearranged items for milestone. Some notes: Due to unresolved driver issues with both available platforms (imx51 and OMAP4) it is not currently feasible to perform meaningful functionality tests of cairo GLES2 on ARM. The GLES2 backend has been validated on mesa GLES2/gallium and performance tests and some high-level optimizations will take place there. We should proceed cautiously, though; embedded GPUs come with their own set of peculiarities and optimizations for discrete graphics cards may actually hurt performance on embedded GPUs. Meanwhile we are working to resolve the issues with the available ARM platforms.
[alf Mar 28]: Patchset "Add r8g8b8a8 and r8g8b8x8 formats" accepted in pixman master (last commit: b514e63c)
[alf Apr 12]: Packages for cairo, cairogears and cairo-clock (all with gles2 support) uploaded to ppa:linaro-graphics-wg/ppa .
[alf May 04]: Postponed cairo optimization items for next cycle (we have a dedicated blueprint for this).

Status:
[alf May 19]: Cairo gles2 patches accepted in cairo master (commits: f1eef40c - 4d96859b)

(?)

Work Items

Work items for 11.01:
Port cairo-gears to use the cairo-gl backend: DONE
Package cairo-gears (GL) and make it available in a PPA: DONE
Fix any blocker issues with the GL backend (and send patches upstream): DONE
File bug reports for non-blocker issues for the GL backend: DONE
Either remove GLEW or use GLEW support for GLES2.0 if avalaible by then: DONE
Replace all *EXT, *ARB etc functions with their modern equivalents (eg Core 2.0) or make sure we have working runtime-selection: DONE

Work items for 11.02:
Port cairo-clock to use the cairo-gl backend: DONE
Package cairo-clock (GL) and make it available in a PPA: DONE
Replace ftransform() with custom shader code: DONE
Replace built-in uniforms with custom uniforms: DONE
Replace built-in attributes with custom attributes: DONE
Ensure that EGL support in cairo-gl is working properly: DONE

Work items for 11.03:
Replace Texture1D with GLES2 compatible construct: DONE
Replace GL_CLAMP_TO_BORDER with GLES2 compatible constructs: DONE
Work around the restricted set of pixel formats supported by glReadPixels in GLES2: DONE
Work around the restricted set of pixel formats for glTexImage* in GLES2: DONE
Add GLES2 support to cairo test suite: DONE
Add GLES2 support to cairo build system: DONE
Perform functionality tests using the cairo test suite: POSTPONED
Fix important functionality test failures based on cairo test suite results: POSTPONED

Work items for 11.04:
Add r8g8b8a8 support to pixman (needed for pixel format workarounds to work in big endian architectures): DONE
Decide on an existing cairo application to modify to use the GL backend: DONE
Modify selected cairo application to use the GL backend: DONE

Work items:
Announce the intentions and design ideas to the upstream mailing list and get feedback: DONE
Locate other groups that may be planning on (or have already started) working on a similar task and see how we can cooperate: DONE
Become very familiar with the current cairo GL backend code and concepts: DONE
Set up branch in git.linaro.org: DONE
Provide cairo packages that have the GL backend enabled: DONE
Perform tests using cairo-perf-trace to gather performance information: POSTPONED
Investigate optimization opportunities based on cairo performance test information: POSTPONED
Optimize cairo GL(ES) backend based on performance test investigation: POSTPONED
Measure the performance benefits of using the GL backend in the selected application: POSTPONED
Make sure all code is pushed upstream: DONE

Dependency tree

* Blueprints in grey have been implemented.