http://bugs.winehq.org/show_bug.cgi?id=11674
--- Comment #140 from Ema ema.oriani@gmail.com 2011-11-02 14:26:07 CDT --- What we experience in SC2 (which imho should be _very_ similar) is that there's one rendering thread, but we have a huge amount of wait time/active Sleep/SleepEx calls on a lot of threads and many context switches. I think Linux scheduler then gets in the way trying to load balancing the CPUs. I have 4 cores and paradoxically when I force the affinity of SC2.exe to _one_ core only the FPS gets boosted by +100% (from 25 FPS to 50+ FPS). My guess is that the huge context switching introduced by the fact we have to protect from calls from multiple threads (i.e. ENTER_GL/LEAVE_GL) is _heavy_ on Direct3D rendering. Having only one thread serializing calls will make the life easier and a lot less context switches. Now this patch, if understand correctly, implements synchronisation via pipes (or better lets the OS to deal with that), but there might be better ways of doing this.
Anyway if having this rendering thread proves to be very beneficial then we should ask wine core developers to perhaps take a look at that?
Cheers