1
0
Fork 0
Commit graph

4 commits

Author SHA1 Message Date
Robert Bragg
01937201e4 Unify a lot of gles2 vs gl glsl code
Since we used to support hybrid fixed-function + glsl pipelines when
running with OpenGL there were numerous differences in how we handled
codegen and uniform updates between GLES2 and full OpenGL. Now that we
only support end-to-end glsl pipelines this patch can largely unify how
we handle GLES2 and OpenGL.

Most notably we now never use the builtin attribute names. This should
also make it easy for us to support creating strict OpenGL 3.1 contexts
where the builtin names have been removed.

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

(cherry picked from commit 2701b93f159bf2d3387cedf2d06fe921ad5641f3)
2013-01-22 17:48:01 +00:00
Robert Bragg
8f3380adc3 Clearly define 3 progends that own the frag+vertends
This adds a new "fixed-arbfp" progend so we now have 3 distinct ways of
setting up the state of a pipeline:

  » fixed; where the vertex and fragment processing are implemented
    using fixed function opengl apis.
  » fixed-arbfp; where vertex processing is implemented using fixed
    function opengl apis but fragment processing is implemented
    using the ARB Fragment Processing language.
  » glsl; there vertex and fragment processing are both implemented
    using glsl.

This means we avoid unusual, combinations such as glsl for vertex
processing and arbfp for fragment processing, and also avoid pairing
fixed-function vertex processing with glsl fragment processing which we
happen to know hits some awkward code paths in Mesa that lead to poor
performance.

As part of this change, the progend now implies specific vertend and
fragend choices so instead of associating a vertend and fragend with a
pipeline we now just associate a progend choice.

When flushing a pipeline and choosing what progend to use, we now call a
progend->start() method that is able to determine if the vertend and
fragend together will be able to handle the given pipeline so the
vertend and fragend ->start() methods no longer need to return a boolean
status.

Since we now don't need to support glsl used in conjunction with fixed
function this will allow us to avoid ever using OpenGL builtin attribute
names, though this patch doesn't change that yet.

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

(cherry picked from commit cec381f50c7a2f2186bd4a8c5f38fecd5f099075)
2013-01-22 17:48:00 +00:00
Robert Bragg
8326c71b6b texture: rename texobj flush code as gl specific
This renames the set_filters and set_wrap_mode_parameters texture
virtual functions to gl_flush_legacy_texobj_filters and
gl_flush_legacy_texobj_wrap_modes respectively to clarify that they are
opengl driver specific and that they are only used to support the legacy
opengl apis for setting filters and wrap modes where the state is
associated with texture objects instead of being associated with sampler
objects.

This part of an effort to clearly delimit our abstraction over opengl so
that we can start to consider non-opengl backends for Cogl.

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

(cherry picked from commit 6f78b8a613340d7c6b736e51a16c625f52154430)
2013-01-22 17:47:58 +00:00
Robert Bragg
5d62185f1c Re-organize the source layout
As part of an effort towards being able to write non-opengl based
backends for Cogl this moves most of the opengl specific code under
drivers/gl. drivers/gl and drivers/gles have been moved to
drivers/gl/gl and drivers/gl/es respectively.

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

(cherry picked from commit 7dc482facb0a265c7f48660079e7e12dd7a2813e)
2013-01-22 17:47:19 +00:00
Renamed from cogl/cogl-pipeline-opengl.c (Browse further)