@@ -1573,36 +1573,17 @@ def InstallMaterialX(context, force, buildArgs):
15731573
15741574############################################################
15751575# Embree
1576- # For MacOS we use version 3.13.3 to include a fix from Intel
1577- # to build on Apple Silicon.
1578- if MacOS ():
1579- EMBREE_URL = "https://github.com/embree/embree/archive/v3.13.3.zip"
1580- else :
1581- EMBREE_URL = "https://github.com/embree/embree/archive/v3.2.2.zip"
15821576
15831577def InstallEmbree (context , force , buildArgs ):
1578+ EMBREE_URL = "https://github.com/RenderKit/embree/archive/refs/tags/v4.3.3.zip"
1579+
15841580 with CurrentWorkingDirectory (DownloadURL (EMBREE_URL , context , force )):
15851581 extraArgs = [
1586- '-DTBB_ROOT={instDir}' .format (instDir = context .instDir ),
1582+ '-DTBB_ROOT=" {instDir}" ' .format (instDir = context .instDir ),
15871583 '-DEMBREE_TUTORIALS=OFF' ,
15881584 '-DEMBREE_ISPC_SUPPORT=OFF'
15891585 ]
15901586 if MacOS ():
1591- # Backport fix for clang build errors in debug output operators
1592- # to Embree 3.13.3. This is fixed in Embree 4.3.2.
1593- # https://github.com/RenderKit/embree/issues/486
1594- PatchFile ("kernels/subdiv/bezier_curve.h" ,
1595- [('return cout << "QuadraticBezierCurve ( (" << a.u.lower << ", " << a.u.upper << "), " << a.v0 << ", " << a.v1 << ", " << a.v2 << ")";' ,
1596- 'return cout << "QuadraticBezierCurve (" << a.v0 << ", " << a.v1 << ", " << a.v2 << ")";' ),
1597- ]
1598- )
1599- PatchFile ("kernels/geometry/pointi.h" ,
1600- [("friend __forceinline embree_ostream operator<<(embree_ostream cout, const PointMi& line)" ,
1601- "friend __forceinline embree_ostream operator<<(embree_ostream cout, const PointMi& point)" ),
1602- ('return cout << "Line" << M << "i {" << line.v0 << ", " << line.geomID() << ", " << line.primID() << "}";' ,
1603- 'return cout << "Point" << M << "i {" << point.geomID() << ", " << point.primID() << "}";' )
1604- ]
1605- )
16061587 # Suppress clang build warnings as errors
16071588 PatchFile ("kernels/CMakeLists.txt" ,
16081589 [("DISABLE_STACK_PROTECTOR_FOR_INTERSECTORS(${EMBREE_LIBRARY_FILES})\n "
@@ -1621,7 +1602,8 @@ def InstallEmbree(context, force, buildArgs):
16211602
16221603 RunCMake (context , force , extraArgs )
16231604
1624- EMBREE = Dependency ("Embree" , InstallEmbree , "include/embree3/rtcore.h" )
1605+ EMBREE = Dependency ("Embree" , InstallEmbree ,
1606+ "include/embree4/rtcore.h" )
16251607
16261608############################################################
16271609# AnimX
@@ -2479,11 +2461,6 @@ def ForceBuildDependency(self, dep):
24792461 PrintError ("Draco plugin can not be enabled for monolithic build on Windows" )
24802462 sys .exit (1 )
24812463
2482- # The versions of Embree we currently support do not support oneTBB.
2483- if context .buildOneTBB and context .buildEmbree :
2484- PrintError ("Embree support cannot be enabled when building against oneTBB" )
2485- sys .exit (1 )
2486-
24872464# Windows ARM64 requires oneTBB. Since oneTBB is a non-standard option for the
24882465# currently aligned version of the VFX Reference Platform, we error out and
24892466# require the user to explicitly specify --onetbb instead of silently switching
0 commit comments