-
Notifications
You must be signed in to change notification settings - Fork 1.4k
hdEmbree: add support for building against embree4 #2313
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
hdEmbree: add support for building against embree4 #2313
Conversation
|
Filed as internal issue #USD-8057 |
|
Just noticing that @musicinmybrain covered roughly the same ground in #2266, so apologies for the duplicate! The changes here though allow building against either |
98b171a to
e6e707f
Compare
|
Mostly just a rebase on the current dev branch with this most recent push, but I also bumped the version of Embree in the |
e6e707f to
28cc1fc
Compare
|
Rebased to resolve merge conflicts. While I was at it, I also bumped Embree 4.x to the current release (4.3.0) when the new |
This also means disabling the Embree Hydra delegate, since that doesn't support Embree 4 yet - see PixarAnimationStudios/OpenUSD#2313 for work in progress. We put higher value in matching the Embree version to Cycles 4 than we do in having the Embree delegate in `usdview`.
28cc1fc to
9050557
Compare
|
Updated again to bump the Embree 4 version to the new 4.3.1 release. |
9050557 to
6a0360a
Compare
|
Freshening with a rebase on the current dev branch (35dbce1). |
6a0360a to
90dc0f2
Compare
|
Rebased to resolve merge conflict following precompiler header updates in 5000b45. |
90dc0f2 to
04f899e
Compare
|
Rebased on the current dev branch (9562005), and bumped Embree to the new latest version (4.3.2). |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
04f899e to
0ec76f5
Compare
|
Rebased on the current dev branch (559b77a), and bumped Embree to the new latest version (4.3.3). I also accounted for 9010646 where building with oneTBB through |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
0ec76f5 to
90ef24e
Compare
|
Rebased to resolve merge conflict following precompiled header updates in 9bf2e14. |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
90ef24e to
079ac9f
Compare
|
Freshening with a rebase on the current dev branch (b787c84). |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
6d8345e to
b4bdb95
Compare
|
Rebased on the current dev branch (e9bbc1b), and resolved merge conflict following precompiled header updates in d67846f. I made one other minor adjustment here to make the C++ definition to control the Embree version |
|
/AzurePipelines run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
b4bdb95 to
eea6b32
Compare
|
Rebased on the current dev branch (823057d), and bumped Embree to the new latest version (4.4.0). |
|
/AzurePipelines run |
eea6b32 to
560c88f
Compare
560c88f to
d97bbb5
Compare
… building Embree This ensures that slash characters are properly escaped on Windows.
This supports upgrading Embree to a major version 4 release, so it includes handling for the change in file paths between "embree3" and "embree4" and also accounts for a small change in API in version 4. RTCIntersectContext was renamed to RTCRayQueryContext, but it was also made part of the optional RTCIntersectArguments parameter to rtcIntersect and rtcOccluded functions. Since the context is not used by hdEmbree, it no longer needs to be provided.
… GitHub organization
The new --embree-major-version option can be given to build_usd.py to select between Embree 3 or Embree 4. By default, Embree 3 is still used, preserving the existing behavior.
…ound The TBB header that provides version definitions moved between TBB (tbb_stddef.h) and oneTBB (version.h), so we use the lowest level header that is available at the same path in both and let it bring in the definitions. This allows the hdEmbree plugin to be built with oneTBB when used in combination with Embree 4.
… 4.x or later is selected
d97bbb5 to
a464dc5
Compare
|
Merged and should make it out in 25.11. Thanks so much for keeping this updated and being patient; for a pretty trivial code change this one was super tricky to land :D. |
That's awesome, thanks so much @tcauchois! Hope this ended up being more helpful than headache. :) |
|
Yeah, for sure! Turns out Embree 3 is incompatible with OneTBB, which is a compelling argument for finally upgrading. |
These changes allow building USD and the `hdEmbree` plugin against the [4.0.0 version of Embree](https://github.com/embree/embree/releases/tag/v4.0.0). The upgrade from 3.x to 4.x of Embree involves a filename change of headers and libraries (`embree3` -> `embree4`), the renaming of the header file that contains the version information from `rtcore_version.h` to `rtcore_config.h`, and for the usage in `hdEmbree`, no longer providing an (unused) context to the `rtcIntersect1()` and `rtcOccluded1()` functions. See the notes for more detail on upgrading from Embree 4 to Embree 4 here: https://github.com/RenderKit/embree/tree/v4.0.0?tab=readme-ov-file#upgrading-from-embree-3-to-embree-4 Closes PixarAnimationStudios#2266 Closes PixarAnimationStudios#2313 (Internal change: 2373054)
Hello!
Description of Change(s)
These changes allow building USD and the
hdEmbreeplugin against the recently released 4.0.0 version of Embree. The upgrade from 3.x to 4.x of Embree involves a filename change of headers and libraries (embree3->embree4), the renaming of the header file that contains the version information fromrtcore_version.htortcore_config.h, and for the usage inhdEmbree, no longer providing an (unused) context to thertcIntersect1()andrtcOccluded1()functions. See the notes for more detail on upgrading from Embree 4 to Embree 4 here:https://github.com/RenderKit/embree/tree/v4.0.0?tab=readme-ov-file#upgrading-from-embree-3-to-embree-4
The last change in mattyjams@98b171a isn't strictly necessary and may be overkill since there isn't really a precedent for being able to choose versions of dependencies from the command-line, so I wouldn't mind if that change needed to be culled. It does provide an easy way to select Embree 4 rather than Embree 3 though, so I included it in case it might be useful for others.
Many of the imaging tests still appear to be disabled by default on Windows which is the platform I'm currently on, so I have not been able to verify them, though the rest of the test suite passes. Manual testing in
usdviewhas been successful so far as well.