Commit Graph

7527 Commits

Author SHA1 Message Date
Akash c1f1646dab GSDX: Initialize class members
CID 146973 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member overflow is not initialized in this constructor nor in any functions that it calls.
2999}
2015-10-23 01:35:15 +05:30
Gregory Hainaut 87001326f6 gsdx: remove 4Y-old unused code
It was never used.
2015-10-22 19:51:03 +02:00
Gregory Hainaut a8968257db glsl: keep fract in [0;1] range
Shin Megami Tensei Lucifers seems to generate infinites values.
I suspect that DX always clamp fract output.

Finally fix #782 !
2015-10-22 18:36:45 +02:00
Gregory Hainaut c0d0e2e89d gsdx-ogl: PrimitiveOverlap requires real rectangle
runion/rempty/rinter requires x < z and y < w

Help issue #762 (accurate blending issue)

If you want to shine, please put better GSVector code (AVX512 is 2 instruction :p)
2015-10-22 12:34:50 +02:00
Gregory Hainaut 56f2e74ff4 Merge pull request #893 from PCSX2/accurate-date-regression
gsdx-ogl: accurate date regression. Bad interaction between depth & DATE
2015-10-22 12:34:00 +02:00
Gregory Hainaut 92553add8e gsdx-ogl: accurate date regression. Bad interaction between depth & DATE
In the DATE42 algo, first pass must find the primitive that write the
bad alpha value. If depth test is fail, alpha value won't be written therefore
you mustn't keep the primitive id.

In theory to ensure 100% correctness, depth would need to be fully executed
(currently depth write is disabled). However it requires to copy the depth buffer.
It is likely bad for the perf.

Issue reported on DBZInfWorld
2015-10-22 12:31:51 +02:00
Gregory Hainaut 059d4a1306 Merge pull request #898 from PCSX2/gsdx-aniso-hw-unit
gsdx-ogl: only enable aniso when sampling from the HW texture unit
2015-10-22 12:22:21 +02:00
Gregory Hainaut 6561fbc831 gsdx-ogl: only enable aniso when sampling from the HW texture unit
Potentially help issue #884
2015-10-22 12:21:43 +02:00
micove b13a1ff3dd Merge pull request #908 from micove/WX_PIZZA
Linux GUI: Fix invalid cast from 'wxPizza' to 'GtkBin'.
2015-10-21 16:38:21 -04:00
Gregory Hainaut ffdc914c71 linux: SDL2
For older distribution you can still use SDL1.2

./build.sh ... --sdl12 ...
or
cmake ... -DSDL2_API=FALSE ...

Note: there is a hard dependency between WxWidget and SDL. If Wx is linked against
SDL1.2, you must use SDL1.2. Crashes are expected otherwise.
2015-10-21 22:35:38 +02:00
Gregory Hainaut b6d9ea86ee spu2x-sdl: memset the stream buffer in SDL2
Fix #382
2015-10-21 22:13:29 +02:00
Gregory Hainaut 53c38ef2cc spu2-sdl: move the ifdef to support automatic indentation 2015-10-21 20:54:09 +02:00
Gregory Hainaut 281c5e4c66 Properly swap the argument of the good option
AKA: redo commit d7afd7aae0 with the eye open...
2015-10-21 20:41:40 +02:00
Gregory Hainaut 96bf714d85 spu2x-sdl: unique_ptr is always supported
So let's drop various ifdef
2015-10-21 20:36:07 +02:00
Gregory Hainaut 2b06d34279 pcsx2: use Reassign of the scoped pointer to improve readability
Note: it is equivalent to a basic assignment due to operator overloading
2015-10-21 20:10:16 +02:00
Gregory Hainaut 826319ce34 gsdx-ogl: check null pointer
CID 151735 (#1 of 1): Dereference after null check (FORWARD_NULL)
61. var_deref_model: Passing null pointer rt to CopyRectConv, which dereferences it
2015-10-21 20:10:16 +02:00
Gregory Hainaut d7afd7aae0 pcsx2:debug: swap 2 arguments
It changes nothing but it is more consistent

CID 146916 (#1 of 1): Arguments in wrong order i
(SWAPPED_ARGUMENTS)swapped_arguments: The positions of arguments in the call to disBranch do not match the ordering of the parameters:

    rt is passed to rs
    rs is passed to rt
2015-10-21 20:10:16 +02:00
Jonathan Li aff1467ea3 debugger:linux: Fix wx2.8 compilation
Bind doesn't work on wx2.8. Replace with event tables and Connect.
wxString::Format also requires the format string to be L"something".
const char* requires an explicit conversion to wxString.
The show 128/64/32 bit menu column stuff doesn't have a direct wx2.8
replacement so just omit it - I'm not sure it's useful functionality
anyway.
2015-10-21 17:34:02 +01:00
Jonathan Li ccb261a8a3 debugger: Set wxGrid label font as well
It makes the debugger window more vertically compact.
2015-10-21 17:34:02 +01:00
Jonathan Li 9d23fc222a Merge pull request #885 from byehi5299/ctrlregisterlist
Rewrite CtrlRegisterList to allow scrolling and fix size issues.
It now works better on small screens and has simpler code.
2015-10-21 17:33:10 +01:00
Gregory Hainaut e5015faafa Merge pull request #906 from PCSX2/try-catch-register-allocation-error
pcsx2: generate an exception when recompilation failed
2015-10-21 15:16:45 +02:00
Gregory Hainaut a4c37d7f51 pcsx2: fallback to the interpreter if bad register allocation 2015-10-21 13:16:51 +02:00
Miguel A. Colón Vélez 8cf51c5cf4 Linux GUI: Fix invalid cast from 'wxPizza' to 'GtkBin'.
(PCSX2:32189): GLib-GObject-WARNING **: invalid cast from 'wxPizza' to 'GtkBin'
.
Cast the wxPizza directly to a GtkWidget. Looking at the wx3.0 source code the pizza
constructor returns a GtkWidget. Also GetHandle() returns a GtkWidget:
http://docs.wxwidgets.org/trunk/classwx_window.html#a185e6cd7065367b552748cb722651b27
2015-10-20 18:23:48 -04:00
refractionpcsx2 2a21224ab8 Merge pull request #907 from ssakash/gameDB_update
GameDB: Update compatibility status of games.
2015-10-20 22:43:30 +01:00
Akash 78890f925c GameDB: Update compatibility status of games. 2015-10-21 03:08:43 +05:30
Gregory Hainaut 796f831296 pcsx2: generate an exception when recompilation failed
Avoid the cost of checking -1 for a very rare case.

It misses currently a good fallback
2015-10-20 18:23:38 +02:00
Gregory Hainaut 5f78644bb6 Merge pull request #902 from PCSX2/convert-auto_ptr-unique_ptr
pcsx2: auto_ptr is deprecated in favor of auto_ptr
2015-10-19 15:37:35 +02:00
Gregory Hainaut c42f46eba4 pcsx2: auto_ptr is deprecated in favor of unique_ptr 2015-10-19 13:41:34 +02:00
byehi5299 369a6a30da A few small formatting changes. 2015-10-18 22:01:30 -04:00
Gregory Hainaut 395b4c25f3 Merge pull request #899 from ssakash/gsdx_nullcheck
gsdx: use old size of target if ds and rt is null
2015-10-18 19:25:39 +02:00
Jonathan Li 26de185f54 pcsx2: Fix OpenSUSE 13.2 wx3.0 compile
I have no idea why it fails to convert the wxString to a const wxChar *.
2015-10-18 15:13:59 +01:00
Jonathan Li 7fac189ab3 spu2-x:linux: Fix potential null deference
Coverity CID 146911: Dereference before null check (REVERSE_INULL)
2015-10-18 14:01:27 +01:00
Gregory Hainaut d5e0899955 oups collision with ref commit 2015-10-18 11:19:39 +02:00
Gregory Hainaut f99882c61c gsdx-ogl: keep gl_ActiveTexture & gl_BlendColor (fix MS compilation)
It seems openGL ABI isn't exactly the same between Windows and my PC.
2015-10-18 11:18:19 +02:00
refractionpcsx2 42a4c7d368 GameDB: Add comment for hack required for Dakar 2 on OPM Demo Disc 33 2015-10-18 02:38:58 +01:00
refractionpcsx2 179a4cead5 GSdx: Fix compilation 2015-10-18 02:01:56 +01:00
refractionpcsx2 b132557f04 GameDB: Fixed entry for PBPX-9505, serial incorrect, updated name 2015-10-18 01:26:13 +01:00
Akash 294b8d3c6e gsdx: use old size of target if ds and rt is null
CID 146843 (#1 of 1): Dereference after null check (FORWARD_NULL)6. var_deref_model: Passing null pointer ds to GetSize, which dereferences it.
2015-10-17 22:47:44 +05:30
Gregory Hainaut 0958b9db8e gsdx-ogl: use the standard openGL name
Function pointer was mangled to avoid any collision. Nowadays all symbols
are hidden so no risk of collision.

Syntax is nicer beside it would allow to put back GLES3.2. I think it
supports most of the used extension.

glActiveTexture & glBlendColor are provided without symbol query.
2015-10-17 17:05:15 +02:00
Gregory Hainaut 1c8f8a00b8 Merge pull request #894 from ssakash/coverity_fix
Coverity: Prevent NULL dereferences and other stuffs.
2015-10-17 16:00:28 +02:00
Gregory Hainaut eb387e16f4 onepad: fix compilation on SDL1 2015-10-17 14:38:46 +02:00
refractionpcsx2 706bbcf8a9 IOP Counters: Silly error fixed.
-Coverity CID 152835 & 152834: The expression's value does not depend on the operands; often, this represents an inadvertent logic error.
In psxRcntWcount32(int, unsigned int): An operation with non-constant operands that computes a result with constant value (CWE-569)
2015-10-17 12:52:49 +01:00
Gregory Hainaut 4f86cca306 common: don't return a boolean for an assert
It might help to fix those 2 coverity reports.

CID 151744 (#1 of 1): Useless call (USELESS_CALL)
side_effect_free: Calling EnumAssert(id) is only useful for its return value, which is ignored

CID 151745 (#1 of 1): Useless call (USELESS_CALL)
side_effect_free: Calling EnumAssert(id) is only useful for its return value, which is ignored.
2015-10-17 11:49:04 +02:00
Gregory Hainaut 9b796d0f27 Merge pull request #892 from 3kinox/rumble_onepad
Implement rumble and isolate SDL code path
2015-10-17 11:00:06 +02:00
Akash fedd07e4a8 gsdx: prevent a potential division by zero
CID 146834 (#2-1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)9. divide_by_zero: In expression tpf * 10000ULL / ttpf, division by expression ttpf which may be zero has undefined behavior.
2015-10-17 11:26:11 +05:30
Akash b8caab5f3d pcsx2: prevent a potential null deference
CID 146889 (#1 of 1): Dereference null return value (NULL_RETURNS)4. dereference: Dereferencing a pointer that might be null wxGetApp()->GetDisassemblyPtr() when calling update

FindWindowById returns NULL if the Window with the given id is not found, no need to do a extra check for validation of the id. also do a check for wxGetApp()->GetDisassemblyPtr() to prevent a null deference.
2015-10-17 11:26:08 +05:30
Akash 04b765a674 gsdx: check for null deference.
CID 146839 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)11. var_deref_model: Passing null pointer fb_pages to UsePages, which dereferences it.

CID 146840 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)11. var_deref_model: Passing null pointer zb_pages to UsePages, which dereferences it.

* Prevent a potential null pointer deference in ```void GSRendererSW::UsePages()```
2015-10-17 09:14:07 +05:30
3kinox d7155f839f onepad:
+ Implement and activate rumble.
2015-10-16 23:55:18 +02:00
3kinox fb0d7139f2 onepad:
+ Isolate every SDL code paths and replace any call to them by call to a generic class "GamePad" of which JoystickInfo is now a child.
+ Now backends can be added by inheriting GamePad generic class.
+ There is just one function change which is redundant with next commits but otherwise commit will not compile(which is more evil).
2015-10-16 23:53:51 +02:00
3kinox 9ab554af5b onepad:
+ Objectify conf class.
+ Make some members private as they need to have their range checked before being set
+ Change "options" variables into an union contraining bitfield representation of it. Allows to make code more expressive/readable.
2015-10-16 23:47:55 +02:00