Commit Graph

1 Commits

Author SHA1 Message Date
Neil Roberts
bf7f1e358d Add a test for pipelines with sparse layer indices
There are currently quite a few places in Cogl where we muddle the
layer index and the texture unit number. The theory is that these two
numbers shouldn't be related and it should be possible to pick large
layer numbers with gaps.

This patch adds a test case to check that we can reference a large
layer number from a texture combine string by creating a pipeline with
only three layers but that have very large layer indices. This doesn't
currently work because Cogl interprets the numbers in the combine
strings to be the unit indices and not the layer indices. The
documentation however calls these numbers layer numbers so presumably
it is not meant to work that way.

There are probably many other bugs related to this that the test case
doesn't pick up so it would be good to add some more tests here, for
example to test that you can bind an attribute to the texture
coordinates for a large layer index.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-02-13 17:15:35 +00:00