forked from enlightenment/efl
evas/blend - disable neon code.
Current neon code is a little buggy, the blend won't be done correctly. so leave the c code depends on the compiler optimization.
This commit is contained in:
parent
9f98ddae46
commit
aede29e2d4
|
@ -556,7 +556,7 @@ case $host_cpu in
|
||||||
build_cpu_neon="yes"
|
build_cpu_neon="yes"
|
||||||
AC_MSG_CHECKING([whether to use NEON instructions])
|
AC_MSG_CHECKING([whether to use NEON instructions])
|
||||||
CFLAGS_save="${CFLAGS}"
|
CFLAGS_save="${CFLAGS}"
|
||||||
CFLAGS="${CFLAGS} -mfpu=neon"
|
CFLAGS="${CFLAGS} -mfpu=neon -ftree-vectorize"
|
||||||
AC_TRY_COMPILE([#include <arm_neon.h>],
|
AC_TRY_COMPILE([#include <arm_neon.h>],
|
||||||
[asm volatile ("vqadd.u8 d0, d1, d0\n")],
|
[asm volatile ("vqadd.u8 d0, d1, d0\n")],
|
||||||
[
|
[
|
||||||
|
|
|
@ -1,9 +1,25 @@
|
||||||
/* blend pixel x color --> dst */
|
/* blend pixel x color --> dst */
|
||||||
#ifdef BUILD_NEON
|
#ifdef BUILD_NEON
|
||||||
|
|
||||||
|
#include <arm_neon.h>
|
||||||
|
|
||||||
/* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of
|
/* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of
|
||||||
* reads, then two writes, a miss on read is 'just' two reads */
|
* reads, then two writes, a miss on read is 'just' two reads */
|
||||||
static void
|
static void
|
||||||
_op_blend_p_c_dp_neon(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c, DATA32 *d, int l) {
|
_op_blend_p_c_dp_neon(DATA32 * __restrict s, DATA8 *m EINA_UNUSED, DATA32 c, DATA32 * __restrict d, int l) {
|
||||||
|
|
||||||
|
/* Current this neon code is a little buggy, color blending won't be done
|
||||||
|
correctly. So leave the code depend on the compilier optimization. */
|
||||||
|
#if 1
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < l; i++)
|
||||||
|
{
|
||||||
|
DATA32 sc = MUL4_SYM(c, s[i]);
|
||||||
|
alpha = 256 - (sc >> 24);
|
||||||
|
d[i] = sc + MUL_256(alpha, d[i]);
|
||||||
|
}
|
||||||
|
#else
|
||||||
#define AP "blend_p_c_dp_"
|
#define AP "blend_p_c_dp_"
|
||||||
asm volatile (
|
asm volatile (
|
||||||
".fpu neon \n\t"
|
".fpu neon \n\t"
|
||||||
|
@ -186,6 +202,7 @@ _op_blend_p_c_dp_neon(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c, DATA32 *d, int
|
||||||
: "q0","q1","q2","q3","q4","q5","q6","q7","memory"
|
: "q0","q1","q2","q3","q4","q5","q6","q7","memory"
|
||||||
);
|
);
|
||||||
#undef AP
|
#undef AP
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue