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
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
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
clutter-behaviour-opacity.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-behaviour-path.c
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
clutter-bezier.c
clutter-bezier.h
clutter-binding-pool.c
clutter-binding-pool.h
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
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
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
clutter-fixed.c
clutter-fixed.h
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
clutter-id-pool.h
clutter-interval.c Remove usage of Units and macros 2009-06-04 16:30:30 +01:00
clutter-interval.h
clutter-json.h.in
clutter-keysyms-table.h
clutter-keysyms.h
clutter-list-model.c Fix chain-up in clutter_list_model_dispose() 2009-05-12 16:31:41 +01:00
clutter-list-model.h
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
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
clutter-private.h [backend] Do not store the stage manager singleton 2009-06-19 14:19:39 +01:00
clutter-rectangle.c
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
clutter-script-private.h
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
clutter-scriptable.h
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
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-util.h
clutter-version.h.in
clutter.h
Makefile.am Do not use the --pkd switch for g-ir-scanner 2009-06-16 18:08:52 +01:00