ingowald / optix7course

Apache License 2.0
452 stars 80 forks source link

Memory Leak in SampleRenderer When Loading a New Model? #36

Closed pseudo-randomness closed 1 year ago

pseudo-randomness commented 1 year ago

I'm modifying an app that uses the SampleRenderer class. I added the following function that replaces the current model with a new one. It works very well, but GPU memory increases each time I add new models until it eventually runs out of memory. nvidia-smi shows memory increasing by 2 to 14 Mb depending on the complexity of the model.

  void SampleRenderer::setModel(Model *newModel)
  {
    model = newModel;
    createTextures();
    buildAccel();

    owlBuildPrograms(context);
    owlBuildPipeline(context);
    owlBuildSBT(context);
  }
ingowald commented 1 year ago

Would I be amiss to suspect that you posted this to the wrong github project? Though the "SampleRenderer" etc look close enough to this project to confuse me for a while the "owlXyz()" calls make me suspect this is supposed to be going to the OWL project github tracker? (https://github.com/owl-project/owl) ?

pseudo-randomness commented 1 year ago

You're probably right. I posted the issue to owl-project/owl