Test FragmentShader.setImageSampler memory leaks (Linux and Android simulator)
By running this app, memory leaks start to be noticed after 40~60 seconds on the Operating System Monitor. Memory tab of DevTools doesn't report leaks.
- This sample uses 2 shaders:
shader_a.fragandshader_b.frag. - The shaders are drawn using
PictureRecorder()and the output is stored into 2 differentui.Images. - When pressing the button, the
Tickerstarts updating shader outputs. shader_auses the lastest output ofshader_bas sampler2D uniform andshader_buses the latest output of itself.
The leak doesn't occurs when:
- Removing the sampler2D uniform from
shader_b.frag(and of course thesetImageSamplerfromcomputeShader2()) - in
computeShader2()replacesetImageSampler(0, sampler1 ?? blankImage!);withsetImageSampler(0, blankImage!);whereblankImageis the image loaded at start
Here a screenshot of the System Operating System memory monitor. After about 40 seconds memory leaks start growing till 100% is reached.
