This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch v-1.29
in repository efl.

View the commit online.

commit b8de6c86f392af0698ff7e91ffbca99d050878f6
Author: Cedric BAIL <[email protected]>
AuthorDate: Wed Nov 18 16:40:25 2026 -0600

    evas: take cpu features from eina only
    
    The EVAS_CPU_NO_* variables masked features in evas alone, so setting
    one left ector and the draw library on the very path being ruled out,
    with nothing to say so. EINA_CPU_DISABLE now covers every library;
    the evas variables are gone and no longer have any effect.
    EVAS_NEON_DISABLE stays: it selects single NEON kernels, not features.
    
    The AltiVec check passed the evas bit to eina, where that bit is
    EINA_CPU_SSE3, so AltiVec could never be enabled on PowerPC. ARM and
    PowerPC builds are untested here.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 src/lib/evas/common/evas_cpu.c         | 49 +++++++---------------------------
 src/static_libs/draw/draw_main_neon.c  |  1 -
 src/tests/evas/evas_test_cpu_disable.c | 34 +++++++++++++++++++++++
 src/tests/evas/meson.build             | 25 +++++++++++++++++
 4 files changed, 69 insertions(+), 40 deletions(-)

diff --git a/src/lib/evas/common/evas_cpu.c b/src/lib/evas/common/evas_cpu.c
index 76e442c0ac..eb0e0aff87 100644
--- a/src/lib/evas/common/evas_cpu.c
+++ b/src/lib/evas/common/evas_cpu.c
@@ -46,59 +46,30 @@ evas_common_cpu_init(void)
    if (called) return;
    called = 1;
 #ifdef BUILD_MMX
-   if (getenv("EVAS_CPU_NO_MMX"))
-     cpu_feature_mask &= ~CPU_FEATURE_MMX;
-   else
-     cpu_feature_mask |= _cpu_check(EINA_CPU_MMX) * CPU_FEATURE_MMX;
-   if (getenv("EVAS_CPU_NO_MMX2"))
-     cpu_feature_mask &= ~CPU_FEATURE_MMX2;
-   else /* It seems "MMX2" is actually part of SSE (and 3DNow)? */
-     cpu_feature_mask |= _cpu_check(EINA_CPU_SSE) * CPU_FEATURE_MMX2;
-   if (getenv("EVAS_CPU_NO_SSE"))
-     cpu_feature_mask &= ~CPU_FEATURE_SSE;
-   else
-     cpu_feature_mask |= _cpu_check(EINA_CPU_SSE) * CPU_FEATURE_SSE;
+   cpu_feature_mask |= _cpu_check(EINA_CPU_MMX) * CPU_FEATURE_MMX;
+   /* It seems "MMX2" is actually part of SSE (and 3DNow)? */
+   cpu_feature_mask |= _cpu_check(EINA_CPU_SSE) * CPU_FEATURE_MMX2;
+   cpu_feature_mask |= _cpu_check(EINA_CPU_SSE) * CPU_FEATURE_SSE;
 # ifdef BUILD_SSE3
-   if (getenv("EVAS_CPU_NO_SSE3"))
-     cpu_feature_mask &= ~CPU_FEATURE_SSE3;
-   else
-     cpu_feature_mask |= _cpu_check(EINA_CPU_SSE3) * CPU_FEATURE_SSE3;
+   cpu_feature_mask |= _cpu_check(EINA_CPU_SSE3) * CPU_FEATURE_SSE3;
 # endif /* BUILD_SSE3 */
 # ifdef BUILD_AVX2
-   if (getenv("EVAS_CPU_NO_AVX2"))
-     cpu_feature_mask &= ~CPU_FEATURE_AVX2;
-   else
-     cpu_feature_mask |= _cpu_check(EINA_CPU_AVX2) * CPU_FEATURE_AVX2;
+   cpu_feature_mask |= _cpu_check(EINA_CPU_AVX2) * CPU_FEATURE_AVX2;
 # endif /* BUILD_AVX2 */
 #endif /* BUILD_MMX */
 
 #ifdef BUILD_ALTIVEC
-   if (getenv("EVAS_CPU_NO_ALTIVEC"))
-     cpu_feature_mask &= ~CPU_FEATURE_ALTIVEC;
-   else
-     cpu_feature_mask |= _cpu_check(CPU_FEATURE_ALTIVEC) * CPU_FEATURE_ALTIVEC;
+   cpu_feature_mask |= _cpu_check(EINA_CPU_ALTIVEC) * CPU_FEATURE_ALTIVEC;
 #endif /* BUILD_ALTIVEC */
 
-#if defined(__ARM_ARCH__)
+#if defined(__ARM_ARCH__) || defined(__aarch64__)
 # ifdef BUILD_NEON
-   if (getenv("EVAS_CPU_NO_NEON"))
-     cpu_feature_mask &= ~CPU_FEATURE_NEON;
-   else
-     cpu_feature_mask |= _cpu_check(EINA_CPU_NEON) * CPU_FEATURE_NEON;
+   cpu_feature_mask |= _cpu_check(EINA_CPU_NEON) * CPU_FEATURE_NEON;
 # endif
 #endif
 
 #if defined(__aarch64__)
-# ifdef BUILD_NEON
-   if (getenv("EVAS_CPU_NO_NEON"))
-     cpu_feature_mask &= ~CPU_FEATURE_NEON;
-   else
-     cpu_feature_mask |= CPU_FEATURE_NEON;
-# endif
-   if (getenv("EVAS_CPU_NO_SVE"))
-     cpu_feature_mask &= ~CPU_FEATURE_SVE;
-   else
-     cpu_feature_mask |= _cpu_check(EINA_CPU_SVE) * CPU_FEATURE_SVE;
+   cpu_feature_mask |= _cpu_check(EINA_CPU_SVE) * CPU_FEATURE_SVE;
 #endif
    _neon_disable_parse();
 }
diff --git a/src/static_libs/draw/draw_main_neon.c b/src/static_libs/draw/draw_main_neon.c
index 1c3a911d9c..24b3d0146a 100644
--- a/src/static_libs/draw/draw_main_neon.c
+++ b/src/static_libs/draw/draw_main_neon.c
@@ -217,7 +217,6 @@ void
 efl_draw_neon_init(void)
 {
 #ifdef BUILD_NEON
-   if (getenv("EVAS_CPU_NO_NEON")) return; // compat with evas env vars
    if (eina_cpu_features_get() & EINA_CPU_NEON)
      {
         // update the comp_function table for solid color
diff --git a/src/tests/evas/evas_test_cpu_disable.c b/src/tests/evas/evas_test_cpu_disable.c
new file mode 100644
index 0000000000..d8c6be1eef
--- /dev/null
+++ b/src/tests/evas/evas_test_cpu_disable.c
@@ -0,0 +1,34 @@
+/* Evas takes its cpu features from eina, so EINA_CPU_DISABLE reaches the
+ * evas software paths too. Evas reads the features once per process, at its
+ * first init, so this runs as its own program with the variable set before
+ * that rather than inside evas_suite. */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <Evas.h>
+
+#include "evas_common_private.h"
+
+int
+main(void)
+{
+   int mmx = -1, sse = -1, sse2 = -1;
+
+   setenv("EINA_CPU_DISABLE", "mmx,sse", 1);
+   evas_init();
+   evas_common_cpu_can_do(&mmx, &sse, &sse2);
+   evas_shutdown();
+
+   if (mmx || sse)
+     {
+        fprintf(stderr, "EINA_CPU_DISABLE=mmx,sse left evas with mmx=%d sse=%d\n",
+                mmx, sse);
+        return 1;
+     }
+   return 0;
+}
diff --git a/src/tests/evas/meson.build b/src/tests/evas/meson.build
index 36a7610909..4d7d13e8e6 100644
--- a/src/tests/evas/meson.build
+++ b/src/tests/evas/meson.build
@@ -41,6 +41,31 @@ test('evas-suite', evas_suite,
   timeout : master_timeout
 )
 
+# The stable Efl.Canvas.Object_Animation mixin must be reachable from
+# <Efl_Canvas.h> without the beta macro, which the project adds to every
+# target.
+evas_stable_headers = executable('evas_stable_headers',
+  'evas_test_stable_headers.c',
+  dependencies: [evas],
+  c_args : ['-UEFL_BETA_API_SUPPORT']
+)
+
+test('evas-stable-headers', evas_stable_headers,
+  env : test_env,
+  timeout : master_timeout
+)
+
+evas_cpu_disable = executable('evas_cpu_disable',
+  ['evas_test_cpu_disable.c'],
+  dependencies: [evas_bin, evas, evas_ext_none_static_deps, eet], #internal headers, as below
+  c_args : ['-DEVAS_BUILD']
+)
+
+test('evas-cpu-disable', evas_cpu_disable,
+  env : test_env,
+  timeout : master_timeout
+)
+
 # Compares every C/NEON pair in the evas span and point op tables. It includes
 # the op translation units directly rather than linking them, because the copy
 # tables are static; that keeps the library itself untouched. Skips (exit 77)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to