Commit Graph

8511 Commits

Author SHA1 Message Date
Gregory Hainaut 1e3c46a6bb gsdx ogl: purge debug message in destructor
Allow to see latest error and avoid noise in Valgrind log
2016-07-21 09:51:16 +02:00
Gregory Hainaut b6a55f50ab gsdx ogl: fully initialise PSConstantBuffer structure 2016-07-21 09:51:16 +02:00
Gregory Hainaut b322ef286e CDVD: initialize a temporary buffer
I'm not sure to understand why Valgrind reports it as we populate the buffer
during the ReadAsync. Maybe Valgrind doesn't like async IO from the kernel.

In doubt, the init will avoid those warnings

==19897== Thread 6 EE Core:
==19897== Conditional jump or move depends on uninitialised value(s)
==19897==    at 0x80FE9E1: BlockdumpFileReader::DetectBlockdump(AsyncFileReader*) (BlockdumpFileReader.cpp:40)
==19897==    by 0x8109EE5: InputIsoFile::Open(wxString const&, bool) (InputIsoFile.cpp:229)
==19897==    by 0x810939E: ISOopen(char const*) (CDVDisoReader.cpp:57)
==19897==    by 0x810194E: DoCDVDopen() (CDVDaccess.cpp:359)
==19897==    by 0x80B651C: SysCorePlugins::OpenPlugin_CDVD() (PluginManager.cpp:1219)
2016-07-21 09:51:16 +02:00
Gregory Hainaut 3c0a97354c pcsx2:linux: leaking allocation isn't necessary 2016-07-21 09:51:15 +02:00
Gregory Hainaut 8b91aefd49 gui: add a destructor to CtrlRegisterList object
So we can free allocated memory
2016-07-21 09:51:15 +02:00
Gregory Hainaut 11e5fe8879 pcsx2 gui: fix a pseudo memory leak on SavestateEntryPack
It is a pseudo leak as it is a global object. Nevertheless it pollutes
the valgrind log.

v2:
* use an array of unique pointer
* use ArraySize instead of a constant
2016-07-21 09:50:28 +02:00
Gregory Hainaut e680a90e90 Merge branch 'intrinsic-cleanup' 2016-07-17 11:33:06 +02: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 f9ebc0ba70 Merge pull request #1459 from frantisekz/master
Degrade GTK3 Fatal Error to Warning
2016-07-15 09:35:36 +02:00
Gregory Hainaut 25bc2dff07 gsdx: dump and log EE texture read
It gives a visual opportunity to detect a bad read of the texture cache
2016-07-14 19:45:06 +02:00
Gregory Hainaut d855bc5ca8 gsdx sw: improve exit condition of SW extra thread
Use a relaxed atomic to read the exit variable in the hot path

Wait that exit is deasserted in the destructor, so we are sure the
thread will "soon" return
2016-07-14 18:29:22 +02:00
Gregory Hainaut abc9f7d096 gsdx tc: log unsupported LookupDepthSource 2016-07-14 18:29:22 +02:00
František Zatloukal 2c74ff1e54 Degrade GTK3 Fatal Error to Warning 2016-07-13 02:08:14 +02:00
ramapcsx2 093704f073 Merge pull request #1456 from NZJenkins/master
Zero out the skip bp
2016-07-12 12:15:09 +02:00
NZJenkins b491f5cdc5 Zero out the skip bp
Fixes #1453
2016-07-12 17:51:56 +12:00
Gregory Hainaut 91eccb7bab gsdx sw: increase the size of the ring buffer 256 => 65536
memory overhead by thead is only 256KB

However it will reduce the probability to block the push thread to nearly 0

I tested a couple of dumps and only manage 4000 element with 1 extrathread.
2016-07-10 10:49:06 +02:00
Gregory Hainaut 85fb55a0e1 gsdx ogl: memory management take 3
Add a factor 2 on the VRAM to get the quantity of available memory for the textures.
The driver is allowed to put some textures in RAM. Of course it is bad for performance
but it won't crash.

Due to the 4GB by process limit, I keep a (reasonable) maximum of 3.8GB.

In order to avoid a crash when memory is too low an exception will be risen
with no guarantee on rendering and big performance impact. In this situation
you ought to reduce upscaling/disable large framebuffer.
2016-07-10 10:23:23 +02:00
Gregory Hainaut a37cd40ce3 gsdx ogl: only print an error when VRAM is low
Until a better solution is found or people buy better GPU :)
2016-07-09 11:43:28 +02:00
Gregory Hainaut a2086ed458 gsdx profiler: drop latest frame time
Value is out of the chart. I'm not even sure it is a real frame so let's just remove it.
2016-07-09 10:03:21 +02:00
Gregory Hainaut 82d83ca579 gsdx: dull driver
Hopefully futur low-end GPU will get 4GB of VRAM
2016-07-08 21:53:42 +02:00
Gregory Hainaut 3f03f7333c gsdx: improve builtin profiler
* Does the first vsync (start counter) after the sleep
* Dump data after the rendering, avoid to count extra destructor,sleep time
* Dump data into a basic csv file (if people want nice graph)
2016-07-08 21:47:53 +02:00
Gregory Hainaut 8b3e04d1b6 onepad: fix keyboard on 2nd pad
There is only a single event queue, so you need to detect the pad based
on the configuration

Mouse/Wiimote is limited to first pad

Related to issue #1441
2016-07-08 19:07:42 +02:00
Gregory Hainaut eefe3e8d4f gsdx ogl: reserve 200MB of the VRAM for various gl buffers (IBO/VBO/PBO/UBO) 2016-07-08 09:43:47 +02:00
Gregory Hainaut df4645a84a gsdx ogl: Don't use NV extension on AMD
potentially the NV extension is wrongly used but can't test it with the free driver
2016-07-07 23:48:56 +02:00
Gregory Hainaut d6e447a89c gsdx: fix for old gl header release (build bot) 2016-07-07 22:23:20 +02:00
Gregory Hainaut d8050634f6 gsdx ogl: plug GL_NVX_gpu_memory_info and GL_ATI_meminfo
to query available memory on the GPU

Requirement
* dedicated GPU (ofc!)
* proprietary driver. Free driver supports r600, radeonsi
2016-07-07 22:05:15 +02:00
Gregory Hainaut 7e2b3da928 gsdx ogl: monitor global GPU memory texture usage
So far there is a hardcoded limit at ~3.7GB

In the future, the limit will be reduced for low-end GPU.
2016-07-07 22:05:15 +02:00
Gregory Hainaut f450056626 gsdx: fix initialization list order
In file included from GSRenderer.cpp:23:0:
GSRenderer.h: In constructor ‘GSRenderer::GSRenderer()’:
GSRenderer.h:58:12: warning: ‘GSRenderer::m_dev’ will be initialized after [-Wreorder]
  GSDevice* m_dev;
            ^
GSRenderer.h:52:13: warning:   ‘GSVector2i GSRenderer::m_real_size’ [-Wreorder]
  GSVector2i m_real_size;
             ^
GSRenderer.cpp:32:1: warning:   when initialized here [-Wreorder]
2016-07-07 22:05:15 +02:00
Gregory Hainaut a735e2b58f Merge pull request #1287 from mogaika/debug_window_improve
Debugger features
2016-07-07 19:59:33 +02:00
Gregory Hainaut 29c97a9bf2 gsdx ogl: only enable accumulation hack in HDR algo
Goal is to reduce shader permutations and improve perf when sw blending is disabled
2016-07-07 19:56:23 +02:00
Gregory Hainaut 16c2baa0df gsdx-ogl: don't hardcode the accumulation blend trick
Perf impact is bigger than expected
2016-07-07 19:56:23 +02:00
ramapcsx2 6b6821d0c6 Merge pull request #1433 from FlatOutPS2/master
Merge Circuit: Enhance offset detection of output circuit
2016-07-06 12:15:08 +02:00
Catarax 31a74abebe GameDB: Kessen 2 refraction patch (NTSC-J/NTSC-K) (#1447)
Apply the refraction patch for Kessen 2 NTSC-J/NTSC-K releases.
2016-07-05 09:13:17 +01:00
ramapcsx2 5c614bceba Merge pull request #1446 from Catarax/master
GameDB: Syphon Filter (The Omega Strain) NTSC-K fixes
2016-07-04 14:45:20 +02:00
Akash 6085da91e2 GSDX-Dialog: Clamp custom res and sw threads values to input range (#1443)
Fixes crash on custom resolution when users select a value below 256 or above 8192
2016-07-03 22:04:16 +01:00
Vladimir Jigulin 7e91eb6616 debugger: some user-friendly improves in ui
Grouping bytes in debugger memory window, following pointers and history
Goto in register view
Printing strings in pointer registers
Memory view can be resized correctly by ctrl+wheel
Improvement in function 5900DebugInterface::isValidAddress
2016-07-03 22:01:09 +03:00
Catarax 8aa70f05ad GameIni: Syphon Filter (The Omega Strain) NTSC-K fixes
NTSC-U fixes of Syphon Filter (the Omega Strain) applied to the NTSC-K release.
2016-07-03 20:14:18 +02:00
Gregory Hainaut a1a5f470f7 gsdx-ogl: fix builtin profiler frame counting 2016-07-03 15:54:58 +02:00
Gregory Hainaut cc62e8c785 Merge pull request #1439 from ssakash/Cleanup_Warnings
PCSX2: Clean up warnings on MSVC
2016-07-03 15:45:39 +02:00
Akash d69f2b6cc5 cdvdGigaherz: Clean up warnings on MSVC
SectorConverters: convert variables to u8.
2016-07-02 23:38:02 +05:30
Akash 1bcb5e0cc1 dev9ghzdrk: Clean up warnings on MSVC
pcap_io: cast ``pcap_io_running`` to bool.
2016-07-02 23:38:01 +05:30
Akash 264eb52d61 USBqemu : Clean up warnings on MSVC
usb-kbd: Remove unused variable.
usb-ohci: Add proper casts for the variables.
vl: Add proper casts for the variables.
USB: Add proper casts for the variables.
2016-07-02 23:37:37 +05:30
Gregory Hainaut 11eeeb6ab1 gsdx ogl: be sure sw blending is enabled in sw colclip
Hit the assertion on superman
2016-07-02 17:19:41 +02:00
Akash 4cfb2b248e GSDX: Clean up warnings on MSVC
GLLoader: cast passed parameters to required type.
GSDeviceOGL: cast variables to required type and silence warnings.
GSRendererOGL: cast variables to required type and silence warnings.
2016-06-30 16:50:10 +05:30
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
Gregory Hainaut a065a1d918 gsdx ogl: don't use GL_ARB_clear_texture for the depth buffer
It creates some slowdowns for unknown reason. My best hypothesis is
that stencil will be cleared too which is slow.

Let's keep the code for the future when stencil will be dropped.

Fix #1420
2016-06-30 09:40:07 +02:00
FlatOutPS2 1e3e343e43 Merge Circuit: Enhance offset detection of output circuit
If baseline and display rectangle offsets differ by small values then consider the status of frame memory offsets, prevents blurring on Tenchu: Fatal Shadows, Worms 3D, ProStroke Golf, Vexx
2016-06-29 22:35:53 +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