gl: Add support for OpenGL ES 3.0

Graphics / Cairo - Bryce Harrington [osg.samsung.com] - 13 September 2017 18:18 EDT

This improves the OpenGL ES support to extend it to version 3.0. A number of new features are available in glesv3 including creation of multi-sampled renderbuffers. These renderbuffers can be blitted to single sample textures (but not the other way around). Other features such as PBO for image uploading, are left as followon work.

For this preliminary implementation, glesv3 backends always create renderbuffers, which can be set as single sample or multisample. The renderbuffer's content is blitted to the texture only when used as a source or a mask.

Images uploaded to a texture stay there until the surface is used as a rendering target, at which point its painted to the renderbuffer.

This patch is heavily based off of Henry Song's initial GLESv3 patch 6f7f3795 from his cairogles fork of Cairo, and incorporates subsequent fixes and pertinent refactorings from his trunk and review feedback from Uli.

This implements the *functional* support for glesv3, excluding the
various optimization work to utilize its features. Rendering and performance should not be expected to improve notably from pure glesv2. As the GL backend for Cairo remains "experimental", these changes should likewise be considered as such.

8ff3019 gl: Add support for OpenGL ES 3.0
boilerplate/Makefile.win32.features | 12 +++++
boilerplate/cairo-boilerplate-egl.c | 30 ++++++++---
build/Makefile.win32.features | 1 +
build/Makefile.win32.features-h | 3 ++
build/configure.ac.features | 1 +
configure.ac | 23 ++++++++
src/Makefile.sources | 4 ++
src/Makefile.win32.features | 16 ++++++
src/cairo-gl-composite.c | 103 +++++++++++++++++++++++++++++++++++-
src/cairo-gl-device.c | 91 +++++++++++++++++++++++--------
src/cairo-gl-dispatch.c | 12 +++++
src/cairo-gl-gradient-private.h | 9 ++--
src/cairo-gl-gradient.c | 3 +-
src/cairo-gl-info.c | 4 +-
src/cairo-gl-msaa-compositor.c | 10 +++-
src/cairo-gl-operand.c | 3 +-
src/cairo-gl-private.h | 20 ++++---
src/cairo-gl-shaders.c | 15 ++++--
src/cairo-gl-surface.c | 73 ++++++++++++++++++++-----
src/cairo-gl.h | 2 +-
20 files changed, 370 insertions(+), 65 deletions(-)

Upstream: cgit.freedesktop.org


  • Share