[dense] Add compilation fixes for meson
* builds/meson/parse_modules_cfg.py: Add dense module * meson.build: Add SSE flags to ft2_defines, -lm to link_args * src/dense/ftdense.c: Fixes for compilation errors
This commit is contained in:
parent
cf779f5fbf
commit
1bf65eff60
|
@ -87,6 +87,7 @@ def generate_ftmodule(lists):
|
||||||
names = {
|
names = {
|
||||||
"raster": ("ft_raster1",),
|
"raster": ("ft_raster1",),
|
||||||
"smooth": ("ft_smooth",),
|
"smooth": ("ft_smooth",),
|
||||||
|
"dense": ("ft_dense",),
|
||||||
"svg": ("ft_svg",),
|
"svg": ("ft_svg",),
|
||||||
"sdf": ("ft_sdf", "ft_bitmap_sdf"),
|
"sdf": ("ft_sdf", "ft_bitmap_sdf"),
|
||||||
}.get(module)
|
}.get(module)
|
||||||
|
|
|
@ -395,6 +395,13 @@ if use_unix_ftsystem_c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
if cc.get_id() == 'msvc'
|
||||||
|
ft2_defines += ['/arch:AVX']
|
||||||
|
else
|
||||||
|
ft2_defines += ['-msse4.1']
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
ft2_lib = library('freetype',
|
ft2_lib = library('freetype',
|
||||||
sources: ft2_sources + [ftmodule_h],
|
sources: ft2_sources + [ftmodule_h],
|
||||||
c_args: ft2_defines,
|
c_args: ft2_defines,
|
||||||
|
@ -403,7 +410,7 @@ ft2_lib = library('freetype',
|
||||||
dependencies: ft2_deps,
|
dependencies: ft2_deps,
|
||||||
install: true,
|
install: true,
|
||||||
version: ft2_so_version,
|
version: ft2_so_version,
|
||||||
link_args: common_ldflags,
|
link_args: common_ldflags + ['-lm'],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ dense_render_line( dense_worker* worker, FT_Pos tox, FT_Pos toy )
|
||||||
{
|
{
|
||||||
int linestart = y * worker->m_w;
|
int linestart = y * worker->m_w;
|
||||||
|
|
||||||
FT26D6 dy = min( (y + 1)<<6, to_y ) - max( y<<6, from_y );
|
FT26D6 dy = FT_MIN( (y + 1)<<6, to_y ) - FT_MAX( y<<6, from_y );
|
||||||
|
|
||||||
m_a[linestart + x0i] += dir*dy*(64 - x + x0floor);
|
m_a[linestart + x0i] += dir*dy*(64 - x + x0floor);
|
||||||
m_a[linestart + ( x0i + 1 )] += dir*dy*(x-x0floor);
|
m_a[linestart + ( x0i + 1 )] += dir*dy*(x-x0floor);
|
||||||
|
@ -457,7 +457,7 @@ __m128i offset = _mm_setzero_si128();
|
||||||
// shuffle
|
// shuffle
|
||||||
y = _mm_shuffle_epi8( y, mask );
|
y = _mm_shuffle_epi8( y, mask );
|
||||||
|
|
||||||
_mm_store_ss( (float*)&dest[i], (__m128)y );
|
_mm_store_ss( (float*)&dest[i], _mm_castsi128_ps(y) );
|
||||||
|
|
||||||
// store the current prefix sum in offset
|
// store the current prefix sum in offset
|
||||||
offset = _mm_castps_si128( _mm_shuffle_ps( _mm_castsi128_ps( x ),
|
offset = _mm_castps_si128( _mm_shuffle_ps( _mm_castsi128_ps( x ),
|
||||||
|
|
Loading…
Reference in New Issue