Fix motocross mania missing texture. Close#1319
As far as I understand, transfer is initialized in DIR. But the real
write only occured later so the blit buffer could have been overwritten
by a new value.
BLIT 0 13700
TREG 40 40
DIR 0 0
BLIT 0 13f00 <=== the bad guy
Write! ... => 0x3f00 W:1 F:C_32 (DIR 00), dPos(0 0) size(64 64)
v2: set a value in m_tr.m_blit for load state
It creates a regression on game that uses a small temporary target to
upload textures of various sizes. Inital code was done to handle direct
frame write (background, FMV) so big target
Purpose is to control the filtering when final image is displayed on the screen
Could improve the sharpness of the output in some games (ofc, it will be pixelated)
When depth primitive is constant and depth test is greater or equal, we can
execute the depth write after color (depth status will only depends on the initial
value)
New case for RGB_ONLY ate:
If the blending equation uses a fixed alpha or a source alpha. We can postpone the alpha write
in a 2nd pass.
If depth can also be postponed, we can guarantee the order of correctness of the value.
1st pass => do RGB
2nd pass => do Alpha & Depth
It fixed Stuntman letter rendering :) Remaining of the game is still broken :(
PCSX2: IPU end of video freeze fixes
Fixes end of video freeze in Enthusia - Professional Racing.
Fixes end of video freeze with IPU Normal error in games like Enter The Matrix(#1494), Rygar, Freestyle Metal X, etc. Also fixes The Incredible Hulk and Bolt (thanks to @prafullpcsx2 for testing).
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
* 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.
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.
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.
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