04-11-2010, 02:13 PM
Where's the "No it can't be done" option?
I actually did most of my VU1 and IOP threading tests several months ago, and unfortunately both failed. The IOP one was the more successful of the two, which is good that there was some success at all, but unfortunate since the IOP is a very very small part of PCSX2 overhead.
Trying to thread the VU1 was a complete failure. Too many games just use the VU1 as a batch processor, sending a series of programs in sequence. The entire thing is part of a VIF packet system, which itself would need to be threaded. The packet system is a DMA process, however, which means it needs to update several state vars that the EE can read/modify in parallel. Games are also notoriously bad about sending these DMAs in all manner of split formats, so the VIF packet processor might still just end up sitting around waiting for the EE to send it the next bit of crap.
Bottom line: even if all the uber-increased code complexity pans out, the net gains would be minimal. 2-5% faster perhaps; possibly slower for problematic games. That sucks when you consider the headaches of making it work, and the fact that it would likely never be as accurate or stable as a single-threaded approach used now.
I actually did most of my VU1 and IOP threading tests several months ago, and unfortunately both failed. The IOP one was the more successful of the two, which is good that there was some success at all, but unfortunate since the IOP is a very very small part of PCSX2 overhead.
Trying to thread the VU1 was a complete failure. Too many games just use the VU1 as a batch processor, sending a series of programs in sequence. The entire thing is part of a VIF packet system, which itself would need to be threaded. The packet system is a DMA process, however, which means it needs to update several state vars that the EE can read/modify in parallel. Games are also notoriously bad about sending these DMAs in all manner of split formats, so the VIF packet processor might still just end up sitting around waiting for the EE to send it the next bit of crap.
Bottom line: even if all the uber-increased code complexity pans out, the net gains would be minimal. 2-5% faster perhaps; possibly slower for problematic games. That sucks when you consider the headaches of making it work, and the fact that it would likely never be as accurate or stable as a single-threaded approach used now.
Jake Stine (Air) - Programmer - PCSX2 Dev Team