Commit Graph

7190 Commits

Author SHA1 Message Date
IlDucci e11cc951de Merge remote-tracking branch 'PCSX2/master' 2015-09-14 12:21:07 +02:00
Akash b97018932d GSDX: Rework Internal Resolution function
upscale_multiplier function values have been changed to allocate native resolution and also move custom resolution to 9.
Remove the old native checkbox value and include Native in the combo box.
Internal GSDX functions have also been updated with this new update to the upscale_multiplier variable.
2015-09-14 10:26:27 +05:30
Jonathan Li 67dc65ea91 linux: Fix _aligned_realloc implementation
Out-of-bounds memory is no longer accessed if the realloc size is larger.
If reallocation fails, the old memory will not be freed and a memcpy
will not take place.

This should match the Windows _aligned_realloc behaviour, except that an
extra parameter is used.
2015-09-13 21:05:33 +01:00
Miguel A. Colón Vélez 4760d71a86 Remove the remaining postbuild stuff.
The bot should work now.
2015-09-13 04:33:17 -04:00
Pistachioman 3df5c2835e Remove useless postBuild stuff 2015-09-13 04:31:41 -04:00
micove f062b0f671 Merge pull request #818 from micove/Linux_Segfault
Linux: Fix segmentation fault with the new libstdc++ ABI.
Closes #780
2015-09-13 00:31:09 -04:00
Miguel A. Colón Vélez f1cb2cfa35 Fix segmentation fault with the new libstdc++ ABI.
Local variable goes out of scope and everything goes boom.
2015-09-12 17:35:45 -04:00
micove 53680d538d Merge pull request #817 from micove/GIT_TZ
Fix git version detection.
2015-09-12 06:33:00 -04:00
Jonathan Li 5c6915f633 utilities: Simplify _aligned_malloc wrapper
Windows doesn't actually use it at all, so let's exclude it from the
VS build. Also include ScopedAlloc.h into the VS project file.
2015-09-12 10:01:04 +01:00
Jonathan Li 8312e21f00 utilities: Cleanup unused memcpy defines
All refer to memcpy, and only memcpy_fast is used, so there's no point
keeping them.

Also remove the _memset16_unaligned function prototype since there's no
function definition for it.
2015-09-12 10:00:49 +01:00
Jonathan Li 239306e9a2 pcsx2|gsdx:linux: Fix posix_memalign
The AddressSanitizer can be used on Linux again. Well, PCSX2 doesn't get
very far when it's used though.
2015-09-12 09:58:00 +01:00
Miguel A. Colón Vélez 49072d6e02 Fix git version detection
- It currently fails to detect a 64bit git.
- It currently breaks with a TZ left of the Greenwich meridian.
- The output of git show -s can cause compilation errors pipe to NUL.
- Pipe the two can't find the git command error messages to NUL too.
2015-09-11 19:20:23 -04:00
Gregory Hainaut fc67e372d2 pcsx2:gui: fix potential infinite loop 2015-09-11 21:01:23 +02:00
Gregory Hainaut 0422854384 pcsx2:interpreter: always false condition
Both fields are 10 bits but the ~ operation apply on the 32 bits.
Therefore msb bits were always '1' and the condition always false.

Code is only used on the interpreter but it could explain some hangs
2015-09-11 20:01:01 +02:00
Gregory Hainaut bfe1236d98 pcsx2|lilypad: Unintentional integer overflow
Add some cast to do the intermediate operation in 64 bits
2015-09-11 16:50:02 +02:00
Gregory Hainaut 0a7eed686c Merge pull request #763 from PCSX2/gsdx-texture-format
Gsdx improves texture format setup
2015-09-11 14:44:31 +02:00
Gregory Hainaut cee0fde940 gsdx-tc: improve support of TEXA register
* Greatly reduce the number of clut read (factor 10x)
* Avoid to get wrong TEXA texture in the cache.
* Fix "jump depends on uninitialized variable" Valgrind warning.

Fix #748

I try my best to avoid any breakage of DX but please test it too.
2015-09-11 14:16:11 +02:00
Gregory Hainaut 78569ee833 gsdx-ogl: redo properly the setup of texture format
* add lengthly comment to explain the format
* Likely reduce the number of shader permutation
* Avoid slow AEM (on GPU)

Expect regressions because TC needs some fixes

v2: fix palette mode
2015-09-11 14:14:22 +02:00
Gregory Hainaut 6c7ce3465e pcsx2:CDVD: guarantee that index of mg_zones array is below than 8
CID 146917 (#1 of 1): Untrusted array index read (TAINTED_SCALAR)
tainted_data: Using tainted variable cdvd.Result[1] as an index into an array mg_zones
2015-09-11 09:25:09 +02:00
Gregory Hainaut 8928c3e7f1 onepad: be sure pad variable is 0 or 1
CID 146918 (#1 of 1): Use of untrusted scalar value (TAINTED_SCALAR)
tainted_data: Passing tainted variable pad to a tainted sink
2015-09-11 09:18:49 +02:00
Gregory Hainaut 113c0aa411 pcsx2: use sizeof of object instead of pointer (portability)
CID 146912 (#1 of 1): Sizeof not portable (SIZEOF_MISMATCH)
suspicious_sizeof: Passing argument recConstBuf of type u32 * and argument 131072U /* RECCONSTBUF_SIZE * sizeof (recConstBuf) */ to function memset is suspicious. In this case, sizeof (u32 *) is equal to sizeof (u32), but this is not a portable assumption.
2015-09-11 08:54:29 +02:00
Gregory Hainaut 2430abed33 gsdx: potential division by zero
CID 146833 (#2-1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)
divide_by_zero: In expression this->m_width / this->m_upscale_multiplier, division by expression this->m_upscale_multiplier which may be zero has undefined behavior.
2015-09-11 08:54:29 +02:00
Gregory Hainaut e6d1a4cccf gsdx: avoid a potential division by zero
CID 146835 (#1 of 1): Division or modulo by float zero (DIVIDE_BY_ZERO)
50. divide_by_zero: In expression (float)(end - start) / (float)frame_number, division by expression frame_number which may be zero has undefined behavior
2015-09-11 08:54:29 +02:00
Gregory Hainaut 2934a15902 gsdx: remove a duplicated check 2015-09-11 08:54:29 +02:00
Gregory Hainaut f092f9045c pcsx2: initialize the block pointer
There is a check on it on the resize function
2015-09-11 08:54:29 +02:00
Gregory Hainaut ac8f4e69d6 pcsx2|gsdx: avoid potential null deferencement 2015-09-11 08:54:29 +02:00
Gregory Hainaut 0260c9119e common: suspicious missing comma 2015-09-11 08:54:29 +02:00
Gregory Hainaut 1baa6be6de debugger: enforce a null terminated char of a C-string
CID 146728 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)
buffer_size_warning: Calling strncpy with a maximum size argument of 128 bytes on destination array mod.name of size 128 bytes might leave the destination string unterminated
2015-09-11 08:52:05 +02:00
Gregory Hainaut b082147c4d onepad: avoid potential resource leak 2015-09-10 14:21:27 +02:00
Gregory Hainaut f4f08b9c99 pcsx2: avoid couple of out-of-bounds access 2015-09-10 14:20:51 +02:00
Gregory Hainaut c687c73edd pcsx2:debugger: avoid strlen call on random data 2015-09-10 13:46:36 +02:00
Gregory Hainaut 0bcaff4214 pcsx2:cdvd/debug: various uninitialized data
Most of the time, code is correct. In doubt always init the value.
2015-09-10 13:45:42 +02:00
Gregory Hainaut 5e8f899620 pcsx2:debug: miss a break that lead to a mem leak 2015-09-10 13:42:23 +02:00
Gregory Hainaut 5c933a7faf pcsx2:gzip: free the index
Normally index will be NULL if len is 0 but it won't hurt
2015-09-10 13:41:22 +02:00
Gregory Hainaut 8b2de15096 build: add an option to build a coverity DB 2015-09-10 13:40:45 +02:00
refractionpcsx2 2a8bae187f Merge pull request #811 from micove/GSdx_Debug
Rename Release/Debug SSE2 to Release/Debug.
2015-09-09 23:28:05 +01:00
Miguel A. Colón Vélez 26e2b4a5be Rename Release/Debug SSE2 to Release/Debug. 2015-09-08 23:17:07 -04:00
Jonathan Li d8a7bfd438 gui: Adjust mainframe size and status bar position
There are a few odd things with Windows and the background logo.
1. The windows containing the logo is smaller than the logo.
2. The fitting algorithm doesn't work at 200% DPI.

Both make no sense, but can apparently be worked around.
2015-09-08 18:47:45 +01:00
Jonathan Li bcc125ceb6 gui:windows: Implement image DPI scaling
This should reproduce the old non-DPI aware pre-wxWidgets 3.0 behaviour
for the main dialogs, except the font rendering should be better.

And add comments that I should have already added but didn't.
2015-09-08 18:47:44 +01:00
Jonathan Li 59ffed85ba gui: Fix image list scaling
The listbook images aren't rescaled unless the embedded icons are used.
Make sure all the images are correctly rescaled.
2015-09-08 18:27:48 +01:00
Jonathan Li 5cf94e5a15 gui: Allow screenshot icon to be themed.
The logo and all the other icons can apparently be themed (though
theming is a bit broken). Let's allow the camera screenshot to be
themed as well.
2015-09-08 18:27:48 +01:00
Jonathan Li 2263961d4d gui: Simplify and rework EmbeddedImage class
The wxImage Scale/Rescale methods with wxIMAGE_QUALITY_HIGH upsamples
and downsamples using the bicubic and box resampling methods
respectively, so let's just use that instead of the ResampleBox method,
which is undocumentated and probably shouldn't be used.

The Rescale function also modified the image when it was not supposed
to. Fix it, and rename it scale to avoid confusion with the wxWidgets
class.
2015-09-08 18:27:48 +01:00
Gregory Hainaut ddc03cbccf gsdx: add a nice enum to replace the hardcoded convert shader 2015-09-08 16:51:24 +02:00
Gregory Hainaut 1ae0fed83b gsdx: fix a regression due to the shader renaming 2015-09-08 16:06:15 +02:00
Gregory Hainaut 81e056e79a gsdx: always enable the boost queue
ifdef was for VS2010

GSThread.h is useless. I keep it for the transactional queue implementation
2015-09-08 14:43:09 +02:00
Gregory Hainaut 3706cfe908 gsdx: always enable CXX11 mutex feature.
ifdef was only useful for VS2010
2015-09-08 14:34:17 +02:00
Gregory Hainaut ca9b5ce11d gsdx-ogl: move depth conversion shader
Add 2 new shaders:
* ps_main12: cast a 16 bit depth to a RGB5A1 color
* ps_main16: cast a a RGB5A1 color to a 16 bit depth

Shader might be used in future commit as it seems Silent Hill uses this
kind of format.

Fix tab/indentation too
2015-09-08 12:41:05 +02:00
Gregory Hainaut 4eed4ca3a1 gsdx-debug: restore 16 bit dump format in the SW renderer
Actually dump both 32/16 bits (former for texture shuffle and later
for real 16 bits RT)
2015-09-08 12:41:05 +02:00
Jonathan Li 9d4a8688c1 Merge pull request #801 from turtleli/windows-left-list-icons
Have listbook icons (Emulation Settings, Plugin BIOS selector) on the left for all platforms.
Don't set minimum widths for Framelimiter and Frameskip panels.
2015-09-07 08:46:49 +01:00
Jonathan Li 1d2d8cd38b gui: Don't set min widths for Framelimiter/skip panels
It causes weird behaviour at higher DPIs.
2015-09-07 08:26:20 +01:00