Neil Roberts 4a7cd0d2ac cogl-pipeline: Store the uniform overrides in an array instead of list
Previously the uniform overrides were stored in a linked list. Now
they are stored in a g_malloc'd array. The values are still tightly
packed so that there is only a value for each uniform that has a
corresponding bit in override_mask. The allocated size of the array
always exactly corresponds to the number of bits set in the
override_mask. This means that when a new uniform value is set on a
pipeline it will have to grow the array and copy the old values
in. The assumption is that setting a value for a new uniform is much
less frequent then setting a value for an existing uniform so it makes
more sense to optimise the latter.

The advantage of using an array is that we can quickly jump to right
boxed value given a uniform location by doing a population count in
the bitmask for the number of bits less than the given uniform
location. This can be done in O(1) time whereas the old approach using
a list would scale by the number of bits set.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-11-16 16:32:11 +00:00
..
2011-11-16 16:32:11 +00:00
2011-11-01 12:03:02 +00:00
2011-09-06 11:19:20 +01:00
2010-06-01 12:08:18 +01:00
2011-06-09 16:21:15 +01:00
2011-06-09 16:21:15 +01:00
2011-11-01 12:03:02 +00:00
2011-11-01 12:03:02 +00:00
2011-11-14 18:37:57 +00:00
2011-10-21 12:24:01 +01:00
2011-11-16 16:32:11 +00:00
2011-11-16 16:32:11 +00:00
2011-11-01 12:03:02 +00:00
2011-08-12 15:28:42 +01:00