Fixes bug 1296 - SDL_SetVideoMode crashes because of unaligned MOVAPS instruction
authorSam Lantinga <slouken@libsdl.org>
Thu, 29 Dec 2011 05:36:39 -0500
changeset 611666f48d6bf735
parent 6115 d4621a7e0faa
child 6119 1865b52c093d
Fixes bug 1296 - SDL_SetVideoMode crashes because of unaligned MOVAPS instruction

t.grundner@goto3d.de 2011-09-01 03:59:17 PDT
I figured out what is going on. GCC 4.5.2 assumes the stack is 16 byte aligned
by default. Therefore there are no AND alignment corrections necessary if we
wish to align a stack variable to a 16 byte boundary. That is bad if your OS
ABI is not 16 byte aligned. Windows 32 bit stacks are 4 byte aligned. This
results in the above mentioned SIGSEGV. This is also no problem if I compile
both SDL.dll and my app with MingW because MinGW/GCC inserts a

andl $-16, %esp

instruction right in the beginning of the main function. So at least the stack
of the thread calling the main function is 16 byte aligned. But as soon as I
start to use the SDL.dll from an application not compiled by MinGW there is no
ANDL safing my app.

However there is a GCC option that can change the default stack alignment:

-mpreferred-stack-boundary=num

Setting num=2 assumes a the stack is aligned to a 4 byte boundary. This results
in GCC inserting the necessary

andl $-16, %esp

into SDL_FillRect. Rebuilding SDL with

./configure "CFLAGS=-mpreferred-stack-boundary=2 -g -O3"

solved the problem.

IMHO this should also be a problem on Solaris.

The following links contain further information:

http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options

http://www.agner.org/optimize/calling_conventions.pdf
configure
configure.in
include/SDL_config.h
     1.1 --- a/configure	Thu Dec 29 05:18:16 2011 -0500
     1.2 +++ b/configure	Thu Dec 29 05:36:39 2011 -0500
     1.3 @@ -20593,6 +20593,70 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +CheckStackBoundary()
     1.8 +{
     1.9 +    { echo "$as_me:$LINENO: checking for GCC -mpreferred-stack-boundary option" >&5
    1.10 +echo $ECHO_N "checking for GCC -mpreferred-stack-boundary option... $ECHO_C" >&6; }
    1.11 +    have_gcc_preferred_stack_boundary=no
    1.12 +
    1.13 +    save_CFLAGS="$CFLAGS"
    1.14 +    CFLAGS="$save_CFLAGS -mpreferred-stack-boundary=2"
    1.15 +    cat >conftest.$ac_ext <<_ACEOF
    1.16 +/* confdefs.h.  */
    1.17 +_ACEOF
    1.18 +cat confdefs.h >>conftest.$ac_ext
    1.19 +cat >>conftest.$ac_ext <<_ACEOF
    1.20 +/* end confdefs.h.  */
    1.21 +
    1.22 +    int x = 0;
    1.23 +
    1.24 +int
    1.25 +main ()
    1.26 +{
    1.27 +
    1.28 +
    1.29 +  ;
    1.30 +  return 0;
    1.31 +}
    1.32 +_ACEOF
    1.33 +rm -f conftest.$ac_objext
    1.34 +if { (ac_try="$ac_compile"
    1.35 +case "(($ac_try" in
    1.36 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    1.37 +  *) ac_try_echo=$ac_try;;
    1.38 +esac
    1.39 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    1.40 +  (eval "$ac_compile") 2>conftest.er1
    1.41 +  ac_status=$?
    1.42 +  grep -v '^ *+' conftest.er1 >conftest.err
    1.43 +  rm -f conftest.er1
    1.44 +  cat conftest.err >&5
    1.45 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    1.46 +  (exit $ac_status); } && {
    1.47 +	 test -z "$ac_c_werror_flag" ||
    1.48 +	 test ! -s conftest.err
    1.49 +       } && test -s conftest.$ac_objext; then
    1.50 +
    1.51 +    have_gcc_preferred_stack_boundary=yes
    1.52 +
    1.53 +else
    1.54 +  echo "$as_me: failed program was:" >&5
    1.55 +sed 's/^/| /' conftest.$ac_ext >&5
    1.56 +
    1.57 +
    1.58 +fi
    1.59 +
    1.60 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.61 +    { echo "$as_me:$LINENO: result: $have_gcc_preferred_stack_boundary" >&5
    1.62 +echo "${ECHO_T}$have_gcc_preferred_stack_boundary" >&6; }
    1.63 +    CFLAGS="$save_CFLAGS"
    1.64 +
    1.65 +    if test x$have_gcc_preferred_stack_boundary = xyes; then
    1.66 +        EXTRA_CFLAGS="$EXTRA_CFLAGS -mpreferred-stack-boundary=2"
    1.67 +    fi
    1.68 +}
    1.69 +
    1.70 +
    1.71  CheckWarnAll()
    1.72  {
    1.73      { echo "$as_me:$LINENO: checking for GCC -Wall option" >&5
    1.74 @@ -24695,6 +24759,9 @@
    1.75  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.76      { echo "$as_me:$LINENO: result: $have_wince" >&5
    1.77  echo "${ECHO_T}$have_wince" >&6; }
    1.78 +
    1.79 +    # This fixes Windows stack alignment with newer GCC
    1.80 +    CheckStackBoundary
    1.81  }
    1.82  
    1.83  CheckDIRECTX()
     2.1 --- a/configure.in	Thu Dec 29 05:18:16 2011 -0500
     2.2 +++ b/configure.in	Thu Dec 29 05:36:39 2011 -0500
     2.3 @@ -939,6 +939,30 @@
     2.4      fi
     2.5  }
     2.6  
     2.7 +dnl See if GCC's -mpreferred-stack-boundary is supported.
     2.8 +dnl  Reference: http://bugzilla.libsdl.org/show_bug.cgi?id=1296
     2.9 +CheckStackBoundary()
    2.10 +{
    2.11 +    AC_MSG_CHECKING(for GCC -mpreferred-stack-boundary option)
    2.12 +    have_gcc_preferred_stack_boundary=no
    2.13 +
    2.14 +    save_CFLAGS="$CFLAGS"
    2.15 +    CFLAGS="$save_CFLAGS -mpreferred-stack-boundary=2"
    2.16 +    AC_TRY_COMPILE([
    2.17 +    int x = 0;
    2.18 +    ],[
    2.19 +    ],[
    2.20 +    have_gcc_preferred_stack_boundary=yes
    2.21 +    ])
    2.22 +    AC_MSG_RESULT($have_gcc_preferred_stack_boundary)
    2.23 +    CFLAGS="$save_CFLAGS"
    2.24 +
    2.25 +    if test x$have_gcc_preferred_stack_boundary = xyes; then
    2.26 +        EXTRA_CFLAGS="$EXTRA_CFLAGS -mpreferred-stack-boundary=2"
    2.27 +    fi
    2.28 +}
    2.29 +
    2.30 +
    2.31  dnl See if GCC's -Wall is supported.
    2.32  CheckWarnAll()
    2.33  {
    2.34 @@ -1757,6 +1781,9 @@
    2.35      have_wince=yes
    2.36      ])
    2.37      AC_MSG_RESULT($have_wince)
    2.38 +
    2.39 +    # This fixes Windows stack alignment with newer GCC
    2.40 +    CheckStackBoundary
    2.41  }
    2.42  
    2.43  dnl Find the DirectX includes and libraries
     3.1 --- a/include/SDL_config.h	Thu Dec 29 05:18:16 2011 -0500
     3.2 +++ b/include/SDL_config.h	Thu Dec 29 05:36:39 2011 -0500
     3.3 @@ -1,3 +1,4 @@
     3.4 +/* include/SDL_config.h.  Generated from SDL_config.h.in by configure.  */
     3.5  /*
     3.6    Simple DirectMedia Layer
     3.7    Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
     3.8 @@ -22,27 +23,277 @@
     3.9  #ifndef _SDL_config_h
    3.10  #define _SDL_config_h
    3.11  
    3.12 +/**
    3.13 + *  \file SDL_config.h.in
    3.14 + *
    3.15 + *  This is a set of defines to configure the SDL features
    3.16 + */
    3.17 +
    3.18 +/* General platform specific identifiers */
    3.19  #include "SDL_platform.h"
    3.20  
    3.21 -/**
    3.22 - *  \file SDL_config.h
    3.23 - *
    3.24 - *  SDL_config.h for any platform that doesn't build using the configure system.
    3.25 - */
    3.26 - 
    3.27 -/* Add any platform that doesn't build using the configure system. */
    3.28 -#if defined(__WIN32__)
    3.29 -#include "SDL_config_windows.h"
    3.30 -#elif defined(__MACOSX__)
    3.31 -#include "SDL_config_macosx.h"
    3.32 -#elif defined(__IPHONEOS__) 
    3.33 -#include "SDL_config_iphoneos.h"
    3.34 -#elif defined(__ANDROID__)
    3.35 -#include "SDL_config_android.h"
    3.36 -#elif defined(__NINTENDODS__)
    3.37 -#include "SDL_config_nintendods.h"
    3.38 +/* Make sure that this isn't included by Visual C++ */
    3.39 +#ifdef _MSC_VER
    3.40 +#error You should run hg revert SDL_config.h 
    3.41 +#endif
    3.42 +
    3.43 +/* C language features */
    3.44 +/* #undef const */
    3.45 +/* #undef inline */
    3.46 +/* #undef volatile */
    3.47 +
    3.48 +/* C datatypes */
    3.49 +#define SIZEOF_VOIDP 8
    3.50 +#define HAVE_GCC_ATOMICS 1
    3.51 +/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
    3.52 +/* #undef HAVE_PTHREAD_SPINLOCK */
    3.53 +
    3.54 +/* Comment this if you want to build without any C library requirements */
    3.55 +#define HAVE_LIBC 1
    3.56 +#if HAVE_LIBC
    3.57 +
    3.58 +/* Useful headers */
    3.59 +#define HAVE_ALLOCA_H 1
    3.60 +#define HAVE_SYS_TYPES_H 1
    3.61 +#define HAVE_STDIO_H 1
    3.62 +#define STDC_HEADERS 1
    3.63 +#define HAVE_STDLIB_H 1
    3.64 +#define HAVE_STDARG_H 1
    3.65 +/* #undef HAVE_MALLOC_H */
    3.66 +#define HAVE_MEMORY_H 1
    3.67 +#define HAVE_STRING_H 1
    3.68 +#define HAVE_STRINGS_H 1
    3.69 +#define HAVE_INTTYPES_H 1
    3.70 +#define HAVE_STDINT_H 1
    3.71 +#define HAVE_CTYPE_H 1
    3.72 +#define HAVE_MATH_H 1
    3.73 +#define HAVE_ICONV_H 1
    3.74 +#define HAVE_SIGNAL_H 1
    3.75 +/* #undef HAVE_ALTIVEC_H */
    3.76 +/* #undef HAVE_PTHREAD_NP_H */
    3.77 +
    3.78 +/* C library functions */
    3.79 +#define HAVE_MALLOC 1
    3.80 +#define HAVE_CALLOC 1
    3.81 +#define HAVE_REALLOC 1
    3.82 +#define HAVE_FREE 1
    3.83 +#define HAVE_ALLOCA 1
    3.84 +#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
    3.85 +#define HAVE_GETENV 1
    3.86 +#define HAVE_SETENV 1
    3.87 +#define HAVE_PUTENV 1
    3.88 +#define HAVE_UNSETENV 1
    3.89 +#endif
    3.90 +#define HAVE_QSORT 1
    3.91 +#define HAVE_ABS 1
    3.92 +#define HAVE_BCOPY 1
    3.93 +#define HAVE_MEMSET 1
    3.94 +#define HAVE_MEMCPY 1
    3.95 +#define HAVE_MEMMOVE 1
    3.96 +#define HAVE_MEMCMP 1
    3.97 +#define HAVE_STRLEN 1
    3.98 +#define HAVE_STRLCPY 1
    3.99 +#define HAVE_STRLCAT 1
   3.100 +#define HAVE_STRDUP 1
   3.101 +/* #undef HAVE__STRREV */
   3.102 +/* #undef HAVE__STRUPR */
   3.103 +/* #undef HAVE__STRLWR */
   3.104 +/* #undef HAVE_INDEX */
   3.105 +/* #undef HAVE_RINDEX */
   3.106 +#define HAVE_STRCHR 1
   3.107 +#define HAVE_STRRCHR 1
   3.108 +#define HAVE_STRSTR 1
   3.109 +/* #undef HAVE_ITOA */
   3.110 +/* #undef HAVE__LTOA */
   3.111 +/* #undef HAVE__UITOA */
   3.112 +/* #undef HAVE__ULTOA */
   3.113 +#define HAVE_STRTOL 1
   3.114 +#define HAVE_STRTOUL 1
   3.115 +/* #undef HAVE__I64TOA */
   3.116 +/* #undef HAVE__UI64TOA */
   3.117 +#define HAVE_STRTOLL 1
   3.118 +#define HAVE_STRTOULL 1
   3.119 +#define HAVE_STRTOD 1
   3.120 +#define HAVE_ATOI 1
   3.121 +#define HAVE_ATOF 1
   3.122 +#define HAVE_STRCMP 1
   3.123 +#define HAVE_STRNCMP 1
   3.124 +/* #undef HAVE__STRICMP */
   3.125 +#define HAVE_STRCASECMP 1
   3.126 +/* #undef HAVE__STRNICMP */
   3.127 +#define HAVE_STRNCASECMP 1
   3.128 +#define HAVE_SSCANF 1
   3.129 +#define HAVE_SNPRINTF 1
   3.130 +#define HAVE_VSNPRINTF 1
   3.131 +#define HAVE_M_PI 
   3.132 +#define HAVE_ATAN 1
   3.133 +#define HAVE_ATAN2 1
   3.134 +#define HAVE_CEIL 1
   3.135 +#define HAVE_COPYSIGN 1
   3.136 +#define HAVE_COS 1
   3.137 +#define HAVE_COSF 1
   3.138 +#define HAVE_FABS 1
   3.139 +#define HAVE_FLOOR 1
   3.140 +#define HAVE_LOG 1
   3.141 +#define HAVE_POW 1
   3.142 +#define HAVE_SCALBN 1
   3.143 +#define HAVE_SIN 1
   3.144 +#define HAVE_SINF 1
   3.145 +#define HAVE_SQRT 1
   3.146 +#define HAVE_SIGACTION 1
   3.147 +#define HAVE_SA_SIGACTION 1
   3.148 +#define HAVE_SETJMP 1
   3.149 +#define HAVE_NANOSLEEP 1
   3.150 +#define HAVE_SYSCONF 1
   3.151 +#define HAVE_SYSCTLBYNAME 1
   3.152 +/* #undef HAVE_CLOCK_GETTIME */
   3.153 +/* #undef HAVE_GETPAGESIZE */
   3.154 +#define HAVE_MPROTECT 1
   3.155 +#define HAVE_ICONV 1
   3.156 +#define HAVE_PTHREAD_SETNAME_NP 1
   3.157 +/* #undef HAVE_PTHREAD_SET_NAME_NP */
   3.158 +
   3.159  #else
   3.160 -#include "SDL_config_minimal.h"
   3.161 -#endif /* platform config */
   3.162 +/* We may need some replacement for stdarg.h here */
   3.163 +#include <stdarg.h>
   3.164 +#endif /* HAVE_LIBC */
   3.165 +
   3.166 +/* SDL internal assertion support */
   3.167 +/* #undef SDL_DEFAULT_ASSERT_LEVEL */
   3.168 +
   3.169 +/* Allow disabling of core subsystems */
   3.170 +/* #undef SDL_ATOMIC_DISABLED */
   3.171 +/* #undef SDL_AUDIO_DISABLED */
   3.172 +/* #undef SDL_CPUINFO_DISABLED */
   3.173 +/* #undef SDL_EVENTS_DISABLED */
   3.174 +/* #undef SDL_FILE_DISABLED */
   3.175 +/* #undef SDL_JOYSTICK_DISABLED */
   3.176 +/* #undef SDL_HAPTIC_DISABLED */
   3.177 +/* #undef SDL_LOADSO_DISABLED */
   3.178 +/* #undef SDL_RENDER_DISABLED */
   3.179 +/* #undef SDL_THREADS_DISABLED */
   3.180 +/* #undef SDL_TIMERS_DISABLED */
   3.181 +/* #undef SDL_VIDEO_DISABLED */
   3.182 +/* #undef SDL_POWER_DISABLED */
   3.183 +
   3.184 +/* Enable various audio drivers */
   3.185 +/* #undef SDL_AUDIO_DRIVER_ALSA */
   3.186 +/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
   3.187 +/* #undef SDL_AUDIO_DRIVER_ARTS */
   3.188 +/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
   3.189 +/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
   3.190 +/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */
   3.191 +/* #undef SDL_AUDIO_DRIVER_BEOSAUDIO */
   3.192 +/* #undef SDL_AUDIO_DRIVER_BSD */
   3.193 +#define SDL_AUDIO_DRIVER_COREAUDIO 1
   3.194 +#define SDL_AUDIO_DRIVER_DISK 1
   3.195 +#define SDL_AUDIO_DRIVER_DUMMY 1
   3.196 +/* #undef SDL_AUDIO_DRIVER_XAUDIO2 */
   3.197 +/* #undef SDL_AUDIO_DRIVER_DSOUND */
   3.198 +/* #undef SDL_AUDIO_DRIVER_ESD */
   3.199 +/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
   3.200 +/* #undef SDL_AUDIO_DRIVER_NAS */
   3.201 +/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
   3.202 +/* #undef SDL_AUDIO_DRIVER_NDS */
   3.203 +/* #undef SDL_AUDIO_DRIVER_OSS */
   3.204 +/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
   3.205 +/* #undef SDL_AUDIO_DRIVER_PAUDIO */
   3.206 +/* #undef SDL_AUDIO_DRIVER_QSA */
   3.207 +/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
   3.208 +/* #undef SDL_AUDIO_DRIVER_WINMM */
   3.209 +/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
   3.210 +/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
   3.211 +
   3.212 +/* Enable various input drivers */
   3.213 +/* #undef SDL_INPUT_LINUXEV */
   3.214 +/* #undef SDL_INPUT_TSLIB */
   3.215 +/* #undef SDL_JOYSTICK_BEOS */
   3.216 +/* #undef SDL_JOYSTICK_DINPUT */
   3.217 +/* #undef SDL_JOYSTICK_DUMMY */
   3.218 +#define SDL_JOYSTICK_IOKIT 1
   3.219 +/* #undef SDL_JOYSTICK_LINUX */
   3.220 +/* #undef SDL_JOYSTICK_NDS */
   3.221 +/* #undef SDL_JOYSTICK_WINMM */
   3.222 +/* #undef SDL_JOYSTICK_USBHID */
   3.223 +/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
   3.224 +/* #undef SDL_HAPTIC_DUMMY */
   3.225 +/* #undef SDL_HAPTIC_LINUX */
   3.226 +#define SDL_HAPTIC_IOKIT 1
   3.227 +/* #undef SDL_HAPTIC_DINPUT */
   3.228 +
   3.229 +/* Enable various shared object loading systems */
   3.230 +/* #undef SDL_LOADSO_BEOS */
   3.231 +#define SDL_LOADSO_DLOPEN 1
   3.232 +/* #undef SDL_LOADSO_DUMMY */
   3.233 +/* #undef SDL_LOADSO_LDG */
   3.234 +/* #undef SDL_LOADSO_WINDOWS */
   3.235 +
   3.236 +/* Enable various threading systems */
   3.237 +/* #undef SDL_THREAD_BEOS */
   3.238 +/* #undef SDL_THREAD_NDS */
   3.239 +#define SDL_THREAD_PTHREAD 1
   3.240 +#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
   3.241 +/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
   3.242 +/* #undef SDL_THREAD_WINDOWS */
   3.243 +
   3.244 +/* Enable various timer systems */
   3.245 +/* #undef SDL_TIMER_BEOS */
   3.246 +/* #undef SDL_TIMER_DUMMY */
   3.247 +/* #undef SDL_TIMER_NDS */
   3.248 +#define SDL_TIMER_UNIX 1
   3.249 +/* #undef SDL_TIMER_WINDOWS */
   3.250 +/* #undef SDL_TIMER_WINCE */
   3.251 +
   3.252 +/* Enable various video drivers */
   3.253 +/* #undef SDL_VIDEO_DRIVER_BWINDOW */
   3.254 +#define SDL_VIDEO_DRIVER_COCOA 1
   3.255 +/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
   3.256 +/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
   3.257 +#define SDL_VIDEO_DRIVER_DUMMY 1
   3.258 +/* #undef SDL_VIDEO_DRIVER_NDS */
   3.259 +/* #undef SDL_VIDEO_DRIVER_WINDOWS */
   3.260 +#define SDL_VIDEO_DRIVER_X11 1
   3.261 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
   3.262 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
   3.263 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "/usr/X11R6/lib/libXcursor.1.dylib"
   3.264 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
   3.265 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT "/usr/X11R6/lib/libXi.6.dylib"
   3.266 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
   3.267 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
   3.268 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
   3.269 +#define SDL_VIDEO_DRIVER_X11_XCURSOR 1
   3.270 +#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
   3.271 +#define SDL_VIDEO_DRIVER_X11_XINPUT 1
   3.272 +#define SDL_VIDEO_DRIVER_X11_XRANDR 1
   3.273 +#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
   3.274 +#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
   3.275 +#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
   3.276 +
   3.277 +/* #undef SDL_VIDEO_RENDER_D3D */
   3.278 +#define SDL_VIDEO_RENDER_OGL 1
   3.279 +/* #undef SDL_VIDEO_RENDER_OGL_ES */
   3.280 +/* #undef SDL_VIDEO_RENDER_DIRECTFB */
   3.281 +
   3.282 +/* Enable OpenGL support */
   3.283 +#define SDL_VIDEO_OPENGL 1
   3.284 +/* #undef SDL_VIDEO_OPENGL_ES */
   3.285 +/* #undef SDL_VIDEO_OPENGL_BGL */
   3.286 +#define SDL_VIDEO_OPENGL_CGL 1
   3.287 +#define SDL_VIDEO_OPENGL_GLX 1
   3.288 +/* #undef SDL_VIDEO_OPENGL_WGL */
   3.289 +/* #undef SDL_VIDEO_OPENGL_OSMESA */
   3.290 +/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
   3.291 +
   3.292 +/* Enable system power support */
   3.293 +/* #undef SDL_POWER_LINUX */
   3.294 +/* #undef SDL_POWER_WINDOWS */
   3.295 +#define SDL_POWER_MACOSX 1
   3.296 +/* #undef SDL_POWER_BEOS */
   3.297 +/* #undef SDL_POWER_NINTENDODS */
   3.298 +/* #undef SDL_POWER_HARDWIRED */
   3.299 +
   3.300 +/* Enable assembly routines */
   3.301 +#define SDL_ASSEMBLY_ROUTINES 1
   3.302 +/* #undef SDL_ALTIVEC_BLITTERS */
   3.303  
   3.304  #endif /* _SDL_config_h */