diff --git a/pxr/imaging/plugin/hdRpr/domeLight.cpp b/pxr/imaging/plugin/hdRpr/domeLight.cpp index cd27150cf..8922eb281 100644 --- a/pxr/imaging/plugin/hdRpr/domeLight.cpp +++ b/pxr/imaging/plugin/hdRpr/domeLight.cpp @@ -289,7 +289,6 @@ bool ResolveRat(std::string& path) { HdRprDomeLight::HdRprDomeLight(SdfPath const& id) : HdSprim(id) { - CreateOverrideEnableParmIfNeeded(id); } void HdRprDomeLight::Sync(HdSceneDelegate* sceneDelegate, @@ -299,6 +298,11 @@ void HdRprDomeLight::Sync(HdSceneDelegate* sceneDelegate, auto rprApi = rprRenderParam->AcquireRprApiForEdit(); SdfPath const& id = GetId(); + // Lazy parm initialization to avoid synchronization issue https://amdrender.atlassian.net/browse/RPRHOUD-112 + if (!m_parmCreated) { + CreateOverrideEnableParmIfNeeded(id); + m_parmCreated = true; + } HdDirtyBits bits = *dirtyBits; if (bits & HdLight::DirtyTransform) { diff --git a/pxr/imaging/plugin/hdRpr/domeLight.h b/pxr/imaging/plugin/hdRpr/domeLight.h index d1e0fb904..18a5ea3cf 100644 --- a/pxr/imaging/plugin/hdRpr/domeLight.h +++ b/pxr/imaging/plugin/hdRpr/domeLight.h @@ -39,6 +39,7 @@ class HdRprDomeLight : public HdSprim { protected: HdRprApiEnvironmentLight* m_rprLight = nullptr; GfMatrix4f m_transform; + bool m_parmCreated = false; }; PXR_NAMESPACE_CLOSE_SCOPE