File tree Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Original file line number Diff line number Diff line change 2727#include "_pygame.h"
2828#include "surface.h"
2929
30+ // Some simd compat stuff going here for now.
31+ #if PG_SDL3
32+ // SDL3 no longer includes intrinsics by default, we need to do it explicitly
33+ #include <SDL3/SDL_intrin.h>
34+
35+ /* If SDL_AVX2_INTRINSICS is defined by SDL3, we need to set macros that our
36+ * code checks for avx2 build time support */
37+ #ifdef SDL_AVX2_INTRINSICS
38+ #ifndef HAVE_IMMINTRIN_H
39+ #define HAVE_IMMINTRIN_H 1
40+ #endif /* HAVE_IMMINTRIN_H*/
41+ #ifndef __AVX2__
42+ #define __AVX2__
43+ #endif /* __AVX2__*/
44+ #endif /* SDL_AVX2_INTRINSICS*/
45+
46+ // TODO reenable this to test best
47+ #ifdef SDL_SSE2_INTRINSICS
48+ #ifndef __SSE2__
49+ #define __SSE2__
50+ #endif /* __SSE2__*/
51+ #endif /* SDL_SSE2_INTRINSICS*/
52+ #endif /* PG_SDL3 */
53+
3054#endif
Original file line number Diff line number Diff line change 11#define NO_PYGAME_C_API
22#include "_surface.h"
33
4- /* TODO: This compat code should probably go in some place like simd_shared.h
5- * That header file however is inconsistently used at the moment and not
6- * included wherever it should be.
7- * this block will be needed by simd_blitters and simd_fill */
8-
9- #if PG_SDL3
10- // SDL3 no longer includes intrinsics by default, we need to do it explicitly
11- #include <SDL3/SDL_intrin.h>
12-
13- /* If SDL_AVX2_INTRINSICS is defined by SDL3, we need to set macros that our
14- * code checks for avx2 build time support */
15- #ifdef SDL_AVX2_INTRINSICS
16- #ifndef HAVE_IMMINTRIN_H
17- #define HAVE_IMMINTRIN_H 1
18- #endif /* HAVE_IMMINTRIN_H*/
19- #endif /* SDL_AVX2_INTRINSICS*/
20- #endif /* PG_SDL3 */
21-
224/**
235 * MACRO borrowed from SSE2NEON - useful for making the shuffling family of
246 * intrinsics easier to understand by indicating clearly what will go where.
You can’t perform that action at this time.
0 commit comments