problem with first use of a copied pipeline layer texture not freeing, subsequent textures do free
- From: Reza Ghassemi <reza robin1 gmail com>
- To: clutter-list gnome org
- Subject: problem with first use of a copied pipeline layer texture not freeing, subsequent textures do free
- Date: Mon, 18 Apr 2016 16:22:48 -0700
Hi,
I'm cc'ing this question to the clutter mailing list because the cogl mailing list has very little traffic
----
I am either using pipelines incorrectly or found a problem in cogl pipelinelayer code. Are they really supposed to be treated as immutable afteryou've rendered with them? I just read that in check-in comments and thatis not how I programmed my code. In this problem case I'm not making achange after rendering so the immutability is moot. But changing them likeadding/removing a layer does seem to work with the same pipeline.The following occurs ONLY on the first Actor I create with a new or copiedpipeline. All additional actors with a new or copied pipeline do not causea leak.First case: I'm creating a pipeline, setting a texture on layer 0, drawingwith it, then later unreffing the pipeline. It seems that the pipelinewould be freed but the texture did not because a pipeline layer held areference to it. I inserted a cogl_pipeline_set_layer_texture(pipeline, 0,NULL) in my code just before unreffing the pipeline and voila the texturewas freed.In another version of the code I copy a pipeline, setting a texture onlayer 0, drawing with it, then later unreffing the pipeline. It seemsagain that the pipeline would be freed but the texture did not because apipeline layer held a reference to it. I inserted acogl_pipeline_set_layer_texture(pipeline, 0, NULL) in my code just beforeunreffing the pipeline, but in this case the texture is not unreffed andfreed. In the routine _cogl_pipeline_set_layer_texture_data() for somereason for just the first actor and pipeline copy it takes the (new !=layer) condition and doesn't unref the texture which is done in the elseclause (/* If the original layer we found is currently the authority on...) for all subsequent actors / pipeline copies.Unfortunately if you have for the first actor and pipeline a 1024x1024texture and activate the atlas then you get a 2048x2048 atlas (16Mb of GPURAM) that doesn't free up when the actor and pipeline copy is destroyed.Could anyone help me out here?Thanks,Reza
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]