-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
embree: Update to 4.3.1 #88783
embree: Update to 4.3.1 #88783
Conversation
For reference, the config files that Godot gets from running
|
Now that I think about it, maybe a better way of going about this would be to just pull them from upstream, move them into their correct positions in the file tree and apply changes through git diffs.. Waiting for someone to weigh their opinions on this. |
Pulled the PR for this and compiled it, tried running https://github.com/godotengine/godot-demo-projects/tree/master/3d/occlusion_culling_mesh_lod with it. Worked perfectly so far as I can tell. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me!
thirdparty/embree/patches/godot-changes-noexcept-the-sequel.patch
Outdated
Show resolved
Hide resolved
That might be a good way to highlight what changes we actually make to the default config yeah. |
Might be a bit finicky, so you can wait until my PR has been merged :) Hopefully it can be merged quickly and we can move forward with this one |
eab81f1
to
b4dcfa6
Compare
There, please rebase :) |
Done-and-done 😎 |
You merged into it instead of rebasing it seems, please do:
|
You first need to update your master branch to match the upstream, your branch is now behind and doesn't include the fix Edit: Seems it works anyway by using the main branch even if yours doesn't include it, so it's fine |
Checked out the same example project as @Angular-Angel, everything seems to be working as expected:
There appears to be some instability far off in the distance, but that might've already been present with Embree 3 and is not to blame on the update (needs confirmation): |
That would be worth testing with 4.3-dev5 to confirm it's not a regression. |
Tested with |
The instability is likely fixed by #86121. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Careful review of the comment thread suggests that the embree upgrade works and that the instability is gone.
Pair with #86121
Thanks! |
This PR causes a performance regression as seen in the demo project when run at a low resolution (
I tested this on a Linux editor build with Should we report it upstream? I'm not sure how to create a minimal project for Embree developers to take a look at. PC specifications
|
Is the regression only present at a low resolution? |
It's more noticeable at low resolutions, because rendering at a low resolution avoids being GPU-bound. |
Unless going from void RaycastOcclusionCull::Scenario::_raycast(uint32_t p_idx, const RaycastThreadData *p_raycast_data) const {
RTCIntersectContext ctx;
rtcInitIntersectContext(&ctx);
ctx.flags = RTC_INTERSECT_CONTEXT_FLAG_COHERENT;
rtcIntersect16((const int *)&p_raycast_data->masks[p_idx * TILE_RAYS], ebr_scene[current_scene_idx], &ctx, &p_raycast_data->rays[p_idx]);
} to void RaycastOcclusionCull::Scenario::_raycast(uint32_t p_idx, const RaycastThreadData *p_raycast_data) const {
RTCRayQueryContext context;
rtcInitRayQueryContext(&context);
RTCIntersectArguments args;
rtcInitIntersectArguments(&args);
args.flags = RTC_RAY_QUERY_FLAG_COHERENT;
args.context = &context;
rtcIntersect16((const int *)&p_raycast_data->masks[p_idx * TILE_RAYS], ebr_scene[current_scene_idx], &p_raycast_data->rays[p_idx], &args);
} could be the cause of regression, I feel like it's gotta be upstream because there are no more Godot-side changes. The changes above were required due to Embree 4's new API; two more source files had to go through similar updates. |
Fixes #78332.
https://github.com/embree/embree/releases/tag/v4.3.1
That was a big one, I'm gonna leave commits be for now for that extra development info, if everything seems A-OK, I'll push a rebase.
I'd like to ask for an extra careful review of config files - I did the update and resolved any encountered issues, so everything compiles just fine on my end, but I haven't riffled through Godot's codebase for how the lib is used, so maybe certain
#define
s should be uncommented.Important info about moving from version 3 to version 4 of the embree library can be found here: