Commit Graph

21 Commits

Author SHA1 Message Date
refractionpcsx2 fd4a5acc40 MTVU: Try to make T-Bit more reliable.
Add MTVUSpeedHack option to GameDB so it can be forcefully disabled
2022-03-11 10:25:15 +00:00
TellowKrinkle f7476dfb63 Core: Replace alignment macros with alignas 2021-11-14 13:52:20 -06:00
refractionpcsx2 24e73b3134
Savestates: Add missing things from Savestates (#4917)
Savestates: Add missing variables from Savestates
2021-10-20 10:41:50 +01:00
refractionpcsx2 c77e0a3a56 microVU: Enable T-Bit to work with MTVU 2021-07-05 10:26:50 +01:00
TellowKrinkle 3c2f7983a5 MTVU: Cleaned up GS SIGNAL/LABEL/FINISH communication 2020-12-28 02:12:52 -06:00
refractionpcsx2 d78de3237c MTVU: Redesign of how to handle signals, seems more reliable
Added new variables to savestates
2020-12-24 09:03:45 +00:00
refractionpcsx2 3f4bb44310 MTVU: Improve compatibility with games that do GS SIGNAL/LABEL/FINISH 2020-12-24 09:03:45 +00:00
Gregory Hainaut 2ff43f2ed8 core: remove throw specifier on destructor
It is the 'default' on C++11
2017-05-13 10:38:35 +02:00
Gregory Hainaut fff5230631 MTVU: redo properly atomic management around the MTVU ring buffer
The ring buffer is composed of severals read/write by transaction.

Atomic operations are only required at the start/end of the full
transaction. In the middle, you can use normal variable (optimization
opportunity for the compiler)

Use acquire/release semantics on isBusy and vuCycles to remain 100% safe
(relaxed might be doable but better be safe than sorry)

Use dedicated cache line for atomic variable to avoid any conflict between CPU
2017-01-18 19:10:47 +01:00
Gregory Hainaut 567976e822 MTVU: port vuCycles to std::atomic
V2: use relaxed order as the variable doesn't carry load/store dependency
It is only used as a counter for the speed hack
2016-07-14 18:29:41 +02:00
Gregory Hainaut 3f0655c821 MTVU: port write pointer to atomic and optimize atomic access
Write pointer can be relaxed-read from the EE thread
Read pointer can be relaxed-read from the VU thread

Warning: AtomicExchange calls were replaced by release-store
However AtomicExchange generates a memory barrier (at least on linux)
So either it is useless and it will be faster, or it will explode ;)
2016-07-14 18:29:41 +02:00
Gregory Hainaut ca46921796 MTVU: use acquire/release semantics for atomic operation
* Avoid the generation of memory barrier (mfence)
* Based on the fact that it used to work on previous code without any
  barrier

v2:
* keep basic code in reset path
* use relaxed access for isBusy. The variable doesn't carry load/store
  dependency but is instead an hint to optimize semaphore post
2016-07-14 18:29:40 +02:00
Gregory Hainaut ca8955daf3 MTVU: port ScopedLockBool to std::atomic 2016-02-28 15:29:31 +01:00
Gregory Hainaut 3a4787dd98 MTVU: partially port code to MTVU
Remains volatize as MTGS and the ScopedLockBool stuff
2016-02-28 15:29:31 +01:00
Miguel A. Colón Vélez 6462393aaf Introduce end-of-line normalization
Signed-off-by: Gregory Hainaut <gregory.hainaut@gmail.com>
2015-08-04 23:52:48 +02:00
Gregory Hainaut 4d6d5c870c pcsx2: remove useless volatile
Volatile is only useful as argument not the returned value
2014-05-03 10:18:26 +02:00
Gregory Hainaut 88f4d1e3a7 pcsx2: sign compare mismatch 1/3 2014-05-03 10:18:26 +02:00
gregory.hainaut 72d47d547e copyright:
* update missing copyright on
 + plugins/GSdx/config.h
 + pcsx2/MTVU.h
 + plugins/zzogl-pg/opengl/ZZHacks.h
 + plugins/spu2-x/src/DplIIdecoder.cpp
* put a copyright for trivial script file
 + pcsx2/gui/Resources/rebuild.sh
 + tools/bin2app.sh
 + plugins/zzogl-pg/opengl/shaders.sh
* remove autotool from zzogl
* apply the patch for issue 1257. Thanks very much Micove for the hard work.




git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5154 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-12 06:30:35 +00:00
sudonim1@gmail.com 20b0627e8e MTVU: Move code out of header.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5144 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-06 11:34:02 +00:00
gabest11 da7324dbf2 Not transferring unused vif registers to the MTVU thread can save at least half of the ring buffer space. The whole set is about 400 bytes, including padding, but I could find references to only 6 regs.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5092 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-02-10 07:03:55 +00:00
cottonvibes ac9bf45f98 pcsx2: Implemented Threaded VU1 :D
Threading VU1 took a lot of rewrites and new code to make possible (MTGS, microVU, gifUnit...), but we finally got to the point where it was feasible, and now we've done it! (so now everyone can stop complaining that pcsx2 only takes advantages of 2 cores :p).

The speedups in the games that benefit from it are great if you have a cpu with 3+ cores (generally a 10~45% speedup), however games that are GS limited can be a slowdown (especially on dual core cpu's).

The option can be found in the speedhacks section as "MTVU (Multi-Threaded microVU1)". And when enabled it should should show the VU thread-time percentage on the title bar window (Like we currently do for EE/GS/UI threads).

It is listed as a speedhack because in order for threading VU1 to have been a speedup, we need to assume that games will not send gif packets containing Signal/Finish/Label commands from path 1 (vu1's xgkick). The good news is very-few games ever do this, so the compatibility of MTVU is very high (a game that does do this will likely hang).

Note: vs2010 builds and Linux builds need to be updated to include "MTVU.h" and "MTVU.cpp".


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4865 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-12 02:31:49 +00:00