Commit Graph

8724 Commits

Author SHA1 Message Date
Gregory Hainaut
de32691b4e clang format: don't allow statement on single lines + disable resource.h too (generated file)
Following discussion in #1530
2016-08-22 18:21:17 +02:00
Gregory Hainaut
1fb2c66a21 gsdx ogl: Unscale line
Line thickness will be increased to N pixels (N is the upscaling factor).

Code will also be enabled by UserHacks_unscale_point_line = 1
2016-08-22 18:18:12 +02:00
Gregory Hainaut
018895067b gsdx ogl: restore code to unscale point
enabled by UserHacks_unscale_point_line = 1

Point will be transformed into a NxN square sprite. (N is the upscaling factor)
2016-08-22 18:18:12 +02:00
Gregory Hainaut
f3d14dadc7 Merge pull request #1524 from ssakash/SMODE2_Override
EE: Minor changes to syscall function
2016-08-22 11:37:13 +02:00
Gregory Hainaut
8ee2d3d367 gsdx: use static assert when possible
reported by clang tidy
2016-08-21 15:22:09 +02:00
Nicolas Hillegeer
b2984cd3d0 build.sh: don't use -m option for parallel
My reasoning was off. The -m flag does avoid the clang-tidy startup
 cost (which isn't large), but it also increases tail latency because it
 allows a straggler command to run much longer. Suppose that many heavy
 .cpp files are bundled into one clang-tidy invocation.

Bench from Greg
with -m
./build.sh --dbg --clean --no-simd --clang-tidy  3886.45s user 12.04s system 1066% cpu 6:05.71 total
without
./build.sh --dbg --clean --no-simd --clang-tidy  4297.51s user 41.70s system 1497% cpu 4:49.86 total
2016-08-21 14:29:49 +02:00
Gregory Hainaut
27ea9c22bb Merge pull request #1529 from aktau/clang-tidy-parallelize
build.sh: parallelize clang-tidy
2016-08-21 13:30:44 +02:00
Nicolas Hillegeer
b45adb6e6a build.sh: parallelize clang-tidy
Also suppress spurious output from command -v.

[ci skip]
2016-08-21 13:29:08 +02:00
Akash
6bc6d20a87 R5900: Add an enum class for SYSCALL
v2: Fix indentation on switch-case.
2016-08-20 23:32:31 +05:30
Akash
95d70db153 Counters: Move interlace detection code to SetGsCrt
* More accurate to PS2 behavior and avoids an useless SMODE write function, it makes sense to also move this as video mode specific colorburst detection was already moved to SetGsCrt.
2016-08-20 23:32:20 +05:30
Avi Halachmi (:avih)
a0b014ecfc editorConfig: use tabs instead of spaces (indent stays 4)
The vast majority of PCSX2 files use tabs for indentations, and all new
commits also use tabs for indents and not spaces. Therefore, having space
.editorConfig makes it extremely hard to work on PCSX2 files with editors
which support this config file.

There were some concerns that github will make things harder for us
with tabs at .editorConfig, and if that indeed becomes an issue then
we'll have to address it somehow. For now, let's hope it won't.

Also, commented out the line which automatically removes trailing
spaces, since it affects the entire file and therefore makes changes
which the committer did not intend to make at places unrelated to the
commit.
2016-08-20 20:43:38 +03:00
Gregory Hainaut
fc996951cb build.sh: use $flags instead of "$flags"
Otherwise bash add tick around it and cmake doesn't understand what happen
2016-08-20 19:05:23 +02:00
Gregory Hainaut
2ae133e993 build.sh: use clang when clang-tidy is enabled
avoid tons of warning that options XXX isn't supported
2016-08-20 19:01:14 +02:00
Gregory Hainaut
a02937a67b Merge pull request #1528 from aktau/build-posixify
build.sh: simplify and semi-modernize
2016-08-20 18:32:51 +02:00
Gregory Hainaut
0f4cc3231a i10n: upload precompiled es file 2016-08-20 18:23:48 +02:00
Jonathan Li
2b2042e1c2 gsdx: Allow screenshot compression level to be changed
At higher resolutions it takes too much time to save a screenshot at the
maximum compression level. So let's allow the user to set the
compression level.

This re-uses the png_compression_level setting. The default compression
level is 1 for speed, but if the user wishes to increase the compression
level (without using an external tool) and doesn't mind if the
screenshot takes more time to save then they can increase the
compression level up to a maximum of 9 (which can take quite a while).

Fixes #1527.
2016-08-20 14:01:24 +01:00
Nicolas Hillegeer
57090e8ec5 build.sh: simplify and semi-modernize
1. All POSIX shells support $(...) syntax [1], including /bin/sh. shellcheck
   warns about it.
2. [[ won't work in /bin/sh [2], so use [ everywhere. I wonder why it worked
   now, perhaps the test was running on a system where /bin/sh -> /bin/bash.
3. In POSIX sh, string indexing is undefined. [SC2039]. Unfortunately, this
   means we require a subprocess: https://wiki.ubuntu.com/DashAsBinSh. Very
   ugly.
4. In POSIX sh, arrays are undefined. We seem to use $flags as an array
   after constructing it by string concatenation. I tried to verify that
   this has the same effect as just passing the quoted string in bash:

      bash-3.2$ flags="-DCMAKE_GOOK"
      bash-3.2$ flags="$flags -DCMAKE_MOARMA"
      bash-3.2$ flags="$flags -DCMAKE_URURURUR"
      bash-3.2$ ./argv $flags
      0: ./argv
      1: -DCMAKE_GOOK
      2: -DCMAKE_MOARMA
      3: -DCMAKE_URURURUR
      bash-3.2$ ./argv "${flags[@]}"
      0: ./argv
      1: -DCMAKE_GOOK -DCMAKE_MOARMA -DCMAKE_URURURUR
      bash-3.2$ ./argv "$flags"
      0: ./argv
      1: -DCMAKE_GOOK -DCMAKE_MOARMA -DCMAKE_URURURUR
      bash-3.2$

5. Enable exit on unknown variable (-u). All variables should be known,
   otherwise we have an error in the script. shellcheck doesn't warn so I
   think it's fine.

Apart from shellcheck(1), I also ran checkbashisms(1). The latter only
reported that "command -v" might not be available in other shells.
Apparently only ash(1) doesn't understand it.

NOTE: Why are we even trying to support pre-Mavericks (Darwin < 13) OSX? We
don't even support the most modern OSX (El Capitan) fully yet. OSX upgrades
are free and generally don't leave old machines behind. Most machines made
after 2009 can upgrade to El Capitan, AFAIK. I also believe that systems
that have all the utilities and libraries necessary to build PCSX2 will have
/bin/bash >= 3.x.

NOTE 2: Does cmake/ninja generate the same type of output in
compile_commands.json?

[1]: http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03
[2]: http://serverfault.com/a/52050
2016-08-20 13:15:57 +02:00
Gregory Hainaut
d6b834e8af gsdx hw: don't execute blit fmv with target
Avoid invalid operation due to depth buffer
2016-08-20 12:56:30 +02:00
Gregory Hainaut
fa826b3167 gsdx tc: check compatible bit when wrote in middle of target
All maths are wrong otherwise. Fix half screen issue in WRC
2016-08-20 11:57:15 +02:00
Gregory Hainaut
a49b3c9bf6 gsdx tc: log more stuff on texture cache dirty & frame format 2016-08-20 11:52:22 +02:00
Gregory Hainaut
cdfbff9af0 build.sh: use command -v instead of which 2016-08-19 18:21:42 +02:00
Gregory Hainaut
02cfe9aeeb Merge pull request #1520 from IlDucci/master
Updating Spanish translation
2016-08-19 09:55:41 +02:00
Gregory Hainaut
d87452ed21 build.sh: allow to replace make by ninja to speed up the build system
Quick benchmark. GCC debug mode
Full build: 6 second better, it can 2 additional cores :)
make : ./build.sh --dbg --clean  213.25s user 22.35s system 881% cpu 26.739 total
ninja: ./build.sh --dbg --clean  203.94s user 18.31s system 1085% cpu 20.474 total

No change build:: 1 second better :)
 make -C build_dbg -j 16 install  1.51s user 0.34s system 206% cpu 0.898 total
ninja -C build_dbg -j 16 install  0.05s user 0.02s system 98% cpu 0.074 total
2016-08-18 22:45:46 +02:00
Jonathan Li
029468e7b4 ci: Add clang 3.8 to Travis CI 2016-08-17 22:07:42 +01: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
Jonathan Li
f338ffea74 console: Remove scrollbar mouse drag pause behaviour
If the dev/verbose logging option is enabled and the game requires
automatic gamefixes, the console log will always scroll to the bottom
when the scrollbar is released since a new log message will be output
when emulation unpauses.

This could be quite annoying when checking a log while the game is
running. The behaviour doesn't seem to be all that useful anymore
(previously it was useful to work around a GUI bug where the automatic
gamefixes/widescreen patches/cheats menu options didn't apply
immediately) and only works on Windows, so let's remove it.
2016-08-17 22:07:42 +01:00
Gregory Hainaut
765b68458a gsdx: improve logging
Don't enable UpdateValidity print by default (+20~25% on log size)
Only useful in rare cases
2016-08-17 21:23:06 +02:00
Gregory Hainaut
15a4d1f0a9 pcsx2: fix gcc warning
MIPSAnalyst.cpp:124:9: warning: ‘takeBranch’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    else if (sure && !takeBranch)

False positive as sure will be false but safer this way
2016-08-17 21:23:06 +02: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
19ceea4f1e Merge branch 'strict-aliasing' 2016-08-17 18:53:08 +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
Jonathan Li
d36002a02a gsdx:cmake: Use PNG_LIBRARIES instead of PNG_LIBRARY
PNG_LIBRARIES adds both libpng and zlib to the command line.
PNG_LIBRARY only adds libpng to the linker command line, and the cmake
documentation also suggests not to use it.
2016-08-16 20:35:21 +01:00
IlDucci
fa5effafcd Updating Spanish translation
Added the new shortcut identifiers. Warning: Some strings are shown in
English.
2016-08-16 13:40:09 +02:00
Gregory Hainaut
fa249a3f78 gsdx ogl: don't rely on the Z value in m_vt
Value seems wrongly rounded and you can't distinguish 0xFFFF from 0xFFFE

Instead check that depth is constant for the draw call and the value from the vertex buffer

Fix recent regression on GTA (and likely various games)
2016-08-16 07:30:52 +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
252c043409 Merge pull request #1518 from PCSX2/pcsx2-high-level-fopen
Pcsx2 high level fopen
2016-08-15 15:41:27 +02:00
Pseudonym
07e21427b9 When PS1 loading was enabled, someone neglected to check that allowing the function to continue wouldn't cause any problems.
Fixes #1515
2016-08-15 14:23:43 +01:00
Gregory Hainaut
0f1c10230a CDVD: catch MEC/NVM file exception
It will stop the emulation and open a nice box with an error message instead of terminate PCSX2
2016-08-15 14:09:01 +02:00
Gregory Hainaut
deb7121fde CDVD: Use wxFFile API to handle MEC file too
again nicer, exception safe, less compilation warning :)

v2:
* check file is properly opened in write mode
* only print an error when result is bad
2016-08-15 13:08:54 +02:00
Gregory Hainaut
534e01e2d6 CDVD: Use wxFFile API to handle NVM file
Nicer, exception safe, less compilation warning :)

v2: check fp is properly open in write mode
2016-08-15 13:06:34 +02:00
Gregory Hainaut
5c7e2432bd gsdx-ogl: improve alpha test for GTA vice city (letters)
I don't understand why but it seems depth is rounded down even in 16 bits.
So uses 0xFFFE to enable ate_all_color_then_depth in 16 bits format too :)
2016-08-15 11:38:07 +02:00
Gregory Hainaut
5fbf702500 gsdx ogl: new optimization to bypass the alpha test
In FB_ONLY mode the alpha test impacts (discard) only the depth value.
If there is no depth buffer, we don't care about depth write. So alpha
test is useless and we can do the draw with a single draw call and no program
switch
2016-08-15 11:35:24 +02:00
Gregory Hainaut
b62859ffa2 gsdx ogl: only enable the alternate alpha test in FB_ONLY
RGB_ONLY requires to handle the alpha channel in the alpha test
2016-08-15 11:25:19 +02:00
Gregory Hainaut
2700f06fe7 Merge branch 'pcsx2-verbose-thread-error' 2016-08-14 22:31:28 +02:00
Gregory Hainaut
63ec74ebea build: remove most of the bashism
Various distribution still ship the true old shell to win 1 second at startup.
Besides, bash syntax is no way better

Not fully tested, some bashism might remain for some options but at least you can
do a standard build
2016-08-14 22:29:12 +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
0417a10483 gsdx: allow strict aliasing optimization 2016-08-14 21:01:40 +02:00
Gregory Hainaut
2e7fab7813 gsdx sw: avoid aliasing issue, clear function was wrong anyway
Value must be un-normalized. Function is only used with 0.0 so
API was updated to only use the 0 case.
2016-08-14 21:01:09 +02:00
Gregory Hainaut
ef7530af29 microVU: fix aliasing issue
Union is safer for the compiler
2016-08-14 20:49:12 +02:00