From eb3915ddd3415de512294d37310db6d164b7ec47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= Date: Sat, 24 Jun 2023 09:16:57 +0200 Subject: [PATCH 1/2] alphablit: Add env var to warning message --- src_c/alphablit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src_c/alphablit.c b/src_c/alphablit.c index 29b0351c54..9541d7d888 100644 --- a/src_c/alphablit.c +++ b/src_c/alphablit.c @@ -3010,7 +3010,10 @@ premul_surf_color_by_alpha_non_simd(SDL_Surface *src, SDL_Surface *dst) PyExc_RuntimeWarning, \ "Your system is " #s " capable but pygame was not " \ "built with support for it. The performance of some " \ - "of your blits could be adversely affected", \ + "of your blits could be adversely affected. Consider" \ + " enabling compile time detection with environment " \ + "variables like PYGAME_DETECT_AVX2=1 if you are " \ + "compiling without cross compilation.", \ 1) < 0) { \ return -1; \ } \ From e5907820ff0f117e11d242877229ef5134cdd234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= Date: Sat, 24 Jun 2023 09:41:03 +0200 Subject: [PATCH 2/2] buildconfig: Fix avx2 detection logic to default to False --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e6cd6da32f..8ba0e92b18 100644 --- a/setup.py +++ b/setup.py @@ -84,7 +84,7 @@ } def spawn(self, cmd, **kwargs): - should_use_avx2 = os.environ.get('PYGAME_DETECT_AVX2', '') != '' + should_use_avx2 = False # try to be thorough in detecting that we are on a platform that potentially supports AVX2 machine_name = platform.machine() if ((machine_name.startswith(("x86", "i686")) or