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

move rig and morph update in update thread #2445

Closed
wants to merge 6 commits into from

Conversation

mp3butcher
Copy link
Contributor

@mp3butcher mp3butcher commented Jul 9, 2019

cleaner for stats

@mp3butcher mp3butcher changed the title move rig update in update thread move rig and morph update in update thread Jul 9, 2019
@akortunov
Copy link
Collaborator

akortunov commented Jul 9, 2019

I do not understand what you try to achieve. From what I can tell, OpenMW performs both Update and Cull in the main thread (you can see it in the profiler), so moving rigs processing from Cull to Update does not improve situation at all. Also a separate mutex for EVERY rig in scene seems to be an overkill for me (mutex is a quite slow thing).

As about FPS: this PR drops FPS from 95 to 55 for me in testing scene with 10 NPC's. This drop is caused by DYNAMIC data variance in the MorphGeometry (the draw thread basically becomes idle when the main thread is busy).

So in its current state this PR is unusable.

@mp3butcher
Copy link
Contributor Author

sorry was i bit tired doing this pr...i fixed errors
the goal of this pr is to do update in update, it is cleaner for stats

@AnyOldName3
Copy link
Member

We intentionally do this in the cull thread because it means that a fairly time-hungry operation only happens for things that pass culling. This is a very common thing to do in game engines - Unreal doesn't do any skinning without the approval of an occlusion query against the previous frame, for example. We're not going to sacrifice performance just to make the profiler look tidier.

It also means that if we ever implement hardware skinning, it's a simpler task as things aren't shunted around as much.

@mp3butcher
Copy link
Contributor Author

as you like

@mp3butcher mp3butcher closed this Jul 10, 2019
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.

4 participants