Commit Graph
320 Commits
Author SHA1 Message Date
Kaloyan Chehlarski e10081f29b AGS: Re-add include guard for NEON path cpp file
This was mistakenly removed previously, but it seems that
without it the iOS backend breaks.
2023-10-16 13:23:04 +03:00
Kaloyan Chehlarski 33a1b1738b AGS: Don't skip drawing last line in optimized blit paths
Fixed an oversight in the code which would result in scaled
blits skipping the last line.
2023-10-16 13:23:04 +03:00
Kaloyan Chehlarski 5b29081355 AGS: Apply clipping fix to 2bpp optimized blitting
The issue that produced crashes when blitting beyond the
bottom-right edge of the screen was previously fixed,
but only for cases involving a 4bpp surface. The fix has
now been extended to the 2bpp functions as well.
2023-10-14 14:27:55 +03:00
Kaloyan Chehlarski 18a34cb7af AGS: Fix AVX2 scaled blitting
Scaled blitting in the AVX2 path would immediately crash
ScummVM, due to a couple of incorrect increments inside
a for-loop; this has now been fixed.
2023-10-14 14:27:54 +03:00
Kaloyan Chehlarski d6d65273c0 AGS: Allow usage of AVX2 optimized blit path
The previous design of the optimized paths used the same
name for the dummy class used to access BITMAP's private
members. On machines that support AVX2 this meant that
the SSE2 path would shadow the AVX2 one, and make it
inaccessible unless the configure script specifically
disabled SSE2 extensions.
The dummy class has now been split into three, one
for each of the optimization paths; those dummy classes
now contain all of the internal functions to avoid potential
name clashes; and finally, all the internal functions have
been marked as static.
2023-10-14 14:27:54 +03:00
Kaloyan Chehlarski 5214d921c4 AGS: Fix edge case in Allegro optimized blit clipping
This fixes a (literal) edge case that was introduced in the last
attempt at fixing the clipping issues that would crash
ScummVM when a sprite is drawn at the bottom right of
the screen. In particular, the specific Y value that would
result in only one row of the sprite being off screen no
longer produces a crash.
2023-10-14 14:27:54 +03:00
Kaloyan Chehlarski b902f61b3f AGS: Fix AVX2 blitting
The AVX2 path was previously completely broken, as all
blitting produced an alternating pattern of 4 correctly
blitted colors, followed by 4 black pixels. The intrinsics used
in the pixel drawing code have been changed so this is no
longer the case.
2023-10-12 12:42:28 +03:00
Kaloyan Chehlarski 1c34e1c614 AGS: Fix for surface blitting-related crashes
This is a second attempt at fixing the crashes that pop up
when attempting to blit past the bottom-right corner of a
surface. The previous commit caused a bunch of surfaces
to not blit their last row, and introduced more drawing
errors in scrolling scenes. Also, made sure the size check in
AVX2 code is 8 bytes everywhere, as this was also likely to
cause issues.
2023-10-07 23:32:11 +03:00
Kaloyan Chehlarski 8fc73a36a6 Revert "AGS: Fix blitting-related crash"
This reverts commit e2720d39f3.
The changes were based on a wrong assumption on where
the issue actually lies, and introduced a new problem:
some surfaces' bottom rows were getting entirely skipped.
2023-10-07 23:32:11 +03:00
Kaloyan Chehlarski d542838664 Revert "AGS: Fix clipping issue in blitting code"
This reverts commit 90beb8887e.
The changes were based on a wrong assumption on
where the issue lies, and also introduced even buggier
behavior in scrolling scenes.
2023-10-07 23:32:10 +03:00
Kaloyan Chehlarski 7f84df864d AGS: Fix incorrect format check in generic blitting code
This fixes a bunch of errors in 5 Days a Stranger (and all other
games with 16-bit surfaces), including leaked memory and
incorrectly displayed text.
2023-10-07 23:32:10 +03:00
Kaloyan Chehlarski e2720d39f3 AGS: Fix blitting-related crash
Fixed an off-by-one error in the non-scaling blit code, which
would result in an attempt to draw to one row beyond the
bounds of the dest surface (affects only the optimized paths).
2023-10-07 14:45:31 +03:00
Kaloyan Chehlarski 90beb8887e AGS: Fix clipping issue in blitting code
Fixed a clipping issue that would crash ScummVM when
attempting to blit to a surface with a negative dest x
(affecting both the optimized and non-optimized paths).
2023-10-07 14:45:22 +03:00
Eugene Sandulenko 94755eb838 BUILD: MACOS: Fix building with NEON enabled 2023-09-03 22:47:00 +02:00
Walter Agazzi 7279c8a540 AGS: Freetype: Trim include paths 2023-09-03 22:27:43 +02:00
Walter Agazzi 85db570098 AGS: Freetype: Remove unused variable 2023-09-03 22:27:43 +02:00
Walter Agazzi 4a33374939 AGS: Freetype: Use scummvm logging in autohint debug functions
These two functions are not actually used, but still nice to have
2023-09-03 22:27:43 +02:00
Walter Agazzi ccf816a83a AGS: Freetype: Use scummvm debug logging 2023-09-03 22:27:43 +02:00
Walter Agazzi c08d7492c4 AGS: Freetype: Remove unneeded debugging directives 2023-09-03 22:27:43 +02:00
Walter Agazzi 1d7b009638 AGS: Freetype: Remove newline from warnings 2023-09-03 22:27:43 +02:00
Walter Agazzi 1698b26bcb AGS: Freetype: remove unneeded files 2023-09-03 22:27:43 +02:00
Walter Agazzi d2e445fc49 AGS: Freetype: apply autohinting in alfont glyph loader 2023-09-03 22:27:43 +02:00
Walter Agazzi cee11c1b99 AGS: Freetype: Update alfont and enable compilation 2023-09-03 22:27:43 +02:00
Walter Agazzi cc168a16dd AGS: Freetype: Disable uncompilable code in ahhint 2023-09-03 22:27:43 +02:00
Walter Agazzi 4843b18fb2 AGS: Freetype: Use FT_Memory in ah_hinter_new 2023-09-03 22:27:43 +02:00
Walter Agazzi a0211934db AGS: Freetype: Fix headers/declarations ahhint 2023-09-03 22:27:43 +02:00
Walter Agazzi b318122139 AGS: Freetype: Fix headers/declarations ahglyph 2023-09-03 22:27:43 +02:00
Walter Agazzi 35b82f7c8f AGS: Freetype: Cleanup ahglyph/ahhint/ahloader headers 2023-09-03 22:27:43 +02:00
Walter Agazzi 7b39ad094a AGS: Freetype: Fix includes in ahtypes 2023-09-03 22:27:43 +02:00
Walter Agazzi 5ea6b4c048 AGS: Freetype: Fix includes/declarations in ahangles / ahglobal 2023-09-03 22:27:43 +02:00
Walter Agazzi c2ee3b8b34 AGS: Freetype: Add required FT_SubGlyph type to ftgloadr 2023-09-03 22:27:43 +02:00
Walter Agazzi 365e74d51f AGS: Freetype: Clean up ftgloadr.h/cpp 2023-09-03 22:27:43 +02:00
Walter Agazzi 4c020ac290 AGS: Freetype: Add minimal fterrors and cleanup ftutil 2023-09-03 22:27:43 +02:00
Walter Agazzi 63fd2b928a AGS: Import glyph loader and some helpers from freetype2.1.3 2023-09-03 22:27:43 +02:00
Walter Agazzi e4548cf1d7 AGS: Import autohinter module from freetype2.1.3 2023-09-03 22:27:43 +02:00
Lars Sundström db192eed39 AGS: Add SCUMMVM_NEON prepreocessor flag to surface_neon.cpp
The surface_neon.cpp file is only added to the project if the flag
SCUMMVM_NEON is defined. However some backends, e.g. iOS, adds the
definition of SCUMMVM_NEON in create_project so the file can be
added to the project during configuration.
The same backend can then unset the definition due to changing
build target, the iOS simulator in this example, which runs can
run on x86_64 hosts which doesn't support NEON.

Since the project still include the source file it will be compiled.
Make sure to not build the file if not SCUMMVM_NEON is defined at
compile time.
2023-09-03 22:26:37 +02:00
Le Philousophe 22b629eeaa AGS: Fix build
vceqq_f32 must be used when comparing float32x4_t
2023-08-30 13:38:13 +02:00
Wyatt Radkiewicz 487512b60f AGS: GRAPHICS: Fix NEON compiling errors on switch 2023-08-30 09:22:05 +03:00
Wyatt Radkiewicz c925852209 AGS: GRAPHICS: Remove a32/a64 specific NEON code 2023-08-30 00:17:00 +02:00
Wyatt Radkiewicz 2c8c449001 AGS: GRAPHICS: Only use 32bit fp math for NEON
Change argbBlendSIMD to only use 32bit floating point math when
compiling for armv7 or under.
2023-08-29 21:51:36 +02:00
Eugene Sandulenko 3bf4795c20 AGS: Added missing license headers 2023-08-28 21:22:18 +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 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 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