01-09-2012, 01:44 AM
gamerX1990:
Which CPU do you have? Core2 quad or i7? Please compare games with old and new builds of gsdx, if you find any being significantly slower, I'll try to find that game to see it myself.
To answer your question, why it cannot use everything up to 100%, there are two reasons. If the geometry is complex, the main thread cannot process the incoming data fast enough to feed the drawing threads. Other, when the distribution of the pixels is mainly focusing on one part of the screen, then the threads don't get equal number of tasks and one finish later then the other, making them wait, doing nothing.
Edit:
I made some vtune shots to show how this works. This is from metal gear solid 3's intro, at this place there are 120k vertices, probably the most ever in a ps2 game. On 6 threads it slows down to 23 fps. The top line is the main thread, distributing incoming data to the workers below. Overall it is using 5x cpu time (483% at the selection), there are idle sections when one threads must wait the other, these are unavoidable. In this case workers could reach higher cpu usage if the main was not overloaded, and vica-versa.
[attachment=30763]
[attachment=30764]
Edit2:
Just want to add some fillrate numbers. The real hardware can do 8 textured pixels in one clock and it's running at 150 MHz, that puts the max fillrate at 1200 mpix, which of course can never be achieved, but at about 2/3 fullness it is still 800 mpix. GSdx can do one average complexity pixel in about 20-30 clocks, at 3 GHz that gives about 100 mpix fillrate per thread. As you add more cores, the main thread becomes the bottleneck, currently there is a limit around 400 mpix.
Which CPU do you have? Core2 quad or i7? Please compare games with old and new builds of gsdx, if you find any being significantly slower, I'll try to find that game to see it myself.
To answer your question, why it cannot use everything up to 100%, there are two reasons. If the geometry is complex, the main thread cannot process the incoming data fast enough to feed the drawing threads. Other, when the distribution of the pixels is mainly focusing on one part of the screen, then the threads don't get equal number of tasks and one finish later then the other, making them wait, doing nothing.
Edit:
I made some vtune shots to show how this works. This is from metal gear solid 3's intro, at this place there are 120k vertices, probably the most ever in a ps2 game. On 6 threads it slows down to 23 fps. The top line is the main thread, distributing incoming data to the workers below. Overall it is using 5x cpu time (483% at the selection), there are idle sections when one threads must wait the other, these are unavoidable. In this case workers could reach higher cpu usage if the main was not overloaded, and vica-versa.
[attachment=30763]
[attachment=30764]
Edit2:
Just want to add some fillrate numbers. The real hardware can do 8 textured pixels in one clock and it's running at 150 MHz, that puts the max fillrate at 1200 mpix, which of course can never be achieved, but at about 2/3 fullness it is still 800 mpix. GSdx can do one average complexity pixel in about 20-30 clocks, at 3 GHz that gives about 100 mpix fillrate per thread. As you add more cores, the main thread becomes the bottleneck, currently there is a limit around 400 mpix.