Commit Graph

522 Commits

Author SHA1 Message Date
Gregory Hainaut 23d081ab21 common: remove an old gcc workaround 2017-02-01 18:24:51 +01: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 965fccaff0 common: use C++11 version vssappendf
* use std::vector instead of VLA
* remove windows code (optimization is useless here)
2017-02-01 18:24:51 +01:00
Gregory Hainaut 6f9feee759 common: init m_vtune_id 2017-01-22 16:45:49 +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
Jonathan Li 415090d249 common: Avoid wchar_t in pxTextWrapper
wchar_t is 16-bits on Windows, which can't actually properly fit all
Unicode characters.

Use the wx3.0.x wxTextWrapper approach of using iterators that increment
by actual characters to fix the issue, and also switch to using the
std::string style functions in wxString.
2016-12-10 22:30:27 +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 0453e5cad8 cmake: improve vtune integration
Year is included in the path so search in order 2018/2017/2016

Not ideal but at least all logic is inside the FindVtune module
2016-12-09 09:28:19 +01:00
Gregory Hainaut f41bb8db5e common: forget to format common properly
Moral of the story, don't rely on the commit hook when it isn't installed correctly ;)
2016-11-29 22:59:06 +01:00
Gregory Hainaut 310181b97f common: remove a gcc 4.6 hack
Not supported anymore
2016-11-29 22:59:06 +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
Gregory Hainaut 30a5922a0b pcsx2: reduce std padding to 1 for small screen 2016-11-19 21:52:08 +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 9c598fcd01 common: finally spot the text size bug
GetBestWrappedSize (hence the BestSize) computes the size of
the wrapped text based on box side minus padding.

So the width of the widget is already the good size for text wrapping
2016-11-19 11:21:07 +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 1a8825b374 pcsx2|common|gsdx: use empty() instead of .size() ==/!= 0 check
Enhance readability reported by clang tidy
2016-08-21 17:20:13 +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 19ceea4f1e Merge branch 'strict-aliasing' 2016-08-17 18:53:08 +02:00
Gregory Hainaut 2700f06fe7 Merge branch 'pcsx2-verbose-thread-error' 2016-08-14 22:31:28 +02:00
Gregory Hainaut 9d8135cf1c x86emitter: allow strict aliasing optimization 2016-08-14 21:01:40 +02:00
Gregory Hainaut 2cc98191f0 common: allow strict aliasing optimization 2016-08-14 21:01:40 +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
Gregory Hainaut 5ad4cbace7 onepad|common: fix GCC warning type limit 2016-08-12 19:30:14 +02:00
Gregory Hainaut 078577c7c5 common: try to print a nice error message when pthread_create is bad 2016-08-12 10:05:14 +02:00
Jonathan Li ed47dca8a1 x86emitter:windows: Make cpu detection/affinity 64-bit compatible
Use DWORD_PTR since that works on both 32-bit and 64-bit builds. And
remove some empty unused functions.

Fixes a 64-bit compilation issue.
2016-07-24 19:05:18 +01:00
Jonathan Li 768ed80ece utilities:threading:windows: Use intrinsic pause
Fixes a 64-bit compile error.
2016-07-23 02:21:13 +01:00
Gregory Hainaut 7d35e15fea Merge pull request #1444 from PCSX2/atomic-relax
Atomic relax
2016-07-22 18:36:02 +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 812e41d578 common: relax atomic of m_IsBeingDeleted
Avoid the memory fence in the constructor
2016-07-14 18:29:41 +02:00
Akash 72661e7c16 PCSX2-Core: Clean up some warnings on MSVC
x86emitter : Convert variable type from u8 to bool.
recVTLB: Cast "sign" to bool to prevent a warning.
R5900OpcodeImpl: Cast all the values in array to u64 instead of s64.
2016-06-30 16:49:18 +05:30
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
FlatOutPS2 f1ba9c9d6a PCSX2-WX: MainFrame keyboard navigation improvement (#1388)
Adding shortcuts to all the menu options, that only some of the options
in the Config tab already had.

Also update translations so menus are still localised (well, mostly).
2016-06-08 21:48:16 +01:00
Jonathan Li 7aa6564dcc common:freebsd: Fix compilation 2016-05-20 22:32:41 +01:00
Jonathan Li 280ca1dd85 utilities: Add FreeBSD thread name implementation 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
adamantike a0eca54f96 Trivial fix on wxFont style/weight usage 2016-04-24 13:25:56 -03:00
Jonathan Li dda44519c1 pcsx2|utilities: Use non-deprecated wxFont stuff 2016-04-23 13:57:42 +01:00
Gregory Hainaut c44f605b5e x86emitter: gcc 6 compilation fix
Fix #1297
2016-04-18 19:27:06 +02:00
Gregory Hainaut 791a0ce702 common: initialize scalar field of pxThread
CID 147022

v2: initialize all member in initializer list
2016-03-30 19:55:45 +02:00
Gregory Hainaut 37de84d55f x86emitter: initialize scalar field
CID:147038
2016-03-30 19:50:41 +02:00
Gregory Hainaut de24ce0a8f x86emitter: miss comas here 2016-03-28 18:10:39 +02:00
Gregory Hainaut 3d5c1b4ef8 Core|Common: restore old interlocked add/sub behavior
interlocked* returns the new value whereas fetch_add/sub returns the old value.
2016-02-29 21:43:56 +01:00
Gregory Hainaut 610bf8a277 Common: delete most of the deprecated atomic API 2016-02-28 15:29:31 +01:00
Gregory Hainaut 5ca92ecd67 Common: port code to std::atomic 2016-02-28 15:29:31 +01:00
Gregory Hainaut 89fad4d3ad common: port ScopedPtrMT to std::atomic
v2: s/NULL/nullptr/
v3: tentative fix for MSVC
// ScopedPtrMT.h(91, 0): error C2593: 'operator ==' is ambiguous
2016-02-28 15:29:00 +01:00