rpms/ClanLib/F-13 ClanLib-2.1.1-libGL-soname.patch, NONE, 1.1 ClanLib-2.1.1-no-sse2.patch, NONE, 1.1
Hans de Goede
jwrdegoede at fedoraproject.org
Sun May 30 09:47:59 UTC 2010
- Previous message: rpms/ClanLib/F-12 .cvsignore, 1.7, 1.8 ClanLib.spec, 1.23, 1.24 sources, 1.7, 1.8
- Next message: rpms/ClanLib/F-12 ClanLib-2.1.1-libGL-soname.patch, NONE, 1.1 ClanLib-2.1.1-no-sse2.patch, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jwrdegoede
Update of /cvs/pkgs/rpms/ClanLib/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv23827
Added Files:
ClanLib-2.1.1-libGL-soname.patch ClanLib-2.1.1-no-sse2.patch
Log Message:
* Sat May 29 2010 Hans de Goede <hdegoede at redhat.com> 2.1.1-1
- New upstream release 2.1.1
- Fix clanSound clanMikMod and clanVorbis modules missing on ppc (#595934)
ClanLib-2.1.1-libGL-soname.patch:
GL/GLX/opengl_window_provider_glx.cpp | 2 +-
GL1/GLX/gl1_window_provider_glx.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE ClanLib-2.1.1-libGL-soname.patch ---
diff -up ClanLib-2.1.1/Sources/GL/GLX/opengl_window_provider_glx.cpp~ ClanLib-2.1.1/Sources/GL/GLX/opengl_window_provider_glx.cpp
--- ClanLib-2.1.1/Sources/GL/GLX/opengl_window_provider_glx.cpp~ 2009-11-23 10:35:03.000000000 +0100
+++ ClanLib-2.1.1/Sources/GL/GLX/opengl_window_provider_glx.cpp 2010-05-29 15:00:48.000000000 +0200
@@ -48,7 +48,7 @@
#include <cstdio>
#ifdef CL_USE_DLOPEN
-#define CL_OPENGL_LIBRARY "libGL.so"
+#define CL_OPENGL_LIBRARY "libGL.so.1"
#include <dlfcn.h>
#endif
diff -up ClanLib-2.1.1/Sources/GL1/GLX/gl1_window_provider_glx.cpp~ ClanLib-2.1.1/Sources/GL1/GLX/gl1_window_provider_glx.cpp
--- ClanLib-2.1.1/Sources/GL1/GLX/gl1_window_provider_glx.cpp~ 2010-05-29 12:28:50.000000000 +0200
+++ ClanLib-2.1.1/Sources/GL1/GLX/gl1_window_provider_glx.cpp 2010-05-29 12:43:22.000000000 +0200
@@ -50,7 +50,7 @@
#include "pbuffer_impl.h"
#ifdef CL_USE_DLOPEN
-#define CL_OPENGL_LIBRARY "libGL.so"
+#define CL_OPENGL_LIBRARY "libGL.so.1"
#include <dlfcn.h>
#endif
ClanLib-2.1.1-no-sse2.patch:
Sources/Sound/sound_sse.cpp | 53 +++++++++++++++++++++++++++++++++++++++++++-
configure.ac | 14 ++++++-----
2 files changed, 60 insertions(+), 7 deletions(-)
--- NEW FILE ClanLib-2.1.1-no-sse2.patch ---
diff -up ClanLib-2.1.1/Sources/Sound/sound_sse.cpp.sse2 ClanLib-2.1.1/Sources/Sound/sound_sse.cpp
--- ClanLib-2.1.1/Sources/Sound/sound_sse.cpp.sse2 2009-10-02 16:08:46.000000000 +0200
+++ ClanLib-2.1.1/Sources/Sound/sound_sse.cpp 2010-05-30 09:49:16.000000000 +0200
@@ -28,7 +28,10 @@
#include "Sound/precomp.h"
#include "API/Sound/sound_sse.h"
+#include <stdlib.h>
+#ifdef CL_SSE2
#include <emmintrin.h>
+#endif
void *CL_SoundSSE::aligned_alloc(int size)
{
@@ -58,6 +61,7 @@ void CL_SoundSSE::aligned_free(void *ptr
void CL_SoundSSE::unpack_16bit_stereo(short *input, int size, float *output[2])
{
+#ifdef CL_SSE2
int sse_size = (size/8)*8;
__m128i zero = _mm_setzero_si128();
@@ -77,6 +81,9 @@ void CL_SoundSSE::unpack_16bit_stereo(sh
_mm_storeu_ps(output[0]+i/2, tmp0);
_mm_storeu_ps(output[1]+i/2, tmp1);
}
+#else
+ const int sse_size = 0;
+#endif
// unpack remaining
for (int i = sse_size; i < size; i+=2)
@@ -88,6 +95,7 @@ void CL_SoundSSE::unpack_16bit_stereo(sh
void CL_SoundSSE::unpack_16bit_mono(short *input, int size, float *output)
{
+#ifdef CL_SSE2
int sse_size = (size/8)*8;
__m128i zero = _mm_setzero_si128();
@@ -102,6 +110,9 @@ void CL_SoundSSE::unpack_16bit_mono(shor
_mm_storeu_ps(output+i+0, samples0);
_mm_storeu_ps(output+i+4, samples1);
}
+#else
+ const int sse_size = 0;
+#endif
// unpack remaining
for (int i = sse_size; i < size; i++)
@@ -112,6 +123,7 @@ void CL_SoundSSE::unpack_16bit_mono(shor
void CL_SoundSSE::unpack_8bit_stereo(unsigned char *input, int size, float *output[2])
{
+#ifdef CL_SSE2
int sse_size = (size/16)*16;
__m128i zero = _mm_setzero_si128();
@@ -142,6 +154,9 @@ void CL_SoundSSE::unpack_8bit_stereo(uns
_mm_storeu_ps(output[0]+i/2+4, tmp2);
_mm_storeu_ps(output[1]+i/2+4, tmp3);
}
+#else
+ const int sse_size = 0;
+#endif
// unpack remaining
for (int i = sse_size; i < size; i+=2)
@@ -156,6 +171,7 @@ void CL_SoundSSE::unpack_8bit_stereo(uns
void CL_SoundSSE::unpack_8bit_mono(unsigned char *input, int size, float *output)
{
+#ifdef CL_SSE2
int sse_size = (size/16)*16;
__m128i zero = _mm_setzero_si128();
@@ -179,17 +195,21 @@ void CL_SoundSSE::unpack_8bit_mono(unsig
_mm_storeu_ps(output+i+8, samples2);
_mm_storeu_ps(output+i+12, samples3);
}
+#else
+ const int sse_size = 0;
+#endif
// unpack remaining
for (int i = sse_size; i < size; i++)
{
- int value = input[0];
+ int value = input[i];
output[i] = ((float) (value - 128)) / 128.0f;
}
}
void CL_SoundSSE::pack_16bit_stereo(float *input[2], int size, short *output)
{
+#ifdef CL_SSE2
int sse_size = (size/4)*4;
__m128 constant1 = _mm_set1_ps(32767);
@@ -207,6 +227,9 @@ void CL_SoundSSE::pack_16bit_stereo(floa
__m128i isamples = _mm_packs_epi32(isamples0, isamples1);
_mm_storeu_si128((__m128i*)(output+i*2), isamples);
}
+#else
+ const int sse_size = 0;
+#endif
// Pack remaining
for (int i = sse_size; i < size; i++)
@@ -218,6 +241,7 @@ void CL_SoundSSE::pack_16bit_stereo(floa
void CL_SoundSSE::pack_float_stereo(float *input[2], int size, float *output)
{
+#ifdef CL_SSE2
int sse_size = (size/4)*4;
for (int i = 0; i < sse_size; i+=4)
@@ -230,6 +254,9 @@ void CL_SoundSSE::pack_float_stereo(floa
_mm_storeu_ps(output+i*2, tmp0);
_mm_storeu_ps(output+i*2+4, tmp1);
}
+#else
+ const int sse_size = 0;
+#endif
// Pack remaining
for (int i = sse_size; i < size; i++)
@@ -241,6 +268,7 @@ void CL_SoundSSE::pack_float_stereo(floa
void CL_SoundSSE::copy_float(float *input, int size, float *output)
{
+#ifdef CL_SSE2
int sse_size = (size/4)*4;
for (int i = 0; i < sse_size; i+=4)
@@ -248,6 +276,9 @@ void CL_SoundSSE::copy_float(float *inpu
__m128 s = _mm_loadu_ps(input+i);
_mm_storeu_ps(output+i, s);
}
+#else
+ const int sse_size = 0;
+#endif
// Copy remaining
for (int i = sse_size; i < size; i++)
@@ -256,6 +287,7 @@ void CL_SoundSSE::copy_float(float *inpu
void CL_SoundSSE::multiply_float(float *channel, int size, float volume)
{
+#ifdef CL_SSE2
int sse_size = (size/4)*4;
__m128 volume0 = _mm_set1_ps(volume);
@@ -265,6 +297,9 @@ void CL_SoundSSE::multiply_float(float *
s = _mm_mul_ps(s, volume0);
_mm_storeu_ps(channel+i, s);
}
+#else
+ const int sse_size = 0;
+#endif
for (int i = sse_size; i < size; i++)
channel[i] *= volume;
@@ -272,6 +307,7 @@ void CL_SoundSSE::multiply_float(float *
void CL_SoundSSE::set_float(float *channel, int size, float value)
{
+#ifdef CL_SSE2
int sse_size = (size/4)*4;
__m128 value0 = _mm_set1_ps(value);
@@ -279,6 +315,9 @@ void CL_SoundSSE::set_float(float *chann
{
_mm_storeu_ps(channel+i, value0);
}
+#else
+ const int sse_size = 0;
+#endif
for (int i = sse_size; i < size; i++)
channel[i] = value;
@@ -286,6 +325,7 @@ void CL_SoundSSE::set_float(float *chann
void CL_SoundSSE::mix_one_to_one(float *input, int size, float *output, float volume)
{
+#ifdef CL_SSE2
int sse_size = (size/4)*4;
__m128 volume0 = _mm_set1_ps(volume);
for (int i = 0; i < sse_size; i+=4)
@@ -294,6 +334,9 @@ void CL_SoundSSE::mix_one_to_one(float *
__m128 sample1 = _mm_loadu_ps(output+i);
_mm_storeu_ps(output+i, _mm_add_ps(_mm_mul_ps(sample0, volume0), sample1));
}
+#else
+ const int sse_size = 0;
+#endif
for (int i = sse_size; i < size; i++)
{
@@ -303,6 +346,7 @@ void CL_SoundSSE::mix_one_to_one(float *
void CL_SoundSSE::mix_one_to_many(float *input, int size, float **output, float *volume, int channels)
{
+#ifdef CL_SSE2
int sse_size = (size/4)*4;
for (int i = 0; i < sse_size; i+=4)
{
@@ -314,6 +358,9 @@ void CL_SoundSSE::mix_one_to_many(float
_mm_storeu_ps(output[j]+i, _mm_add_ps(_mm_mul_ps(sample0, volume0), sample1));
}
}
+#else
+ const int sse_size = 0;
+#endif
for (int i = sse_size; i < size; i++)
{
@@ -327,6 +374,7 @@ void CL_SoundSSE::mix_one_to_many(float
void CL_SoundSSE::mix_many_to_one(float **input, float *volume, int channels, int size, float *output)
{
+#ifdef CL_SSE2
int sse_size = (size/4)*4;
for (int i = 0; i < sse_size; i+=4)
{
@@ -339,6 +387,9 @@ void CL_SoundSSE::mix_many_to_one(float
}
_mm_storeu_ps(output+i, sample0);
}
+#else
+ const int sse_size = 0;
+#endif
for (int i = sse_size; i < size; i++)
{
diff -up ClanLib-2.1.1/configure.ac.sse2 ClanLib-2.1.1/configure.ac
--- ClanLib-2.1.1/configure.ac.sse2 2009-12-07 17:16:24.000000000 +0100
+++ ClanLib-2.1.1/configure.ac 2010-05-30 09:47:50.000000000 +0200
@@ -500,8 +500,12 @@ if test "$enable_clanSound" != "no"; the
echo "Checking for clanSound stuff"
echo "============================"
- dnl Note, ClanLib only supports SSE2 for clanSound
- CLANLIB_CHECK_LIB(SSE2, [`cat $srcdir/Setup/Tests/sse2.cpp`], clanSound, [ *** Compliler does not support SSE2 ], [ ], [ -msse2 ] )
+ OLD_CXXFLAGS="$CXXFLAGS"; CXXFLAGS="-msse2";
+ AC_MSG_CHECKING([for SSE2])
+ AC_LINK_IFELSE([`cat $srcdir/Setup/Tests/sse2.cpp`],
+ AC_MSG_RESULT(yes); clanSound_CXXFLAGS=-msse2; AC_DEFINE(CL_SSE2),
+ AC_MSG_RESULT(no); clanSound_CXXFLAGS=)
+ CXXFLAGS="$OLD_CXXFLAGS"
if test "$WIN32" = "yes"; then
CLANLIB_CHECK_LIB(dsound,[#include <dsound.h>
@@ -527,10 +531,8 @@ if test "$enable_clanSound" != "no"; the
fi
if test "$enable_clanSound" = "auto"; then enable_clanSound=yes; fi
- if test "$enable_clanSound" = "yes"; then
- clanSound_CXXFLAGS=-msse2
- AC_SUBST(clanSound_CXXFLAGS)
- fi
+
+ AC_SUBST(clanSound_CXXFLAGS)
fi
if test "$enable_clanSound" != "no"; then
- Previous message: rpms/ClanLib/F-12 .cvsignore, 1.7, 1.8 ClanLib.spec, 1.23, 1.24 sources, 1.7, 1.8
- Next message: rpms/ClanLib/F-12 ClanLib-2.1.1-libGL-soname.patch, NONE, 1.1 ClanLib-2.1.1-no-sse2.patch, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list