-
Notifications
You must be signed in to change notification settings - Fork 937
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
Conversation
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. |
as well as mutices
sorry was i bit tired doing this pr...i fixed errors |
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. |
as you like |
cleaner for stats