PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.12k stars 1.22k forks source link

Segfaults in HgiMetal on USD 23.11 when using DomeLights + Depth AOV #2745

Closed dgovil closed 1 year ago

dgovil commented 1 year ago

Reporting on behalf of others

Description of Issue

On the OpenUSD "dev" branch, I am getting a crash in Storm when rendering depth when there is a Dome light with a texture in the scene. This happens on macOS (both x86 and arm64). I have not tested on other OS's. The easiest way to see this is to load a scene in usdview and ask it to show the AOV "depth". It does not happen on the release 23.08 branch.

Steps to Reproduce

  1. Create a scene with a dome light with a texture. The scene doesn't need any other objects. I've tried both a PNG and EXR file as the dome texture.
  2. Open the scene in usdview.
  3. Make sure Display->Show Dome Light Texture is ON.
  4. Select Renderer->Hydra AOVs->depth. usdview will crash. The log indicates the crash is in HgiMetalGraphicsCmds::HgiMetalGraphicsCmds

System Information (OS, Hardware)

macOS 14.0 with Python 3.8

crashlog.txt

SampleAsset.zip

drwave commented 1 year ago

This also happens in main, 23.11 rc1

drwave commented 1 year ago

The commit ID which introduced the crash is 24acf5a6d

the PR which causes this is primarily about adding effectsShaders. But there is a small change to skydomeTask.cpp, and this likely is the issue. The change is: // Bind the skydome texture

jesschimein commented 1 year ago

Filed as internal issue #USD-8845

sunyab commented 1 year ago

Thanks for the report, we're digging into this now!

jonogibbs commented 1 year ago

Awesome, thank you!