Commit Graph

648 Commits

Author SHA1 Message Date
Gregory Hainaut 36fd2b6854 gsdx: remove the unused GSsetFrameLimit API 2017-07-02 15:09:47 +02:00
Gregory Hainaut 02861fabc8 pcsx2|common: replace throw() by noexcept 2017-05-13 10:38:35 +02:00
Gregory Hainaut 1a9a65d4d0 common: use = default instead of trivial destructor
Strangely clang-tidy didn't report them.

Commit was done with a sed to it need careful review.
2017-05-13 10:38:35 +02:00
Gregory Hainaut b951e24024 common: remove throw specifier on destructor
By default in C++11 destructors are noexcept.
Besides throw is deprecated
2017-05-13 10:38:35 +02:00
Gregory Hainaut 94b50b85e7 core: use = default instead of trivial copy constructor 2017-05-13 10:38:35 +02:00
Gregory Hainaut 9e101c9ef0 common: use = default instead of trivial constructor/destructor
reported by clang-tidy

Note: drop throw() specifier as it is the 'default' in C++11 for
destructor
2017-05-13 10:38:35 +02:00
Gregory Hainaut 756176118b common: add make_unique for C++11
v2: fix windows compilation
v3: fix copyright date
2017-05-03 12:03:38 +02:00
Gregory Hainaut a378e307b3 common: drop pthread TLS emulation
thread_local is supported by all C++11 compliant compiler

Keep a way to disable TLS for shared object to avoid issue of DTV
slot shortage.
2017-04-14 17:18:20 +02:00
KousukeItsagame 11aebe465f common: Replace __threadlocal with C++11 thread_local 2017-04-13 19:59:00 +02:00
Gregory Hainaut 6d7b1f9dbd common: move ssappendf in DisR59000asm.cpp
Legacy function to print EE opcode. It doesn't worth an extra file.
2017-02-01 18:24:51 +01:00
Gregory Hainaut bccc3ef253 Merge pull request #1770 from np511/gcc-cleanup
Cleanup GCC warnings - still needs some work
2017-01-30 15:28:33 +01:00
np511 de6216b37b Remove warnings about ISO C++11 conformance 2017-01-29 09:06:10 -05:00
Gregory Hainaut e3d1871f86 MTVU: small thread scheduling improvement
* Use yield to avoid a spin loop during WAIT
* Don't flush the full buffer when we miss space
2017-01-18 19:11:10 +01:00
Jason Brown fce2814735 Added callbacks for OSD Log and Monitor. Added wrappers in PCSX2 main for callbacks. Added some basic info calls (e.g. Saving loading FPS) 2017-01-03 10:43:56 +01:00
Gregory Hainaut 632b4971de common: remove memset duplicates
Use standard memset instead of memset_8

Move memzero/memset8 in a common OS file.
2016-12-16 20:45:22 +01:00
Akash b86518ef24 CDVD: Convert CDVD_SourceType into enum class
* Add a template function for underlying type conversions of enumerations
2016-12-10 12:35:57 +00:00
Gregory Hainaut 031b6e6372 common: improve vtune merge support
Mapping the full buffer is killer on Vtune (either crash or requires a huge processing time).
Instead keep the same ID for code in the same buffers.

I think all buffers are correctly mapped now but I still miss the frame pointer
for VU code.
2016-12-09 09:28:19 +01:00
Gregory Hainaut b9369e7c00 pcsx2: remove the reserve feature of recompiler memory
Cons:
* requires ~180MB of physical memory (virtual memory is the same so it
  doesn't impact the 4GB limit)

From steam: 98.81% got at least 2GB of RAM. 83.62% got at least 4GB of RAM.
That being said, it might not really increase RAM requirements as OS could put the
new allocation in the swap.

Pro:
* code is much easier
* remove at least half of the signal listener
* last but not least, it is way easier for profiler/debugger
2016-12-09 09:28:19 +01:00
Gregory Hainaut c9db1c6c4b vtune: plug PCSX2 core + add missing profiling (VU/VIF/TLB)
Doesn't fully work yet
* Unknown stack frame
* Outside any known module

Potential root cause:
* Nvidia driver
* VU code as ebp is required for emulation so likely no frame
2016-11-28 19:07:04 +01:00
Jonathan Li 008fea5d89 common|cdvdgigaherz: Fix API sign mismatch
The typedef and function declaration don't quite match.
2016-11-22 21:26:41 +01:00
Gregory Hainaut 0e2ec9c2cb pcsx2 gui: reduce the padding to 2 for low cost display 2016-11-19 11:27:20 +01:00
Gregory Hainaut 4ee942aba2 pcsx2 gui: use pxGetFixedFont helper instead of wxFont constructor 2016-11-19 11:19:24 +01:00
Clang Format 1fba5cb580 reformat main common directory
Disable some reformat around emitter registers declaration and a massive cases.
2016-11-12 16:52:49 +01:00
Gregory Hainaut b282909c9e common: avoid silly compiler warning due to define redefinition
comma was updated in plugings (due to clang reformat)
2016-09-08 19:20:24 +02:00
Jonathan Li c9a1097579 console: Remove buffered and wxerror console writers
Both haven't been used for a long time, and don't seem to hold any
advantages over the default stdout console writer.
2016-08-17 22:07:42 +01:00
Gregory Hainaut bf0e5dc5bd Merge pull request #1516 from PCSX2/emitter-manual-void-cast
pcsx2: manually cast function pointer to void*
2016-08-17 18:56:55 +02:00
Gregory Hainaut cc68776069 pcsx2: manually cast function pointer to void*
Templace is nicer but give a hard time to compiler.

New version compile in both gcc&clang without hack

v2: add an uptr cast too for VS2013 sigh...
v3: use an ugly function pointer cast to please VS2013
2016-08-17 09:53:30 +02:00
Gregory Hainaut 44bbdbe49d common: use free directly instead of an Alloc(0)
Easier to understand the intent. And avoid false positive in coverity
2016-08-15 15:51:22 +02:00
Gregory Hainaut e8e66ec4b5 x86emitter: use memcpy to avoid aliasing issue
Code is only called once anyway.
2016-08-14 20:48:45 +02:00
Jonathan Li ac7e7a79c3 utilities:windows: Remove memset32 assembly
It's unused, and it doesn't compile in 64 bits.
2016-07-23 02:21:21 +01:00
Gregory Hainaut 5cf2688c0c common: remove useless x86_intrin.h
Yeah one less licence in the project :)
2016-07-22 18:47:51 +02:00
Gregory Hainaut 7d35e15fea Merge pull request #1444 from PCSX2/atomic-relax
Atomic relax
2016-07-22 18:36:02 +02:00
Lena 5a17b95901 x86_intrin.h: fix build using GCC (#1468)
__GNUG__ is not defined while compiling this file,
this causes the build to fail.

Replacing this with __GNUC__ fixes this.
2016-07-19 23:13:24 +01:00
Gregory Hainaut 6e306ee44f common: move _xgetbv with cpuid intrin
Besides, code comes from Gabest and not reactOS
2016-07-17 10:25:00 +02:00
Gregory Hainaut e872552fdc spu2x|common: s/jASSUME/pxAssume/ allow to remove code and __debugbreak intrinsic 2016-07-17 10:24:29 +02:00
Gregory Hainaut c56ca4a0fa common: include cpuid.h on unix
I tested both clang and gcc.
2016-07-17 10:24:29 +02:00
Gregory Hainaut 10ea05bc6f common: remove old atomic wrapper
Use cross-platform std::atomic instead
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
Jonathan Li 79d019b5bb utilities: Don't use TLS buffers in FastFormatString classes (#1430)
The TLS buffers used by the FastFormatUnicode and FastFormatAscii
classes seem to be responsible for PCSX2 not terminating properly on
Windows under certain conditions (using MTVU before commit
1111e03901, using CDVDgigaherz without a
disc, possibly other conditions).

When PCSX2 shut downs and the FastFormatBuffers are being cleaned up,
the call to pthread_key_delete() would end up calling
WaitForSingleObject(e, INFINITE) and waiting indefinitely for an event
to trigger. It never does get triggered (for reasons unknown) and
therefore PCSX2 doesn't terminate properly.

Remove the usage of TLS buffers in the FastFormatString classes - it
fixes the termination issue on Windows and doesn't seem to have much
effect on performance.
2016-06-29 13:13:51 +01:00
Jonathan Li 3904c67e6e utilities: Use Bind instead of Connect 2016-06-17 00:03:58 +01:00
Jonathan Li c10728319b utilities: Use Bind compatible event declarations/definitions 2016-06-16 23:49:34 +01:00
Jonathan Li 7c205d7a1e windows: Don't use __declspec(dllexport) for plugin exports
Using __declspec(dllexport) causes duplicate export warnings to be
generated when compiling 64-bit builds. Name mangling also occurs on
functions that are exported this way, so it doesn't actually work with
the plugin system, which uses unmangled names.

The module definition file exports the functions without name mangling
and is sufficient on its own.
2016-06-05 22:57:42 +01:00
Jonathan Li 5f6658ae9a common:freebsd: Kill some warnings 2016-05-20 22:32:41 +01:00
Jonathan Li 7aa6564dcc common:freebsd: Fix compilation 2016-05-20 22:32:41 +01:00
Jonathan Li f78d1a4018 utilities: Remove wx2.8 code and uses of wxMAJOR_VERSION 2016-04-29 00:09:47 +01:00
Jonathan Li 5035c8bd48 utilities: always include wx/crt.h on Linux
The header is necessary if the wx3.0 package isn't compiled with
wx2.8 backwards compatibility.
2016-04-23 13:57:47 +01:00
Jonathan Li dda44519c1 pcsx2|utilities: Use non-deprecated wxFont stuff 2016-04-23 13:57:42 +01:00
Jonathan Li 0ab7b6340d Merge pull request #1275 from AdmiralCurtiss/memcard-plugin-switch-filter-reset
Move folder memcard filter management into the actual folder memcard class to fix #1179 and similar.
2016-04-06 23:59:36 +01:00
Gregory Hainaut 8ee9295f39 x86emitter: increase size of union capabilities 2016-04-04 21:04:41 +02:00
Gregory Hainaut ee08a6fc53 Merge pull request #1270 from PCSX2/monolithic-build
Monolithic build
2016-04-03 11:20:07 +02:00