From 534b22c12dc18203ab5b233792debca8bf843b2e Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Fri, 24 Jan 2025 16:17:30 -0800 Subject: [PATCH] work: account for task_group_base interface change in oneTBB 2022.0.0 The `m_wait_ctx` member being used in a narrow band of oneTBB versions was removed in a refactor that went into version [v2022.0.0](https://github.com/oneapi-src/oneTBB/releases/tag/v2022.0.0) which was released yesterday: https://github.com/oneapi-src/oneTBB/commit/1f52f5093ec7ce23829fe64ab82ac5541fea42ee This change accounts for the update in the new version of oneTBB and uses the newly added `m_wait_vertex` member to access the same context as before. Closes #3392 (Internal change: 2354795) --- pxr/base/work/dispatcher.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pxr/base/work/dispatcher.cpp b/pxr/base/work/dispatcher.cpp index 24daa98b5b..45a9f38004 100644 --- a/pxr/base/work/dispatcher.cpp +++ b/pxr/base/work/dispatcher.cpp @@ -34,7 +34,11 @@ WorkDispatcher::WorkDispatcher() #if TBB_INTERFACE_VERSION_MAJOR >= 12 inline tbb::detail::d1::wait_context& WorkDispatcher::_TaskGroup::_GetInternalWaitContext() { +#if TBB_INTERFACE_VERSION_MINOR >= 14 + return m_wait_vertex.get_context(); +#else return m_wait_ctx; +#endif } #endif