Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!






Ye olde code tippes

Posted by Aph3x, 07 December 2007 · 175 views

Just found out a useful little fact.
When using the performance timer on multicore PC's you can get strange results if the timer thread gets swapped between CPU's. There are patches to fix this, but not everyone has them applied, leading to strange game behaviour or games not working on multicore CPUs.
The (recommended) solution is to use the windows SetThreadAffinityMask function to try and keep the thread running on the same cpu.




Well Yes and No to this one. There is an issue caused by using RDTSC directly on multi-core machines but simply forcing everything to use a single processor isn't a graceful way of handling it. This is generally the fix used for games which were designed for singlecore machines, I've used it to get Battlefield:1942 running for example.

Ah, I just realised that your actually talking about the solution proposed in this following article of generating time deltas in a main thread which is bound to one of the cores.

http://msdn2.microsoft.com/en-us/library/bb173458.aspx

Doh, ignore the first part :)

Andy
Ah, thanks for the link :)
...although the frequency information on that page seems to contradict itself somewhat?

May 2015 »

S M T W T F S
     12
3456789
10111213141516
1718192021 22 23
24252627282930
31      

Recent Entries

Recent Comments

Recent Entries

Recent Comments

Latest Visitors

PARTNERS