diff --git a/include/SDL3/SDL_intrin.h b/include/SDL3/SDL_intrin.h index 4136c3ca97..b9ba3289f8 100644 --- a/include/SDL3/SDL_intrin.h +++ b/include/SDL3/SDL_intrin.h @@ -90,6 +90,29 @@ * * If this macro is defined, SDL will only included `` when * the compiler defines __ARM_FEATURE_SVE. + * + * If you want to use SVE intrinsics, please check the guidance below: + * + * a. Check whether existing SVE dedicated C source files are the right + * place for your code. If so, please go to step f. + * b. Create dedicated C source files for your code. + * c. Add your C source files to the SVE2 section in CMakeLists.txt. + * d. Create a compilation protection scope using SDL_SVE2_INTRINSICS + * in your C source files after including SDL_internal.h. + * e. Include arm_sve.h inside the scope mentioned above as shown below: + * + * #if defined(SDL_PLATFORM_ANDROID) && SDL_PLATFORM_ANDROID + * # ifndef __ARM_FEATURE_SVE + * # define __ARM_FEATURE_SVE 1 + * # endif + * #endif + * #include + * + * NOTE: SDL encourages placing code in existing C source file. Please + * check with maintainers before creating new C source files. + * + * f. Apply SDL_TARGET("arch=armv8-a+sve2") or equivalent to individual + * functions you added inside the SDL_SVE2_INTRINSICS protected scope. * * \since This macro is available since SDL 3.6.0. */