17 Commits

Author SHA1 Message Date
Wyatt Radkiewicz
0597770654 GRAPHICS: Refactor BlendBlit 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
41a942c5ce ALL: Renamed TS_ARGB to MS_ARGB 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
ad0c823f2f GRAPHICS: TransparentSurface scales in place
TransparentSurface now scales in place instead of making a copy. This
is much faster than before.
Also BlendBlit::blit now takes a scale offset parameter to help with
vary large images being cropped, otherwise people can leave it to 0.
2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
a18332ab36 JANITORIAL: Touch up BlendBlit comments 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
39f7202473 GRAPHICS: Add AVX2 support for BlendBlit 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
e4c984cd3a BUILD: Configure flags for SIMD extensions
--enable-ext-neon
--enable-ext-sse2
--enable-ext-avx2
2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
c2e4fc9b6a GRAPHICS: SSE2 for BlendBlit and fix NEON bug 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
c2c7ca0275 GRAPHICS: BlendBlit NEON blending modes coded 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
eebadf4495 GRAPHICS: Optimize alpha blend NEON and Generic
I optimized the NEON and Generic paths for ManagedSurface::blendBlitFrom
and the new TransparentSurface::blit. Now (on arm), the new blit function
matches the speed of the old blit function even with the added
inderections that the runtime extension detection code adds in.

Other than that, I made a benchmark for this code and you can make it
using this command:
CFLAGS="-DTEST_BLEND_SPEED" make test

I reverted wii to not use altivec anymore since it doesn't.

I also removed graphics/blit-neon.cpp from graphics/module.mk because
simply including the .cpp file in graphics/blit-alpha.cpp was a better
option because then I didn't need to instantiate every version of the
templates that I needed.
2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
402c67064d GRAPHICS: BlendBlit detects cpu extensions 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
e7cd583e9f GRAPHICS: Refactor blendBlitUnfiltered
ALL: Fixed last commit not compiling :(

GRAPHICS: Refactoring BlendBlit for SIMD
2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
d36e603864 GRAPHICS: ManagedSurface::blendBlitFrom started on 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
d03727885a GRAPHICS: Created blendBlitFrom in ManagedSurface 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
710d9cb954 JANITORIAL: Moved blitting to blit-alpha.cpp
Moved lower level blitting functions used by Graphics::TransparentSurface
into blit-alpha.cpp and moved their corresponding declarations into blit.h.
2023-08-13 00:22:10 +02:00
Cameron Cawley
f5f445be5f GRAPHICS: Add generic versions of applyColorKey() and setAlpha() 2023-04-09 12:49:23 +02:00
Cameron Cawley
380643315e GRAPHICS: Support flipping in scaleBlit and rotoscaleBlit 2023-02-05 23:14:35 +01:00
Cameron Cawley
7f2d9fd0fd GRAPHICS: Split conversion.cpp into multiple files 2022-12-22 23:45:14 +01:00