http://bugs.winehq.org/show_bug.cgi?id=21165
--- Comment #14 from Stefan Reich winehq@halbling.de 2010-02-17 13:23:45 --- (in reply to comment #12)
(In reply to comment #11)
... No idea why borderlands doesn't use multicore in wine :-/
It might be that Wine doesn't support SetThreadIdealProcessor yet. I've seen that show up in the log for a lot of games, though I cannot remember if Borderlands is one of them.
Well, I did some more code reading, testing and adding debug output...
Borderlands doesn't seem to call SetThreadIdealProcessor, but it does something (incredibly stupid?) with SetThreadAffinityMask:
fixme:thread:SetThreadAffinityMask (0xfffffffe,0x1): stub fixme:thread:SetThreadAffinityMask (0xfffffffe,0x2): stub fixme:thread:SetThreadAffinityMask (0xfffffffe,0x4): stub fixme:thread:SetThreadAffinityMask (0xfffffffe,0x8): stub fixme:thread:SetThreadAffinityMask (0xfffffffe,0x1): stub fixme:thread:SetThreadAffinityMask (0xfffffffe,0x1): stub fixme:thread:SetThreadAffinityMask (0xfffffffe,0x1): stub fixme:thread:SetThreadAffinityMask (0xfffffffe,0x1): stub fixme:thread:SetThreadAffinityMask (0xfffffffe,0xffffffff): stub fixme:thread:SetThreadAffinityMask (0x1bc,0xffffffff): stub fixme:thread:SetThreadAffinityMask (0x458,0xffffffff): stub fixme:thread:SetThreadAffinityMask (0x464,0xffffffff): stub ...[more 0xff sets]
As can be deduced from the debug output, I simply 'deactivated' the affinity mask for the time being...and what happen? --> Got 40/70/40/40 CPU usage and 30-40 fps, which is actually quite playable.