|
28 | 28 | // oneTBB as a min spec. This applies the "Work" thread limit to the |
29 | 29 | // render thread if "Work" is using old TBB, but won't affect other "Work" |
30 | 30 | // implementations. Note that it may affect Embree TBB usage as well. |
| 31 | +// |
| 32 | +// Note: The TBB version macro is located in different headers in legacy TBB. |
31 | 33 | // ------------------------------------------------------------------------- |
| 34 | +#if __has_include(<tbb/tbb_stddef.h>) |
32 | 35 | #include <tbb/tbb_stddef.h> |
| 36 | +#elif __has_include(<tbb/version.h>) |
| 37 | +#include <tbb/version.h> |
| 38 | +#endif |
| 39 | + |
| 40 | +#ifndef TBB_INTERFACE_VERSION_MAJOR |
| 41 | +#error "TBB version macro TBB_INTERFACE_VERSION_MAJOR not found" |
| 42 | +#endif |
33 | 43 |
|
34 | 44 | #if TBB_INTERFACE_VERSION_MAJOR < 12 |
35 | 45 |
|
@@ -709,9 +719,7 @@ HdEmbreeRenderer::_TraceRay(unsigned int x, unsigned int y, |
709 | 719 | rayHit.ray.flags = 0; |
710 | 720 | _PopulateRayHit(&rayHit, origin, dir, 0.0f); |
711 | 721 | { |
712 | | - RTCIntersectContext context; |
713 | | - rtcInitIntersectContext(&context); |
714 | | - rtcIntersect1(_scene, &context, &rayHit); |
| 722 | + rtcIntersect1(_scene, &rayHit); |
715 | 723 | // |
716 | 724 | // there is something odd about how this is used in Embree. Is it reversed |
717 | 725 | // here and then when it it used in |
@@ -1047,9 +1055,7 @@ HdEmbreeRenderer::_ComputeAmbientOcclusion(GfVec3f const& position, |
1047 | 1055 | shadow.flags = 0; |
1048 | 1056 | _PopulateRay(&shadow, position, shadowDir, 0.001f); |
1049 | 1057 | { |
1050 | | - RTCIntersectContext context; |
1051 | | - rtcInitIntersectContext(&context); |
1052 | | - rtcOccluded1(_scene,&context,&shadow); |
| 1058 | + rtcOccluded1(_scene, &shadow); |
1053 | 1059 | } |
1054 | 1060 |
|
1055 | 1061 | // Record this AO ray's contribution to the occlusion factor: a |
|
0 commit comments