Skip to content

Commit

Permalink
SDL_intrin.h: workaround clang-cl failures when avx isn't enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Mar 21, 2023
1 parent 5d4d11f commit f5a9209
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/SDL3/SDL_intrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,23 @@ _m_prefetch(void *__P)
# define SDL_SSE4_2_INTRINSICS 1
# include <nmmintrin.h>
# endif
# if defined(__clang__) && (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX__) && !defined(SDL_DISABLE_AVX)
# define SDL_DISABLE_AVX /* see https://reviews.llvm.org/D20291 and https://reviews.llvm.org/D79194 */
# endif
# if (defined(_MSC_VER) || defined(__AVX__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_AVX)
# define SDL_AVX_INTRINSICS 1
# include <immintrin.h>
# endif
# if defined(__clang__) && (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX2__) && !defined(SDL_DISABLE_AVX2)
# define SDL_DISABLE_AVX2 /* see https://reviews.llvm.org/D20291 and https://reviews.llvm.org/D79194 */
# endif
# if (defined(_MSC_VER) || defined(__AVX2__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_AVX2)
# define SDL_AVX2_INTRINSICS 1
# include <immintrin.h>
# endif
# if defined(__clang__) && (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX512F__) && !defined(SDL_DISABLE_AVX512F)
# define SDL_DISABLE_AVX512F /* see https://reviews.llvm.org/D20291 and https://reviews.llvm.org/D79194 */
# endif
# if (defined(_MSC_VER) || defined(__AVX512F__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_AVX512F)
# define SDL_AVX512F_INTRINSICS 1
# include <immintrin.h>
Expand Down

0 comments on commit f5a9209

Please sign in to comment.