[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OpenAL in AMD64



On 8/24/07, Miriam Ruiz <little.miry@gmail.com> wrote:
> It seems that there are problems  with OpenAL in AMD64, does anyone know
> something about itß
> * http://btanks.sourceforge.net/blog/2007/08/21/good-news-everyone/
> * http://www.miriamruiz.es/weblog/?p=100

    I've been able to replicate a crash in torcs that appears to be
related to this.  Looking in the upstream changelog (1), it appears
that there was a change to the MMX routines done in March 2006 due to
differences between gcc 3.x and gcc 4.x.  The current contents of the
src/arch directory in svn seem much more robust than in the current
package, and likely to benefit from stronger run-time checking as well
as better compile-time detection.

    I've prepared a disable-MMX patch (attached), but believe that a
better solution would be to perhaps grab an upstream snapshot to take
advantage of the better SIMD detection present there.  If anyone has a
strong reservation about a svn pull, I'd be happy to merge the patch
in our repository.

(1) http://opensource.creative.com/repos/openal/trunk/OpenAL-Sample/ChangeLog

-- 
Emmet HIKORY
diff -u openal-0.0.8/configure openal-0.0.8/configure
--- openal-0.0.8/configure
+++ openal-0.0.8/configure
@@ -22428,7 +22428,7 @@
 esac
 
 case "$target" in
-    *i386* | *i486* | *i586* | *i686* | *x86_64*)
+    *i386* | *i486* | *i586* | *i686*)
     openal_x86_support_yn=yes
 
     echo "$as_me:$LINENO: checking for MMX support" >&5
only in patch2:
unchanged:
--- openal-0.0.8.orig/src/al_mixfunc.c
+++ openal-0.0.8/src/al_mixfunc.c
@@ -38,7 +38,7 @@
 		return AL_FALSE;
 	}
 
-#ifdef __MMX__
+#ifdef USE_LIGHT_GEN_MIXING
 	if (_alHaveMMX()) {
 		/* FIXME: we really ignore size. */
 		mf->max      = MMXMIXSOURCES;
@@ -83,7 +83,7 @@
 	
 		return AL_TRUE;
 	}
-#endif /* __MMX__ */
+#endif /* USE_LIGHT_GEN_MIXING */
 
 	/* FIXME: we really ignore size. */
 	mf->max      = GENMIXSOURCES;
only in patch2:
unchanged:
--- openal-0.0.8.orig/src/mixaudio16.h
+++ openal-0.0.8/src/mixaudio16.h
@@ -12,9 +12,9 @@
 #include "al_types.h"
 #include "al_siteconfig.h"
 
-#ifdef __MMX__
+#ifdef USE_LIGHT_GEN_MIXING
 #include "mixaudio16_mmx_prk.h"
-#endif /* __MMX__ */
+#endif /* USE_LIGHT_GEN_MIXING */
 
 /*
  * max_audioval is the maximum value of a signed short.
only in patch2:
unchanged:
--- openal-0.0.8.orig/configure.ac
+++ openal-0.0.8/configure.ac
@@ -365,7 +365,7 @@
 
 dnl Special objs for architectures
 case "$target" in
-    *i386* | *i486* | *i586* | *i686* | *x86_64*)
+    *i386* | *i486* | *i586* | *i686*)
     openal_x86_support_yn=yes
 
     AC_MSG_CHECKING([for MMX support])

Reply to: