diff --git a/cogl/cogl/cogl-pipeline-state.c b/cogl/cogl/cogl-pipeline-state.c index ecfc4cd3b..8408a4af9 100644 --- a/cogl/cogl/cogl-pipeline-state.c +++ b/cogl/cogl/cogl-pipeline-state.c @@ -1624,38 +1624,3 @@ UNIT_TEST (check_blend_constant_ancestry, cogl_object_unref (pipeline); } - -UNIT_TEST (check_uniform_ancestry, - 0 /* no requirements */, - TEST_KNOWN_FAILURE) -{ - CoglPipeline *pipeline = cogl_pipeline_new (test_ctx); - CoglNode *node; - int pipeline_length = 0; - int i; - - /* Repeatedly making a copy of a pipeline and changing a uniform - * shouldn't cause a long chain of pipelines to be created */ - - for (i = 0; i < 20; i++) - { - CoglPipeline *tmp_pipeline; - int uniform_location; - - tmp_pipeline = cogl_pipeline_copy (pipeline); - cogl_object_unref (pipeline); - pipeline = tmp_pipeline; - - uniform_location = - cogl_pipeline_get_uniform_location (pipeline, "a_uniform"); - - cogl_pipeline_set_uniform_1i (pipeline, uniform_location, i); - } - - for (node = (CoglNode *) pipeline; node; node = node->parent) - pipeline_length++; - - g_assert_cmpint (pipeline_length, <=, 2); - - cogl_object_unref (pipeline); -} diff --git a/src/tests/cogl/unit/meson.build b/src/tests/cogl/unit/meson.build index b5571b7ad..1158c3349 100644 --- a/src/tests/cogl/unit/meson.build +++ b/src/tests/cogl/unit/meson.build @@ -1,6 +1,7 @@ cogl_unit_tests = [ ['test-bitmask', true], ['test-pipeline-cache', true], + ['test-pipeline-state-known-failure', false], ] test_env = environment() diff --git a/src/tests/cogl/unit/test-pipeline-state-known-failure.c b/src/tests/cogl/unit/test-pipeline-state-known-failure.c new file mode 100644 index 000000000..593d8b98c --- /dev/null +++ b/src/tests/cogl/unit/test-pipeline-state-known-failure.c @@ -0,0 +1,45 @@ +#include "cogl-config.h" + +#include "cogl/cogl.h" +#include "cogl/cogl-pipeline-state.h" +#include "tests/cogl-test-utils.h" + +static void +test_pipeline_state_uniform_ancestry (void) +{ + CoglPipeline *pipeline; + CoglNode *node; + int pipeline_length = 0; + int i; + + pipeline = cogl_pipeline_new (test_ctx); + + /* Repeatedly making a copy of a pipeline and changing a uniform + * shouldn't cause a long chain of pipelines to be created */ + + for (i = 0; i < 20; i++) + { + CoglPipeline *tmp_pipeline; + int uniform_location; + + tmp_pipeline = cogl_pipeline_copy (pipeline); + cogl_object_unref (pipeline); + pipeline = tmp_pipeline; + + uniform_location = + cogl_pipeline_get_uniform_location (pipeline, "a_uniform"); + + cogl_pipeline_set_uniform_1i (pipeline, uniform_location, i); + } + + for (node = (CoglNode *) pipeline; node; node = node->parent) + pipeline_length++; + + g_assert_cmpint (pipeline_length, <=, 2); + + cogl_object_unref (pipeline); +} + +COGL_TEST_SUITE ( + g_test_add_func ("/pipeline-state/uniform-ancestry", test_pipeline_state_uniform_ancestry); +)