summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-03-26 11:17:55 +0000
committerNeil Roberts <neil@linux.intel.com>2013-04-04 13:30:00 +0100
commite27e01c1215e7e7c7c0183ded11dd769bb112c5c (patch)
treec2c9e9a56b4e9f68472d8bd32b47622efb30edf7 /tests
parent4a0460a452fd1be382fd5a92d8cfd5e0cdfd4403 (diff)
downloadcogl-e27e01c1215e7e7c7c0183ded11dd769bb112c5c.tar.gz
pipeline-cache: Use a special trimmed down pipeline for the key
When a pipeline is added to the cache, a normal copy would previously be made to use as the key in the hash table. This copy keeps a reference to the real pipeline which means all of the resources it contains are retained forever, even if they aren't necessary to generate the hash. This patch changes it to create a trimmed down copy that only has the state necessary to generate the hash. A new function called _cogl_pipeline_deep_copy is added which makes a new pipeline that is directly a child of the root pipeline. It then copies over the pertinent state from the original pipeline. The pipeline state is copied using the existing _cogl_pipeline_copy_differences function. There was no equivalent function for the layer state so I have added one. That way the pipeline key doesn't have the texture data state and it doesn't hold a reference to the original pipeline so it should be much cheaper to keep around. Reviewed-by: Robert Bragg <robert@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/conform/test-conform-main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c
index 2dd56557..93450657 100644
--- a/tests/conform/test-conform-main.c
+++ b/tests/conform/test-conform-main.c
@@ -122,7 +122,7 @@ main (int argc, char **argv)
ADD_TEST (test_copy_replace_texture, 0, 0);
- ADD_TEST (test_pipeline_cache_unrefs_texture, 0, TEST_KNOWN_FAILURE);
+ ADD_TEST (test_pipeline_cache_unrefs_texture, 0, 0);
UNPORTED_TEST (test_viewport);