From 3f8e8e47b472798e952c8f8fa902f88c563f5973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Delgado=20Kr=C3=A4mer?= Date: Sat, 7 Dec 2024 11:24:57 +0100 Subject: [PATCH] hdGatling: enable parallel processing of prims --- src/hdGatling/renderDelegate.cpp | 9 +++++++++ src/hdGatling/renderDelegate.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/hdGatling/renderDelegate.cpp b/src/hdGatling/renderDelegate.cpp index 9223da15..cb58c16a 100644 --- a/src/hdGatling/renderDelegate.cpp +++ b/src/hdGatling/renderDelegate.cpp @@ -350,4 +350,13 @@ TfTokenVector HdGatlingRenderDelegate::GetShaderSourceTypes() const return TfTokenVector{ HdGatlingSourceTypes->mtlx, HdGatlingSourceTypes->mdl }; } +#if PXR_VERSION >= 2408 +bool HdGatlingRenderDelegate::IsParallelSyncEnabled(const TfToken& primType) const +{ + return primType == HdPrimTypeTokens->mesh || + primType == HdPrimTypeTokens->material || + primType == HdPrimTypeTokens->instancer; +} +#endif + PXR_NAMESPACE_CLOSE_SCOPE diff --git a/src/hdGatling/renderDelegate.h b/src/hdGatling/renderDelegate.h index 69860f1c..cd38ac38 100644 --- a/src/hdGatling/renderDelegate.h +++ b/src/hdGatling/renderDelegate.h @@ -102,6 +102,10 @@ class HdGatlingRenderDelegate final : public HdRenderDelegate TfTokenVector GetShaderSourceTypes() const override; +#if PXR_VERSION >= 2408 + bool IsParallelSyncEnabled(const TfToken& primType) const override; +#endif + private: const MaterialNetworkCompiler& _materialNetworkCompiler; const std::string _resourcePath;