144767 Commits

Author SHA1 Message Date
Le Philousophe
191bde03ad COMMON: Use memcpy instead of memmove
memove was used although the buffers were not overlapping.
Using memcpy allows for better optimizations by compiler.
2023-08-28 21:49:03 +02:00
Le Philousophe
5edf74d8a6 COMMON: Cleanup flags defines
In addition, use flags from RFC and not from (really) old gzip
implementations.
2023-08-28 21:49:03 +02:00
Le Philousophe
b5e3173b10 COMMON: Fix inflateZlibHeaderless name
The function takes a stream beginning with zlib header unlike the name
suggests.
inflateInit expects to parse a zlib header.
2023-08-28 21:49:03 +02:00
Le Philousophe
ead4171bbd COMMON: Rewrite writeStream to work with any ReadStream
This let it work with stream without a known size and avoids allocating
big buffers when file is big.
2023-08-28 21:49:03 +02:00
ScummVM-Translations
0db796bd98 I18N: Update translations templates 2023-08-28 19:34:39 +00:00
antoniou79
74e521d8f8 PINK: Disable the Songs entry from the demo menu
This is aimed at and tested for the German Demo menu of Passport to Peril

In the original demo, the menu item for Songs is missing from the menu. In this fix we disable it (greyed out)
because the code for removing an item from the menu causes shifting of the subsequent menu items which
leads to unreliable code and potential future bugs if it's not accounted for.
2023-08-28 22:34:28 +03:00
Eugene Sandulenko
3bf4795c20
AGS: Added missing license headers 2023-08-28 21:22:18 +02:00
Eugene Sandulenko
8f5a157b84
NEWS: Fix indentation 2023-08-28 21:22:04 +02:00
Eugene Sandulenko
ace85f1cac
NEWS: Mention new CPU blending routinnes in ManagedSurface and in AGS. 2023-08-28 21:21:06 +02:00
Wyatt Radkiewicz
742f1f296d AGS: Fixed code formatting 2023-08-28 21:16:42 +02:00
wyatt-radkiewicz
b22e073e35 AGS: Added AVX2 support for blending functions 2023-08-28 21:16:42 +02:00
wyatt-radkiewicz
e416492a06 AGS: Now engine can detect AVX2 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
1cf3c7832a AGS: GRAPHICS: SIMD blending refactoring
Here I moved the simd paths to their own translation units and removed
their unessesary header files. I also made it so that less of the
translation units have template forward declarations.

I made it so that surface.cpp now chooses at runtime what simd path it
should take.
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
1dfbaa35c5 AGS: GRAPHICS: Moved duplicate code to DrawInnerArgs 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
bc20c0185d AGS: GRAPHICS: Changed bending functions templates 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
153afb1081 AGS: Cleaned up blending funcs argument passing 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
cf358fbc4e BUILD: AGS removed PPC blending files 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
a1858e31f0 AGS: JANITORIAL: Cleaned up old bliting files 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
6c353ba72b AGS: Use main SIMD detection features 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
29a0903e5b AGS: Holding off PowerPC blitting optimizations
I'm taking GSOC in a slightly different direction. I will finish the
PowerPC blending/blitting optimizations, but first I'm going to focus
on the general Graphics::Surface and Graphics::ManagedSurface code for
now.
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
f88d3633b4 AGS: Still trying to get PPC to compile 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
ef265e68dd AGS: Still trying to get PPC to compile 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
89fef524b8 AGS: Fixed more compiling issues for blitting PPC
PowerPC's <altivec.h> header redefines bool to be __vector(4) __bool which
is weird, so I changed the prototypes of the functions to use int instead
of bool. Hopefully this fixes things.
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
01fa027296 AGS: Still trying to get PPC blitting to compile 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
f5908486b9 AGS: Still trying to get PPC blitting to compile 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
0f6da5b299 AGS: Still fixing PowerPC blitting issues 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
f53e39bac4 AGS: Fixed last commit 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
bdbceeb674 AGS: Fixed PowerPC code not compiler under GCC 6.59.21 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
ff72736c49 AGS: PowerPC Altivec: initial support 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
33cb39c2e8 AGS: Appeasing iOS compiler again 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
9c11912da9 AGS: Not using Arm NEON on iOS sim. or Arm Windows
Not all of Arm NEON intrinsics aren't included in the iOS simulator's
arm_neon.h file, so we just don't compile arm neon for the simulator
anymore. Also, arm_neon.h on Windows seems to be just an empty header
or atleast a header with only a few intrinsics of the many that should
be there.
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
b3681c5cb3 AGS: Making MSVC and iOS compilers happy
Made it so that iOS doesn't use Arm NEON since it only supports a very
limited set of instructions (like it apparently doesn't have intrinics
for something as simple as bit shifting?). I also changed every float
literal in surface_simd_sse from a double literal to float because
windows x64 was complaining about it.
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
def889099e AGS: Added check for MSVC specific macros in simd
I was using just the GCC and CLANG macros to see what platform SCUMMVM
was being compiled on, but neglected the MSVC ones. This would lead it
to not compile on that compiler. I fixed that by adding those. I also
added the fallback simd implementation .cpp file into module.mk for the
ags engine.
2023-08-28 21:16:42 +02:00
wyatt-radkiewicz
ace1a346cc AGS: Finished SSE2 blending optimizations
Finished writing the code in surface_simd_sse.cpp. I also added a backup
option in case no processor simd extensions are found. In that case it
just defualts to the normal drawInnerGeneric. I also made
drawInnerGeneric a bit faster by moving certain things into compile
time. Tests were changed to also include SSE2.
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
87656d66df AGS: Cleaned up blending/blitting pull request. 2023-08-28 21:16:42 +02:00
wyatt-radkiewicz
acc818a0cb AGS: Intel/AMD's SIMD path goes to the normal one. 2023-08-28 21:16:42 +02:00
wyatt-radkiewicz
45f093f4be AGS: Fixed SSE2 detector and unoptimized draw. 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
0d29563122 AGS: Started on SSE version 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
90df6233f8 AGS: Put comments in NEON blitting/blending code. 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
b177d382b6 AGS: Moved arm neon bitmap code to new file. 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
673cb4d659 AGS: Optimizations turns off if SSE is not found. 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
a22396163f AGS: Created test code for blending modes 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
4ad7a30b38 AGS: Just fixed kTintBlenderMode 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
07107b19bd AGS: Fixed ARGB blending and finished benchmark 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
d5b2cd4aea AGS: Added SIMD optimizations for stretchedDraw 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
499dfd7d7a AGS: Added 2Bpp specifc code path optimization
Added a template specialization for 2bpp to 2bpp blits in
BITMAP::drawInner, makes 2bpp to 2bpp now around 2 times as fast as
normal 4bpp to 4bpp blitting.
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
6c3c94b7ff AGS: Cleaning up and micro optimizations on bitmap
Added the micro optimizations to BITMAP::draw (on all blending modes and
combinations of source and destination pixel formats).
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
dc6f6070b2 AGS: Finished first full version of optimizations
Optimized most if not all code paths in BITMAP::draw. All blending modes
have been optimized with ARM NEON intrensics, and multiple different
source and destination formats are optimized. (for bytes per pixel the
following have been optimized, 1 and 1, 2 and 2, 4 and 4, 2 and 4).
After this, I am going to clean up this code and apply more optmizations
where I can, then make the SSE versions of the functions, and try to
optimize the slow path as much as I can. Then I will see what I can do
with BITMAP::stretched draw.
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
1e47d7fc56 AGS: Accounted for hflip in drawing optimizations
Just added code to make the SIMD BITMAP::draw to make it work when art
is flipped.
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz
b7505b93c5 AGS: Optimized the kRgbToRgbBlend 32 bit code path
Fixed the blending code and it should now be 1 to 1 with the original
allegro source code but just using simd intrensics.
2023-08-28 21:16:42 +02:00