Skip to content
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

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

mattyjams
Copy link
Contributor

Hello!

Description of Change(s)

These changes allow building USD and the hdEmbree plugin 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 from rtcore_version.h to rtcore_config.h, and for the usage in hdEmbree, the removal of the RTCIntersectContext type.

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 usdview has been successful so far as well.

  • [ X ] I have verified that all unit tests pass with the proposed changes
  • [ X ] I have submitted a signed Contributor License Agreement

@tallytalwar
Copy link
Contributor

Filed as internal issue #USD-8057

@mattyjams
Copy link
Contributor Author

Just noticing that @musicinmybrain covered roughly the same ground in #2266, so apologies for the duplicate! The changes here though allow building against either embree3 or embree4 as well as the ability to choose the version when using build_usd.py, in case that's of interest.

@mattyjams mattyjams force-pushed the pr/add_support_for_building_with_embree4 branch from 98b171a to e6e707f Compare May 11, 2023 16:19
@mattyjams
Copy link
Contributor Author

Mostly just a rebase on the current dev branch with this most recent push, but I also bumped the version of Embree in the build_usd.py script to 4.0.1 rather than 4.0.0 when major version 4 is requested. But again, happy to have the build_usd.py script changes culled if that's not wanted.

@mattyjams mattyjams force-pushed the pr/add_support_for_building_with_embree4 branch from e6e707f to 28cc1fc Compare January 16, 2024 21:29
@mattyjams
Copy link
Contributor Author

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 --embree-major-version 4 option is used.

johnhaddon pushed a commit to boberfly/dependencies that referenced this pull request Feb 2, 2024
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`.
@mattyjams mattyjams force-pushed the pr/add_support_for_building_with_embree4 branch from 28cc1fc to 9050557 Compare February 25, 2024 21:22
@mattyjams
Copy link
Contributor Author

Updated again to bump the Embree 4 version to the new 4.3.1 release.

@nim65s nim65s mentioned this pull request Mar 25, 2024
13 tasks
@mattyjams mattyjams force-pushed the pr/add_support_for_building_with_embree4 branch from 9050557 to 6a0360a Compare May 20, 2024 20:55
@mattyjams
Copy link
Contributor Author

Freshening with a rebase on the current dev branch (35dbce1).

@mattyjams mattyjams force-pushed the pr/add_support_for_building_with_embree4 branch from 6a0360a to 90dc0f2 Compare June 4, 2024 18:30
@mattyjams
Copy link
Contributor Author

Rebased to resolve merge conflict following precompiler header updates in 5000b45.

@mattyjams mattyjams force-pushed the pr/add_support_for_building_with_embree4 branch from 90dc0f2 to 04f899e Compare June 14, 2024 14:20
@mattyjams
Copy link
Contributor Author

Rebased on the current dev branch (9562005), and bumped Embree to the new latest version (4.3.2).

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mattyjams mattyjams force-pushed the pr/add_support_for_building_with_embree4 branch from 04f899e to 0ec76f5 Compare July 24, 2024 15:48
@mattyjams
Copy link
Contributor Author

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 build_usd.py was added. Commit 0ec76f5 adjusts the restriction to allow building with oneTBB and Embree if a 4.x version of Embree is selected (using --embree-major-version 4).

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mattyjams mattyjams force-pushed the pr/add_support_for_building_with_embree4 branch from 0ec76f5 to 90ef24e Compare October 3, 2024 14:40
@mattyjams
Copy link
Contributor Author

mattyjams commented Oct 3, 2024

Rebased to resolve merge conflict following precompiled header updates in 9bf2e14.

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

… 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 where RTCIntersectContext was
removed.
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.
@mattyjams mattyjams force-pushed the pr/add_support_for_building_with_embree4 branch from 90ef24e to 079ac9f Compare January 6, 2025 14:46
@mattyjams
Copy link
Contributor Author

Freshening with a rebase on the current dev branch (b787c84).

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants