From 46e7b591d2dffd2e16b43ad1954396f1e495eeb0 Mon Sep 17 00:00:00 2001 From: tcauchois Date: Fri, 18 Oct 2019 17:51:58 -0700 Subject: [PATCH 1/4] [usdImaging] Filter out resync/populate calls inside USD masters. In one reported case, for example, resyncing a model prim would resync all of the (singly-instantiated) masters representing instances in the model. Since each resync call ends up as a call to populate (in case new prims were added), we'd get a resync on both the instance and the master, and double-insert prims, some of which wouldn't have the benefit of their instance transform or bound material. This matches behavior before the USD edit change, although the check is in a more appropriate place now. Fixes #1003 Fixes #1005 (Internal change: 2013847) --- pxr/usdImaging/lib/usdImaging/delegate.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pxr/usdImaging/lib/usdImaging/delegate.cpp b/pxr/usdImaging/lib/usdImaging/delegate.cpp index c49b87d245..b330f6b374 100644 --- a/pxr/usdImaging/lib/usdImaging/delegate.cpp +++ b/pxr/usdImaging/lib/usdImaging/delegate.cpp @@ -654,12 +654,18 @@ UsdImagingDelegate::_Populate(UsdImagingIndexProxy* proxy) leafPaths.reserve(usdPathsToRepopulate.size()); for (SdfPath const& usdPath: usdPathsToRepopulate) { + + // _Populate should never be called on master prims or prims in master. + UsdPrim prim = _GetUsdPrim(usdPath); + if (prim.IsMaster() || prim.IsInMaster()) { + continue; + } + // Discover and insert all renderable prims into the worker for later // execution. TF_DEBUG(USDIMAGING_CHANGES).Msg("[Repopulate] Root path: <%s>\n", usdPath.GetText()); - - UsdPrimRange range(_GetUsdPrim(usdPath)); + UsdPrimRange range(prim); for (auto iter = range.begin(); iter != range.end(); ++iter) { if (!iter->GetPath().HasPrefix(_rootPrimPath)) { iter.PruneChildren(); From 89ba9f45288e5a4eb7a8a9e586028705d3f25d09 Mon Sep 17 00:00:00 2001 From: c64kernal Date: Mon, 21 Oct 2019 14:09:01 -0700 Subject: [PATCH 2/4] Extra validity check when testing for master prim. See #1003 See #1005 (Internal change: 2014069) --- pxr/usdImaging/lib/usdImaging/delegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pxr/usdImaging/lib/usdImaging/delegate.cpp b/pxr/usdImaging/lib/usdImaging/delegate.cpp index b330f6b374..ff4e10fa3a 100644 --- a/pxr/usdImaging/lib/usdImaging/delegate.cpp +++ b/pxr/usdImaging/lib/usdImaging/delegate.cpp @@ -657,7 +657,7 @@ UsdImagingDelegate::_Populate(UsdImagingIndexProxy* proxy) // _Populate should never be called on master prims or prims in master. UsdPrim prim = _GetUsdPrim(usdPath); - if (prim.IsMaster() || prim.IsInMaster()) { + if (prim && (prim.IsMaster() || prim.IsInMaster())) { continue; } From 593ceea3b48b4415500b1a748acab2f4a0d01f0f Mon Sep 17 00:00:00 2001 From: lumonix Date: Mon, 21 Oct 2019 14:09:33 -0700 Subject: [PATCH 3/4] ColorCorrection is set every frame in ImagingGL engine. There we do not set the AOV on the params (because there we don't know what aovs we are using). So every frame we think color correction is changed.Which.....means we recompile the shader every frame. (Internal change: 2014080) --- pxr/imaging/lib/hdx/taskController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pxr/imaging/lib/hdx/taskController.cpp b/pxr/imaging/lib/hdx/taskController.cpp index 3733eb06d9..1da3eb2b35 100644 --- a/pxr/imaging/lib/hdx/taskController.cpp +++ b/pxr/imaging/lib/hdx/taskController.cpp @@ -1771,7 +1771,7 @@ HdxTaskController::SetColorCorrectionParams( newParams.aovName = oldParams.aovName; newParams.aovBufferPath = oldParams.aovBufferPath; - if (params != oldParams) { + if (newParams != oldParams) { _delegate.SetParameter( _colorCorrectionTaskId, HdTokens->params, newParams); From 87e0dc5322be2794230e8e53d45bedcbe2d52a86 Mon Sep 17 00:00:00 2001 From: tallytalwar Date: Mon, 21 Oct 2019 15:51:20 -0700 Subject: [PATCH 4/4] usdShaders: Make usdShaders a pxr_plugin See #530 (Internal change: 2014160) --- pxr/usdImaging/plugin/usdShaders/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pxr/usdImaging/plugin/usdShaders/CMakeLists.txt b/pxr/usdImaging/plugin/usdShaders/CMakeLists.txt index d8ca25d2bc..35d890cd74 100644 --- a/pxr/usdImaging/plugin/usdShaders/CMakeLists.txt +++ b/pxr/usdImaging/plugin/usdShaders/CMakeLists.txt @@ -1,7 +1,7 @@ set(PXR_PREFIX pxr/usdImaging) set(PXR_PACKAGE usdShaders) -pxr_library(usdShaders +pxr_plugin(usdShaders LIBRARIES ar ndr