Procedural IBL GPU memory leak?

Hi @Gabby_Getz !

This commit: Merge pull request #12129 from CesiumGS/procedural-ibl · CesiumGS/cesium@192ab06 · GitHub

… causes a huge memory leak on Chrome when loading many 3d tilesets. We are seeing GPU process of 20 gigabytes which normally before this commit was ~5 gb.

The problem goes away if we comment out this line:

… so something happens in updateRadianceMap that causes propably texture-maps to leak memory a lot.

I couldn’t create a sandcastle out of this yet, not really sure what is going on…

By the way I am wondering if there is an official api to just turn off this procedural IBL?

Hi @v12424124_34,

Thanks for the report! We’ll look into what is leaking.

In the meantime, you can disable the environment maps with the enabled property. For example:

const tileset = await Cesium.Cesium3DTileset.fromUrl(...);
tileset.environmentMapManager.enabled = false;

Thanks,
Gabby

Thanks! This option to false solves the memleak.

Here is the sandcastle that produces 1GB size for chrome task managers GPU process with 4 models and 4GB with 100 models. I am not sure if this reproduces the case though… but it is a bit similar to our scenario. (Note: it will load 100 models for tens of seconds)

1 Like

Here is a better sandcastle:

If we turn of the dynamic env map the same code takes only about 1GB of the GPU mem. Then with dynamic env maps, it takes about 3GB.

Thanks for providing solution. It help me a lot.

1 Like

Hi all, I opened a pull request addressing this memory leak. If you have the time to review, please try it and let me know if you see better results.