Go to file
Robert Bragg 4d55d146b3 Merge branch 'cogl-journal-batching'
[cogl] Improve ability to break out into raw OpenGL via begin/end mechanism
Adds a cogl_flush() to give developers breaking into raw GL a fighting chance
[cogl-material] Be more carefull about flushing in cogl_material_remove_layer
Revert "[rectangle] Avoid modifying materials mid scene"
Revert "[actor] Avoid modifying materials mid-scene to improve journal batching"
[cogl-vertex-buffer] Disable unused client tex coord arrays
[cogl] disable all client tex coord arrays in _cogl_add_path_to_stencil_buffer
[cogl] flush matrices in _cogl_add_path_to_stencil_buffer
[journal] Don't resize a singlton VBO; create and destroy a VBO each flush
[cogl] avoid using the journal in _cogl_add_path_to_stencil_buffer
[pango-display-list] Use the Cogl journal for short runs of text
[material] _cogl_material_equal: catch the simplest case of matching handles
[material] avoid flushing the journal when just changing the color
[cogl journal] Perform software modelview transform on logged quads.
[Cogl journal] use G_UNLIKLEY around runtime debugging conditions
[cogl journal] Adds a --cogl-debug=batching option to trace batching
[Cogl journal] Adds a --cogl-debug=journal option for tracing the journal
[cogl] Adds a debug option for disabling use of VBOs --cogl-debug=disable-vbos
[cogl] Force Cogl to always use the client side matrix stack
[cogl-debug] Adds a "client-side-matrices" Cogl debug option
[cogl-color] Adds a cogl_color_equal() function
[cogl material] optimize logging of material colors in the journal
[rectangle] Avoid modifying materials mid scene
[actor] Avoid modifying materials mid-scene to improve journal batching
[journal] Always pad our vertex data as if at least 2 layers are enabled
[cogl] Improving Cogl journal to minimize driver overheads + GPU state changes

The Cogl journal is a mechanism Cogl uses to batch geometry resulting from
any of the cogl_rectangle* functions before sending it to OpenGL.  This aims
to improve the Cogl journal so that it can reduce the number of state
changes and draw calls we issue to the OpenGL driver and hopfully improve
performance.

Previously each call to any of the cogl_rectangle* functions would imply an
immediate GL draw call, as well as a corresponding modelview change;
material state changes and gl{Vertex,Color,TexCoord}Pointer calls.  Now
though we have tried to open the scope for batching up as much as possible
so we only have to flush the geometry either before calling glXSwapBuffers,
or when we change state that isn't tracked by the journal.

As a basic example, it's now possible for us to batch typical picking
renders into a single draw call for the whole scene.

Some key points about this change:
- We now perform transformations of quads in software (except for long runs of
  text which continue to use VBOs)
    * It might seem surprising at first, but when you consider that so many
      Clutter actors are little more than textured quads and each actor
      typically implies a modelview matrix change; the costs involved in
      setting up the GPU with the new modelview can easily out weigh the cost
      of simply transforming 4 vertices.
- We always use Cogl's own client side matrix API now.
    * We found the performance of querying the OpenGL driver for matrix state
      was often worse than using the client matrix code, and also - discussing
      with Mesa developers - agreed that since khronos has essentially
      deprecated the GL matrix API (by removing it from OpenGL 3 and
      OpenGL-ES 2) it was appropriate to take full responsibility for all our
      matrix manipulation.
- Developers should avoid modifying materials mid-scene.
    * With the exception of material color changes, if you try and modify a
      material that is referenced in the journal we will currently force a
      journal flush. Note: you can assume that re-setting the same value for
      a material property won't require a flush though.
- Several new --cogl-debug options have been added
    * "disable-batching" can be used to identify bugs in the way that the
      journal does its batching; of could this shouldn't ever be needed :-)
    * "disable-vbos" can be used to test the VBO fallback paths where we
      simply use malloc()'d buffers instead.
    * "batching" lets you get an overview of how the journal is batching
      your geometry and may help you identify ways to improve your
      application performance.
    * "journal" lets you trace all the geometry as it gets logged in the
      journal, and all the geometry as its flushed from the journal.
      Obviously an inconsistency can identify a bug, but the numbers may
      help you verify application logic too.
    * "disable-software-transform" as implied will instead use the driver
      /GPU to transform quads by the modelview matrix.
    Although committed separately a --clutter-debug=nop-picking option was
    also added that lets you remove picking from the equation, which can
    sometimes help make problem analysis more deterministic.
2009-06-30 17:26:31 +01:00
common [cogl] Improve ability to break out into raw OpenGL via begin/end mechanism 2009-06-30 17:13:38 +01:00
doc/reference/cogl [cogl] Improve ability to break out into raw OpenGL via begin/end mechanism 2009-06-30 17:13:38 +01:00
gl [cogl] Improve ability to break out into raw OpenGL via begin/end mechanism 2009-06-30 17:13:38 +01:00
gles [cogl material] optimize logging of material colors in the journal 2009-06-30 17:13:35 +01:00
cogl-bitmap.h [docs] Various gtk-doc fixes for COGL 2009-06-10 12:57:36 +01:00
cogl-color.h [cogl-color] Adds a cogl_color_equal() function 2009-06-30 17:13:35 +01:00
cogl-debug.h [cogl journal] Perform software modelview transform on logged quads. 2009-06-30 17:13:36 +01:00
cogl-deprecated.h [cogl deprecated] Add backface culling deprecation 2009-05-28 14:14:50 +01:00
cogl-fixed.h [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
cogl-material.h [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
cogl-matrix.h [docs] Various gtk-doc fixes for COGL 2009-06-10 12:57:36 +01:00
cogl-offscreen.h [docs] Various gtk-doc fixes for COGL 2009-06-10 12:57:36 +01:00
cogl-path.h [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
cogl-shader.h [cogl-shader] Make get_info_log() slightly nicer 2009-06-01 17:40:23 +01:00
cogl-texture.h [cogl-texture docs] Improves the documentation of the internal_format args 2009-06-11 14:31:01 +01:00
cogl-types.h [cogl] Move the texture filters to be a property of the material layer 2009-06-04 19:03:40 +01:00
cogl-vertex-buffer.h [vertex-buffer] Add cogl_vertex_buffer_indices_get_type API 2009-06-29 23:49:05 +01:00
cogl.h.in [cogl] Improve ability to break out into raw OpenGL via begin/end mechanism 2009-06-30 17:13:38 +01:00
cogl.pc.in [cogl] Fix hardcoded paths in the pc file 2009-03-10 12:38:04 +00:00
Makefile.am [introspection] Add --c-include to g-ir-scanner 2009-06-09 12:45:23 +01:00
TODO Merged clutter-ivan branch into trunk. 2008-04-25 13:37:36 +00:00