Commit Graph

53 Commits

Author SHA1 Message Date
Neil Roberts
364f232507 tests: Mark test_framebuffer_get_bits as only working on GL
It looks like it's not meant to be valid to create a framebuffer with
an alpha-only texture as a render target on GLES. Since the following
Mesa commit, this requirement is now enforced so that the
test_framebuffer_get_bits test fails:

http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf300eaa

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit cfb0859cab843b000f4baa3ca155a245730edcfa)
2013-01-22 18:00:11 +00:00
Robert Bragg
ebdac3162a tests: flag backface culling failure without NPOT support
This marks that test-backface-culling is currently known to fail without
NPOT texture support. This allows us do a 1.13 snapshot release before
we find a fix for this.
2013-01-22 17:48:19 +00:00
Neil Roberts
0b01c91fc5 framebuffer: Bind the framebuffer before querying the bits
The GL framebuffer driver now makes sure to bind the framebuffer
before counting the number of bits. Previously it would just query the
number of bits for whatever framebuffer happened to be used last.

In addition the virtual for querying the framebuffer bits has been
modified to take a pointer to a structure instead of a separate
pointer to each component. This should make it slightly more efficient
and easier to maintain.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit e9c58b2ba23a7cebcd4e633ea7c3191f02056fb5)
2013-01-22 17:48:18 +00:00
Neil Roberts
41612bfc74 Add a test for getting the component sizes from different fbs
This adds a test which creates two offscreen framebuffers, one with
just an alpha component texture and the other will a full RGBA
texture. The bit sizes of both framebuffers are then checked to verify
that they either have or haven't got bits for the RGB components.

The test currently fails because the framebuffer functions don't bind
the framebuffer before querying so they just query whichever
framebuffer happened to be used last.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 7ca01373efe908efc9f18f2cb7f4a51c274ef677)
2013-01-22 17:48:18 +00:00
Neil Roberts
1e6ec66330 Add a conformance test for some wrap modes on a rectangle texture
This adds a conformance test which renders a rectangle texture using
the two wrap modes clamp-to-edge and repeat. It then verifies that the
correct region of the texture is drawn for the texture coordinates
that are > 1.0.

The test currently always fails. The cogl_framebuffer_draw_rectangle
function is documented to always take normalized texture coordinates
regardless of the coordinate system of the texture. This works
correctly if all of the texture coordinates are in the range [0.0,1.0]
because cogl-primitives uses a different code path in that case.
However if the multiple-quad code path is taken then the coordinates
actually need to un-normalized for it to work.

There is a comment in cogl_meta_texture_foreach_in_region() which
implies that the incoming coordinates should always be normalized.
The documentation for the callback says that the resulting sub-texture
coordinates will always be in the coordinate system of the low-level
texture. However it doesn't work out like this because the meta
texture function uses the span iterating function which always returns
normalized coordinates. It looks like there needs to be some more
conversions going on somewhere.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit d2059bb32b8015060e10f41dbbb68d4230b47ddb)
2013-01-22 17:48:18 +00:00
Neil Roberts
671275ba36 Also flip the virtual coordinates when iterating spans
_cogl_texture_spans_foreach_in_region first swaps over the texture
coordinates if they are flipped so that it can always iterate in a
positive direction. It sets a flag so that it will remember that the
coordinates are flipped. Before invoking the callback it is meant to
reflip the coordinates so that the callee doesn't need to be aware of
the flipping. However it was only flipping the sub-texture coordinates
and not the virtual coordinates. This was causing sliced textures to
draw their slice rectangles with the wrong geometry.
test-backface-culling was failing because of this.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit e7338a1e09cb22151374aefa6f0bb58485af9189)
2013-01-22 17:48:18 +00:00
Neil Roberts
a2aa04f219 texture-2d-slice: Fix the foreach_sub_texture_in_region implementation
There were a few problems with the sub texture iterating code of
sliced textures which were causing some conformance tests to fail when
NPOT textures are disabled:

• The spans are stored in un-normalized coordinates and the
  coordinates passed to the foreach function are normalized. The
  function was trying to un-normalize them before passing them to the
  span iterator code but it was using the wrong factor which was
  causing it to actually doubley normalize them.

• The shim function to renormalize the coordinates before passing them
  to the callback was renormalizing the sub-texture coordinates
  instead of the virtual coordinates. The sub-texture coordinates are
  already in the right scale for whatever is the underlying texture so
  we don't need to touch them. Instead we need to normalize the
  virtual coordinates because these are coming from the un-normalized
  coordinates that we passed to the span iterating code.

• The normalize factors passed to the span iterating were always 1.
  The code uses this normalizing factor to round the incoming
  coordinates to the nearest multiple of a full texture. It divides
  the coordinates by the factor rather than multiplying so it looks
  like we should be passing the virtual texture size here.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit c9773566b0ec0a17b34c440090529de8cff9609e)
2013-01-22 17:48:18 +00:00
Neil Roberts
6bcfc8342a Fix handling of binding errors when uploading a full texture
Both the texture drivers weren't handling errors correctly when a
CoglPixelBuffer was used to set the contents of an entire texture.
This was causing it to hit an assertion failure in the pixel buffer
tests.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 888733d3c3b24080d2f136cedb3876a41312e4cf)
2013-01-22 17:48:09 +00:00
Neil Roberts
c72ede0560 Simplify test-pixel-buffer
test-pixel-buffer previously had two tests, one to check filling the
pixel buffer by mapping it and another to fill it by just setting the
data. These tests were set up in a kind of confusing way where it
would try to paint both steps and then validate them together using
colors looked up from a table. This patch separates out the two tests
and gets rid of the tables which hopefully makes them a bit easier to
follow.

The contents of the bitmap are now set to an image with has a
different colour for each of its four quadrants instead of just a
single colour in the hope that this will be a bit more of an extensive
test.

The old code had a third test that was commented out. This test has
been removed.

The textures are now created using cogl_texture_2d_new_* which means
they won't be in the atlas. This exposes a bug where setting the
entire contents of the texture won't handle errors properly and it
will hit an assertion. The previous code using the atlas would end up
only setting a sub-region of the larger atlas texture so the bug
wouldn't be hit. To make sure we still test this code path there is
now a third test which explicitly sets a sub-region of the texture
using the bitmap.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 8beb3a4cc20f539a50645166485b95e8e5b25779)
2013-01-22 17:48:09 +00:00
Robert Bragg
4b41743b92 tests: port test-texture-get-set-data to be standalone
This ports the test-texture-get-set-data clutter test to be a standalone
Cogl test.

(cherry picked from commit 40defa3dbd355754d0f7611d3c50de35db514e4a)
2013-01-22 17:48:09 +00:00
Neil Roberts
fda5e15bda Add a conformance test using alpha textures
This adds a conformance test with an alpha-component texture. The
texture is rendered using a pipeline with the same layer combine mode
as cogl-pango.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 05190519bad4519e66cbdb5326943c832d15a841)
2013-01-22 17:48:06 +00:00
Neil Roberts
996260ceab tests: Differentiate between known failures and missing requirements
Previously when make test is run it would say ‘fail’ in lower case
letters for both tests that are known bugs we need to fix and for
drivers that can't run the test. This makes it too easy to lose track
of bugs.

To fix this, the ADD_TEST macro has now been changed to take two sets
of flags instead of just one. The first specifies the requirements for
the test to run at all. The second specifies the set of flags required
to run without any known failures. The table in the test report now
says ‘n/a’ instead of ‘fail’ for tests that don't match the feature
requirements.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 723f8d4402e7b2ef3a71f51bb29b10d1c0ec8d81)
2013-01-22 17:48:06 +00:00
Neil Roberts
0b8780f94c tests: Don't report success when the test is skipped
The tests that were using GLSL or 3D textures were directly printing
“Skipped” and then reporting success. Instead of doing this they now
just try to continue without checking for the feature but the
appropriate test requirement flag is now set in test-conform-main so
the table of results will correctly display that is a failure.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit b8f918e44b243a5fa36d5f382a90bebb0de0728f)
2013-01-22 17:48:06 +00:00
Neil Roberts
11126a1b7e tests: Convert test-npot-texture to Cogl
This updates the npot-texture test to use Cogl directly instead of
relying on Clutter.

Note that this currently fails when Cogl ends up using sliced
textures. It looks like there is some bug with the meta texture
function to iterate the primitive textures. This happens when
COGL_DEBUG=disable-npot-textures is set.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 32f0e1e8fff56be3123dc4571f07bb5a314f6818)
2013-01-22 17:48:04 +00:00
Neil Roberts
53f43a428f Add a test case for cogl_buffer_map_range
This adds a small test case which maps a sub region of a small
attribute buffer and replaces the texture coordinates of one of the
vertices. The vertices are then drawn and the correct colours are
checked.

There is now a new test requirement for the
COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE feature which this test requires.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 22183265b021dd038338b4398056c0a1eae77edb)
2013-01-22 17:48:03 +00:00
Neil Roberts
9b59588c53 Add a simple conformance test for alpha testing
This adds a simple test which sets an alpha test on a pipeline and
then renders a texture. It then verifies that the transparent parts of
the texture aren't drawn. This is currently failing with the GL3
driver because GL3 requires the alpha test to be implemented in GLSL
but the generated alpha test uniform is only updated for the GLES2
driver.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 4ec04507bfaf2d61707dccfb59ac7326962ee741)
2013-01-22 17:48:01 +00:00
Neil Roberts
19ccb72b80 cogl-gles2-context: Wrap glCopyTex{Sub,}Image2D to flip the result
When the CoglGLES2Context is bound to read from a CoglOffscreen then
the result will be upside down from what GL expects if
glCopyTexImage2D is used directly. To fix that, this patch now wraps
glCopyTexImage2D and glCopyTexSubImage2D so that the copy is doing by
binding an FBO to the target texture and then rendering a quad
sampling from the texture in the offscreen framebuffer.

The rendering is done using the Cogl context rather than the GLES2
context because otherwise it would have to do a fair bit of work to
try and stash the old state on the context before setting up the state
to do the blit. The down side of this is that the contexts need to be
synchronized so that the rendering will be up-to-date. As far as I
understand from the GL spec, this requires a glFinish and then the
texture needs to be rebound in the new context because updates to
shared objects are guaranteed to be reflected until the object is
rebound.

GLES2 supports using glCopyTexImage2D for cube map textures. As Cogl
doesn't currently have support for cube maps, it is quite hard to get
that to work with this patch. For now attempts to copy to a cube map
texture will just be sliently ignored.

This patch also includes a test case which renders an image to the
framebuffer and then copies it to a texture. The texture is then
rendered back to the framebuffer and the contents are checked for the
correct orientation using glReadPixels.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 30b6da8134bad95267265e26685c7475f6c351c9)
2012-08-15 13:46:20 +01:00
Neil Roberts
d12399b823 test-gles2-context: Add a test case for rendering to an FBO
This adds an extra test to test-gles2-context which renders to an FBO
and then checks that the orientation is correct once the texture is
rendered via Cogl. This should test the code path to flip the GLES2
rendering in Cogl.

The rendering is done in three different ways to test the various
state that needs flipping:

• Just renders two triangle strips, one at the top and one at the
  bottom.

• Renders two full screen triangle strips, but each with a different
  viewport to clip it to the top or the bottom.

• Clears the screen with two different colors and a scissor to either
  the top or the bottom.

• Renders both quads twice with two different colors and two different
  front face states.

Additionally the rendering is verified by calling glReadPixels to
check that the returned pixels are flipped correctly.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 5b097f9bc4a3eb316c6bf0d9fe8db00ff93bfe73)
2012-08-15 13:44:16 +01:00
Neil Roberts
786d1b8e40 Split test-point-sprite into two, one without checking orientation
There is currently a known bug where when rendering offscreen point
sprites will be rendered upside-down. For that reason
test-point-sprite is marked as a known failure because it checks the
orientation of the point sprites and the conformance test suite is
rendered to offscreen buffers by default. However this doesn't help to
catch more general failures that stop the point sprites being rendered
at all. To fix this the test-point-sprite test has been split into two
tests, one which verifies the orientation and one which does not. The
two tests are in the same source file and internally share the same
static function but pass a flag to specify whether to check the
orientation. If the orientation should be ignored then it will create
a 2x1 texture instead of a 2x2 texture so that it will appear the same
regardless of whether it is upside-down. The checks for the colors
have been altered accordingly.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 51b7fdbe17f300cf2edf42c2ca740ad748c9fd78)
2012-08-06 18:51:31 +01:00
Neil Roberts
a3989d035e Fix removing layers when the pipeline is not the owner
If cogl_pipeline_remove_layer is called on a copied pipeline to remove
a parent layer then it will still end up calling
_cogl_pipeline_remove_layer_difference on the layer. This function
was directly trying to remove the layer from the pipeline's list of
layer differences. However in the child pipeline the layer isn't in
the list because it is unchanged from its parent. The function had an
assertion to verify that this situation wasn't hit so in a debug build
it would just bail out.

This patch removes the assertion and changes it to only remove the
layer if it is owned by the pipeline. Otherwise it just sets the
COGL_PIPELINE_STATE_LAYERS difference as normal and decrements the
number of layers. This will cause it to successfully remove the layer
because either it is the last layer in which case it will be ignored
after n_layers is decreased or if it is in the middle of the list then
the subsequent layers will all be shifted down so there will be a
replacement layer difference.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 88e73dd93fa09a158064a946ab229591a5888b97)
2012-08-06 14:27:45 +01:00
Neil Roberts
2e50693821 Add a conformance test for removing a pipeline layer
The test creates a pipeline with two layers which add two different
color constants together and then tries various combinations of
removing the layers and checks that it gets the right color.

Currently this is failing if a pipeline is copied and then a layer is
removed from the copy.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 844440a5cee5907c4d61e995804534ac0613bb0f)
2012-08-06 14:27:45 +01:00
Neil Roberts
9026acde8f Add a basic conformance test for eulers and quaternions
This adds some preliminary testing for eulers and quaternions. It
mostly just tests the cogl_matrix_init_from_{quaternion,euler}
functions as well as applying a euler or quaternion transformation to
a framebuffer's modelview matrix.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit a32eb76e16d7d76af2fe8a6ba9151d8826b58864)
2012-08-06 14:27:43 +01:00
Robert Bragg
498937083e Adds gles2-context renderer constraint
This adds a new renderer constraint enum:
  COGL_RENDERER_CONSTRAINT_SUPPORTS_GLES2_CONTEXT
that can be used by applications to ensure the renderer they connect to
has support for creating a GLES2 context via cogl_gles2_context_new().

The cogl-gles2-context and cogl-gles2-gears examples and the conformance
tests have been updated to use this constraint.

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit ed61463d7194354b26624e8014859f0fbfc06a12)
2012-08-06 14:27:43 +01:00
Robert Bragg
8d0b771cd3 conform: Adds a gles2 context test
This adds a conformance test that creates a GLES2 context via the cogl
api and verifies clearing an offscreen framebuffer via the gles2 api,
and switching back and forth between the Cogl and GLES2 apis.

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit 9369c60a596c0cbc7a8bb9a45d7b8ffb6a848311)
2012-08-06 14:27:42 +01:00
Neil Roberts
f729798f03 Convert the test-atlas-migration test to a standalone Cogl test
This updates test-atlas-migration from being a Clutter-based test to a
Cogl-based test.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 32c5a3ed546effd2e2946f22f173a20cf36b2fdf)
2012-08-06 14:27:42 +01:00
Neil Roberts
b6b9ac0b85 Add a cogl-version header
This adds a version header which contains macros to define which
version of Cogl the application is being compiled against. This helps
applications that want to support multiple incompatible versions of
Cogl at compile time.

The macros are called COGL_VERSION_{MAJOR,MINOR,MICRO}. This does not
match Clutter which names them CLUTTER_{MAJOR,MINOR,MICRO}_VERSION but
I think the former is nicer and it at least matches Cairo and Pango.

The values of the macro are defined to COGL_VERSION_*_INTERNAL which
is generated by the configure script into cogl-defines.h.

There is also a macro for the entire version as a string called
COGL_VERSION_STRING.

The internal utility macros for encoding a 3 part version number into
a single integer have been moved into the new header so they can be
used publicly as a convenient way to check if the version is within a
particular range. There is also a COGL_VERSION_CHECK macro for the
very common case that a feature will be used since a particular
version of Cogl. There is a macro called COGL_VERSION which contains
the pre-encoded version of Cogl being compiled against for
convenience.

Unlike in Clutter this patch does not add any runtime version
identification mechanism.

A test case is also added which just contains static asserts to sanity
check the macros.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 3480cf140dc355fa87ab3fbcf0aeeb0124798a8f)
2012-08-06 14:27:40 +01:00
Luca Bruno
d3215b802d tests: Port test-premult
This ports the test-offscreen test from being a Clutter test to a
straight Cogl test.

https://bugzilla.gnome.org/show_bug.cgi?id=660617

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-04-11 16:49:42 +01:00
Robert Bragg
3881fd3259 Adds cogl_framebuffer_draw_[*_]rectangle functions
This adds experimental 2.0 api replacements for the cogl_rectangle[_*]
functions that don't depend on having a current pipeline set on the
context via cogl_{set,push}_source() or having a current framebuffer set
on the context via cogl_push_framebuffer(). The aim for 2.0 is to switch
away from having a statefull context that affects drawing to having
framebuffer drawing apis that are explicitly passed a framebuffer and
pipeline.

To test this change several of the conformance tests were updated to use
this api instead of cogl_rectangle and
cogl_rectangle_with_texture_coords. Since it's quite laborious going
through all of the conformance tests the opportunity was taken to make
other clean ups in the conformance tests to replace other uses of
1.x api with experimental 2.0 api so long as that didn't affect what was
being tested.
2012-03-20 12:33:40 +00:00
Neil Roberts
1d59fccf10 Add a conformance test for point sprites
This adds a conformance test which renders a texture point using a 2x2
texture with a different color for each texel. It then verifies that
each texel is mapped to the correct position on the point. The test is
currently failing.

The test requires the point sprite feature flag so this patch also
adds a TEST_REQUIREMENT_* flag for that.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-07 15:13:29 +00:00
Neil Roberts
3c0226b3fb Add a conformance test for point sizes
This tries rendering some points at various sizes and checks that they
are the expected size and make a rectangle shape. This is currently
failing when the GLSL vertend is used because it flushes the point
size in the wrong place.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-07 15:13:29 +00:00
Robert Bragg
13ba312d3a test: remove FEATURE_GL requirement for sub_texture test
test-cogl-sub-texture was fixed to now run on GLES2 since commit
5928cade0b so this removes the TEST_REQUIREMENT_GL flag for this test
so it doesn't get flagged as an unexpected pass.
2012-03-05 22:58:42 +00:00
Neil Roberts
6ad168e4be Port the test-pixel-buffer test
This ports the text-pixel-buffer test from being a Clutter test to a
straight Cogl test.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-05 19:02:37 +00:00
Neil Roberts
b85f2e907a tests: Add a test which writes all pixel formats
This adds a test similar to the test-read-texture-formats test but
that updates data on a 1x1 pixel RGBA texture instead. On GLES2 this
should end up testing all of the convesion code because in that case
GL only supports reading back RGBA data.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-05 17:44:52 +00:00
Neil Roberts
70dfbdd5e3 tests: Test reading all pixel formats
The test-read-alpha-texture test has been replaced with a test that
tries reading an RGBA texture in all current pixel formats. On GLES2
this should end up testing all of the convesion code because in that
case GL only supports reading back RGBA data. The test now works on
GLES2 since the conversion code for all of the formats has been added
so this also removes the GL requirement.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-05 17:44:51 +00:00
Neil Roberts
b6dc23370d Add a conformance test for reading back an RGBA texture as alpha-only
This just creates a 1x1 RGBA texture and then reads it back in
COGL_PIXEL_FORMAT_A_8 format. Gnome Shell is doing this to create a
shadow and I accidentally broke it so this should hopefully stop that
happening again.

https://bugzilla.gnome.org/show_bug.cgi?id=671016

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-05 17:43:46 +00:00
Robert Bragg
bbcbece6c9 tests: Improve thoroughness and reporting of make test
This patch reworks our conformance testing framework because it seems
that glib's gtesting framework isn't really well suited to our use case.
For example we weren't able to test windows builds given the way we
were using it and also for each test we'd like to repeat the test
with several different environments so we can test important driver and
feature combinations.

This patch instead switches away to a simplified but custom approach for
running our unit tests. We hope that having a more bespoke setup will
enable us to easily extend it to focus on the details important to us.

Notable changes with this new approach are:

We can now run 'make test' for our mingw windows builds.

We've got rid of all the test-*report* make rules and we're just left
with 'make test'

'make test' now runs each test several times with different driver and
feature combinations checking the result for each run. 'make test' will
then output a concise table of all of the results.

The combinations tested are:
- OpenGL Fixed Function
- OpenGL ARBfp
- OpenGL GLSL
- OpenGL No NPOT texture support
- OpenGLES 2.0
- OpenGLES 2.0 No NPOT texture support

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-02-24 14:42:31 +00:00
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
Neil Roberts
7cd2f25eb0 test-texture-3d: Port to Cogl
This ports the texture-3d test to Cogl instead of depending on
Clutter.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-02-13 17:15:35 +00:00
Neil Roberts
a226b368f3 Port the test-primitive test from Clutter to Cogl
This converts test-primitive to be a standalone Cogl test instead of
relying on Clutter code.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-02-07 15:25:36 +00:00
Neil Roberts
bd6810de10 tests: Port test-offscreen
This ports the test-offscreen test from being a Clutter test to a
straight Cogl test.

https://bugzilla.gnome.org/show_bug.cgi?id=668913

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-01-31 12:01:20 +00:00
Neil Roberts
72097ac01d Add a conformance test for custom attributes
The test creates some pipelines with snippets with custom attributes
and uses CoglAttribute to define values for them.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-06 19:02:06 +00:00
Neil Roberts
2f66cd7036 Add a conformance test for CoglSnippets
This adds a conformance test testing various operations on
CoglSnippets.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-06 19:02:05 +00:00
Neil Roberts
8805d835aa Add a conformance test for setting uniforms on a pipeline
The tests tries all of the various combinations of setting uniform
values on a pipeline and verifies the expected results with a some
example shaders.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-11-16 16:32:11 +00:00
Neil Roberts
ec1c3406ad Add a conformance test for CoglBitmask
This adds a test which tries manipulating some bits on a CoglBitmask
and verifies that it gets the expected result. This test is fairly
unusual in that it is directly testing some internal Cogl code that
isn't exposed through the public API. To make this work it directly
includes the source for CoglBitmask.

CoglBitmask does some somewhat dodgy things with converting longs to
pointers and back so it makes sense to have a test case to verify that
this is working on all platforms.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-11-16 16:21:13 +00:00
Luca Bruno
3a27ae0dc8 tests: Port test-path conformance test from Clutter
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-11-03 20:31:14 +00:00
Robert Bragg
b2b4eba0e7 tests: ports test-sub-texture to not depend on clutter
As part of the on going effort to port the conformance tests that were
originally written as clutter tests to be standalone cogl tests this
patch ports the test-sub-texture test to be standalone now.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-11-01 12:03:04 +00:00
Robert Bragg
3c129f5c18 tests: ports test-wrap-modes.c to be standalone cogl test
This ports test-wrap-modes.c from being a clutter based test to one that
is a standalone cogl test.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-11-01 12:03:01 +00:00
Luca Bruno
bdfaf94afb tests: Port blend-strings to test both the legacy and the new API
https://bugzilla.gnome.org/show_bug.cgi?id=660617

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-10-12 13:50:11 +01:00
Luca Bruno
3d75bd35ba Port the pipeline-user-matrix conformance test from Clutter
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-10-01 15:10:55 +01:00
Luca Bruno
5784905462 Port just-vertex-shader to test both the legacy and the new API
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-10-01 15:02:03 +01:00