Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAYA-113944 Enable primvar filtering to match HdSt behavior. #1737

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

williamkrick
Copy link
Contributor

This gives a substantial performance improvement by avoiding calls to _ComputeAndMergePrimvar made from UsdImagingGprimAdapter::UpdateForTime.

@@ -127,6 +127,8 @@ class HdVP2RenderDelegate final : public HdRenderDelegate
TfTokenVector GetMaterialRenderContexts() const override;
#endif

bool IsPrimvarFilteringNeeded() const override { return true; }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flag is tested in gprimAdapter to determine if all primvars are necessary. When the flag is not set _ComputeAndMergePrimvar is called on every primvar on the rprim. When the flag is set _ComputeAndMergePrimvar is only called for primvars actually used by the usd material on the gprim.

When we execute this code with Vp2RenderDelegate the materialUsdPath is empty, and no primvars are updated. That is fine because our mesh adapter will trigger the necessary primvar updates itself.

@williamkrick
Copy link
Contributor Author

After this change to filtering the performance of the animated scene improves and the next bottleneck is normal calculation performance.

@williamkrick williamkrick added the vp2renderdelegate Related to VP2RenderDelegate label Sep 30, 2021
@williamkrick williamkrick added the ready-for-merge Development process is finished, PR is ready for merge label Oct 1, 2021
@kxl-adsk kxl-adsk merged commit f0ff6fb into dev Oct 12, 2021
@kxl-adsk kxl-adsk deleted the krickw/MAYA-113944/enable_primvar_filtering branch October 12, 2021 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge vp2renderdelegate Related to VP2RenderDelegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants