AcademySoftwareFoundation / OpenShadingLanguage

Advanced shading language for production GI renderers
BSD 3-Clause "New" or "Revised" License
2.05k stars 347 forks source link

Fix NVPTX TargetMachine leak #1763

Closed tgrant-nv closed 5 months ago

tgrant-nv commented 5 months ago

Description

This PR includes fixes for three issues:

  1. A leak of the llvm::TargetMachine used for NVPTX.
  2. A segfault that can occur in testrender when the renderer is destroyed before the ShadingSystem.
  3. A compilation failure when using CUDA Toolkit 12.0 or newer due to references to the long-deprecated (and now removed) textureReference API still being present in the LLVM headers.

These changes aren't related, but I've bundled them up for convenience. I can break these into individual PRs if that would be preferable.

Tests

No new tests, but all previously passing tests still pass.

Checklist:

tgrant-nv commented 5 months ago

@lgritz, is this (in particular, the leak fix) something that we should get in for the 1.13 release?