mutter/clutter
Robert Bragg 845ff67301 [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes
Previously the journal was always flushed at the end of
_cogl_rectangles_with_multitexture_coords, (i.e.  the end of any
cogl_rectangle* calls) but now we have broadened the potential for batching
geometry.  In ideal circumstances we will only flush once per scene.

In summary the journal works like this:

When you use any of the cogl_rectangle* APIs then nothing is emitted to the
GPU at this point, we just log one or more quads into the journal.  A
journal entry consists of the quad coordinates, an associated material
reference, and a modelview matrix.  Ideally the journal only gets flushed
once at the end of a scene, but in fact there are things to consider that
may cause unwanted flushing, including:

- modifying materials mid-scene
    This is because each quad in the journal has an associated material
    reference (i.e. not copy), so if you try and modify a material that is
    already referenced in the journal we force a flush first)

    NOTE: For now this means you should avoid using cogl_set_source_color()
	      since that currently uses a single shared material. Later we
	  should change it to use a pool of materials that is recycled
	  when the journal is flushed.

- modifying any state that isn't currently logged, such as depth, fog and
  backface culling enables.

The first thing that happens when flushing, is to upload all the vertex data
associated with the journal into a single VBO.

We then go through a process of splitting up the journal into batches that
have compatible state so they can be emitted to the GPU together.  This is
currently broken up into 3 levels so we can stagger the state changes:

1) we break the journal up according to changes in the number of material layers
   associated with logged quads. The number of layers in a material determines
   the stride of the associated vertices, so we have to update our vertex
   array offsets at this level. (i.e. calling gl{Vertex,Color},Pointer etc)
2) we further split batches up according to material compatability. (e.g.
   materials with different textures) We flush material state at this level.
3) Finally we split batches up according to modelview changes. At this level
   we update the modelview matrix and actually emit the actual draw command.

This commit is largely about putting the initial design in-place; this will be
followed by other changes that take advantage of the extended batching.
2009-06-30 17:13:34 +01:00
..
cogl [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
eglnative [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
eglx [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
fruity [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
glx [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
json Disable single header inclusion for GLib 2009-06-15 11:29:37 +01:00
osx [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
pango Disable single header inclusion for GLib 2009-06-15 11:29:37 +01:00
sdl [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
win32 [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
x11 [x11] Simplify the XInput support 2009-06-19 15:12:32 +01:00
clutter-actor.c [actor] Remove unused clutter_actor_pick() 2009-06-29 17:01:10 +01:00
clutter-actor.h [misc] Update headers #endif comments 2009-06-29 21:37:02 +02:00
clutter-alpha.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
clutter-alpha.h Merge branch 'cogl-float' 2009-01-20 18:47:50 +00:00
clutter-animatable.c [animatable] Allow validation in ::animate_property 2009-05-27 13:01:31 +01:00
clutter-animatable.h [animatable] Allow validation in ::animate_property 2009-05-27 13:01:31 +01:00
clutter-animation.c Add element-type annotations for animate*v functions 2009-06-22 12:27:17 +01:00
clutter-animation.h [animation] Remove InitiallyUnowned from Animation 2009-05-14 16:12:36 +01:00
clutter-backend.c [backend] Do not store the stage manager singleton 2009-06-19 14:19:39 +01:00
clutter-backend.h [backend] Abstract the GL context creation 2009-05-13 22:21:48 +01:00
clutter-behaviour-depth.c Fix compiler warnings 2009-01-23 13:08:46 +00:00
clutter-behaviour-depth.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-behaviour-ellipse.c Remove the last few fixed-point entry points 2009-06-19 16:38:35 +01:00
clutter-behaviour-ellipse.h Remove the last few fixed-point entry points 2009-06-19 16:38:35 +01:00
clutter-behaviour-opacity.c [animation] Move the alpha value to floating point 2009-01-20 16:42:49 +00:00
clutter-behaviour-opacity.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-behaviour-path.c Add gobject-introspection annotations 2009-02-20 12:09:07 +00:00
clutter-behaviour-path.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-behaviour-rotate.c Remove the last few fixed-point entry points 2009-06-19 16:38:35 +01:00
clutter-behaviour-rotate.h Remove the last few fixed-point entry points 2009-06-19 16:38:35 +01:00
clutter-behaviour-scale.c Remove the last few fixed-point entry points 2009-06-19 16:38:35 +01:00
clutter-behaviour-scale.h Remove the last few fixed-point entry points 2009-06-19 16:38:35 +01:00
clutter-behaviour.c Remove Units from the public API 2009-05-06 16:44:47 +01:00
clutter-behaviour.h [animation] Move the alpha value to floating point 2009-01-20 16:42:49 +00:00
clutter-bezier.c [Automatic fixed-to-float.sh change] Applies a number fixed to float patches 2009-01-20 16:20:54 +00:00
clutter-bezier.h Bug 1252 - Merge ClutterBehaviourPath and ClutterBehaviourBspline 2008-12-05 13:13:37 +00:00
clutter-binding-pool.c Add gobject-introspection annotations 2009-02-20 12:09:07 +00:00
clutter-binding-pool.h Add declaration of clutter_binding_pool_get_type() 2009-01-14 15:03:30 +00:00
clutter-cairo-texture.c [ClutterCairoTexture] Use the right component ordering when uploading data 2009-06-15 12:41:13 +01:00
clutter-cairo-texture.h [cairo-texture] Document redrawing behavior 2009-05-14 15:53:59 +01:00
clutter-child-meta.c Add gobject-introspection annotations 2009-02-20 12:09:07 +00:00
clutter-child-meta.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-clone.c [actor] Use flags to control allocations 2009-06-04 16:30:31 +01:00
clutter-clone.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-color.c [color] Add support for the "#rgba" color format 2009-06-01 18:42:28 +01:00
clutter-color.h [misc] Update headers #endif comments 2009-06-29 21:37:02 +02:00
clutter-container.c Add ClutterContainer::foreach_with_internals() 2009-04-24 15:25:08 +01:00
clutter-container.h [docs] Fixes for the API reference 2009-05-28 17:18:13 +01:00
clutter-debug.h [debug] Adds a "nop-picking" clutter debug option to NOP _clutter_do_pick() 2009-06-29 23:49:06 +01:00
clutter-deprecated.h [actor] Remove unused clutter_actor_pick() 2009-06-29 17:01:10 +01:00
clutter-enum-types.c.in Use g_once when registering enumeration types 2009-05-29 12:40:23 +01:00
clutter-enum-types.h.in 2007-08-20 Emmanuele Bassi <ebassi@openedhand.com> 2007-08-20 20:16:15 +00:00
clutter-event.c [input] Rework input device API 2009-06-19 13:12:05 +01:00
clutter-event.h [input] Rework input device API 2009-06-19 13:12:05 +01:00
clutter-feature.c Hide clutter_context_get_default() 2009-06-18 14:20:28 +01:00
clutter-feature.h 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com> 2008-10-30 17:04:34 +00:00
clutter-fixed.c [docs] Remove ClutterFixed from the documentation 2009-03-10 12:38:04 +00:00
clutter-fixed.h [fixed] Remove ClutterFixed API 2009-03-10 12:38:04 +00:00
clutter-frame-source.c Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-frame-source.h Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-group.c Use double temporaries when computing group size 2009-06-08 11:07:05 +01:00
clutter-group.h [group] avoid double evaluation of arguments in clutter_group_add 2009-04-08 18:19:46 +01:00
clutter-id-pool.c 2008-03-09 Matthew Allum <mallum@openedhand.com> 2008-03-09 19:07:17 +00:00
clutter-id-pool.h 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com> 2008-10-30 17:04:34 +00:00
clutter-interval.c Remove usage of Units and macros 2009-06-04 16:30:30 +01:00
clutter-interval.h [animation] Allow registering custom progress function 2009-01-08 11:15:09 +00:00
clutter-json.h.in 2008-04-23 Emmanuele Bassi <ebassi@openedhand.com> 2008-04-23 13:58:58 +00:00
clutter-keysyms-table.h 7 small miscellaneous fixes 2008-06-10 06:37:46 +00:00
clutter-keysyms.h 2008-08-04 Emmanuele Bassi <ebassi@openedhand.com> 2008-08-05 10:54:40 +00:00
clutter-list-model.c Fix chain-up in clutter_list_model_dispose() 2009-05-12 16:31:41 +01:00
clutter-list-model.h [list-model] Make ClutterListModel subclassable 2009-02-14 11:31:00 +00:00
clutter-main.c [cogl] Improving Cogl journal to minimize driver overheads + GPU state changes 2009-06-30 17:13:34 +01:00
clutter-main.h Decrease the main-loop priority of the frame cycle 2009-06-09 15:03:56 +01:00
clutter-marshal.list [actor] Add the ::allocation-changed signal 2009-06-04 16:30:31 +01:00
clutter-master-clock.c Add more debug notes inside the master clock 2009-06-29 17:01:10 +01:00
clutter-master-clock.h Limit the frame rate when not syncing to VBLANK 2009-06-09 15:03:56 +01:00
clutter-media.c [media] Add sub-second resolution for the duration 2009-02-24 16:22:02 +00:00
clutter-media.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-model-private.h [model] Add a private row mutator to ClutterModelIter 2009-05-05 20:18:28 +01:00
clutter-model.c [model] Add a private row mutator to ClutterModelIter 2009-05-05 20:18:28 +01:00
clutter-model.h Add more padding in Model and ModelIter classes 2009-05-20 16:06:09 +01:00
clutter-path.c Prevent a possible zero division 2009-04-16 17:16:31 +01:00
clutter-path.h [build] Replaces use of #include <cairo/cairo.h> with #include <cairo.h> 2008-12-21 21:52:50 +00:00
clutter-private.h [backend] Do not store the stage manager singleton 2009-06-19 14:19:39 +01:00
clutter-rectangle.c Changes cogl_rectangle to take x1, y1, x2, y2 args not x1, y1, width, height 2009-01-28 17:20:15 +00:00
clutter-rectangle.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-score.c Remove usage of the grave accent as quotation mark 2009-03-17 14:13:31 +00:00
clutter-score.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-script-parser.c 2008-08-04 Emmanuele Bassi <ebassi@openedhand.com> 2008-08-04 16:21:27 +00:00
clutter-script-private.h 2008-08-04 Emmanuele Bassi <ebassi@openedhand.com> 2008-08-04 16:21:27 +00:00
clutter-script.c [json] Update the internal JSON-GLib copy 2009-06-09 14:07:22 +01:00
clutter-script.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-scriptable.c Intern the ClutterScriptable type name 2009-02-26 14:57:58 +00:00
clutter-scriptable.h 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com> 2008-10-30 17:04:34 +00:00
clutter-shader-types.c [cogl] Remove the COGL{enum,int,uint} typedefs 2009-05-12 14:53:44 +01:00
clutter-shader-types.h [cogl] Remove the COGL{enum,int,uint} typedefs 2009-05-12 14:53:44 +01:00
clutter-shader.c [cogl-shader] Make get_info_log() slightly nicer 2009-06-01 17:40:23 +01:00
clutter-shader.h [shader] Remove deprecated set_uniform_1f() 2009-04-03 12:47:21 +01:00
clutter-stage-manager.c [stage manager] Add peek_stages() 2009-05-29 15:13:55 +01:00
clutter-stage-manager.h [stage manager] Add peek_stages() 2009-05-29 15:13:55 +01:00
clutter-stage-window.c 2008-04-04 Emmanuele Bassi <ebassi@openedhand.com> 2008-04-04 15:02:11 +00:00
clutter-stage-window.h [x11] Rework map/unmap and resizing 2009-06-04 16:30:32 +01:00
clutter-stage.c [cogl] Adds cogl_read_pixels to replace direct use of glReadPixels 2009-06-29 23:49:06 +01:00
clutter-stage.h Fix clutter_redraw() to match the redraw cycle 2009-06-09 16:29:29 +01:00
clutter-text.c [text] Do not leak the effective attributes 2009-06-10 16:23:35 +01:00
clutter-text.h [text] Expose position_to_coords() 2009-05-14 16:19:15 +01:00
clutter-texture.c [texture] fix load-async and load-data-async properties. 2009-06-30 16:48:53 +01:00
clutter-texture.h [cogl] Remove max_waste argument from Texture ctors 2009-05-23 19:35:19 +01:00
clutter-timeline.c Remove the last few fixed-point entry points 2009-06-19 16:38:35 +01:00
clutter-timeline.h Remove the last few fixed-point entry points 2009-06-19 16:38:35 +01:00
clutter-timeout-interval.c Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-timeout-interval.h Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-timeout-pool.c [docs] Fix naming of the interval parameter 2009-03-16 16:56:51 +00:00
clutter-timeout-pool.h Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-types.h Add more ActorBox utility methods 2009-06-16 16:43:00 +01:00
clutter-units.c [docs] Various gtk-docs fixes 2009-06-09 14:47:36 +01:00
clutter-units.h [docs] Various gtk-docs fixes 2009-06-09 14:47:36 +01:00
clutter-util.c * clutter/clutter-texture.c: (texture_get_tile_pixbuf), 2008-02-12 17:17:52 +00:00
clutter-util.h 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com> 2008-10-30 17:04:34 +00:00
clutter-version.h.in 2008-03-31 Matthew Allum <mallum@openedhand.com> 2008-03-31 17:15:02 +00:00
clutter.h Add more deprecation notices 2009-03-13 14:29:27 +00:00
Makefile.am Do not use the --pkd switch for g-ir-scanner 2009-06-16 18:08:52 +01:00