mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
cogl/pipeline-state: Move out failing test to its own file
This test is a known failure, so mark it as such. It's stored in its own file since keeping it in the same as the passing test isn't markable using meson. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555>
This commit is contained in:
parent
57382b6aff
commit
ae0f6c549f
@ -1624,38 +1624,3 @@ UNIT_TEST (check_blend_constant_ancestry,
|
|||||||
|
|
||||||
cogl_object_unref (pipeline);
|
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);
|
|
||||||
}
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
cogl_unit_tests = [
|
cogl_unit_tests = [
|
||||||
['test-bitmask', true],
|
['test-bitmask', true],
|
||||||
['test-pipeline-cache', true],
|
['test-pipeline-cache', true],
|
||||||
|
['test-pipeline-state-known-failure', false],
|
||||||
]
|
]
|
||||||
|
|
||||||
test_env = environment()
|
test_env = environment()
|
||||||
|
45
src/tests/cogl/unit/test-pipeline-state-known-failure.c
Normal file
45
src/tests/cogl/unit/test-pipeline-state-known-failure.c
Normal file
@ -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);
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user