From: Andy Shaw Date: Wed, 28 Nov 2012 14:38:58 +0000 (+0100) Subject: Fix build when SSE2 is not available. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e12f9e7b37fc3b8682fcf3d20a6823b22449e09;p=profile%2Fivi%2Fqtbase.git Fix build when SSE2 is not available. Although SSE2 support is detected at runtime it still may not be available at build time, so we have to ensure it only uses SSE2 when it is available at build time too. Change-Id: I86c45a6466ab4cec79aa0f62b0d5230a78ad825a Reviewed-by: Friedemann Kleint --- diff --git a/src/3rdparty/angle/src/libGLESv2/Texture.cpp b/src/3rdparty/angle/src/libGLESv2/Texture.cpp index af430bf..0ea475d 100644 --- a/src/3rdparty/angle/src/libGLESv2/Texture.cpp +++ b/src/3rdparty/angle/src/libGLESv2/Texture.cpp @@ -378,11 +378,13 @@ void Image::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height switch (mInternalFormat) { case GL_ALPHA8_EXT: +#if defined(__SSE2__) if (supportsSSE2()) { loadAlphaDataSSE2(width, height, inputPitch, input, locked.Pitch, locked.pBits); } else +#endif { loadAlphaData(width, height, inputPitch, input, locked.Pitch, locked.pBits); } @@ -418,11 +420,13 @@ void Image::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height loadRGB565Data(width, height, inputPitch, input, locked.Pitch, locked.pBits); break; case GL_RGBA8_OES: +#if defined(__SSE2__) if (supportsSSE2()) { loadRGBAUByteDataSSE2(width, height, inputPitch, input, locked.Pitch, locked.pBits); } else +#endif { loadRGBAUByteData(width, height, inputPitch, input, locked.Pitch, locked.pBits); } diff --git a/src/angle/patches/0005-Fix-build-when-SSE2-is-not-available.patch b/src/angle/patches/0005-Fix-build-when-SSE2-is-not-available.patch new file mode 100644 index 0000000..7519e3b --- /dev/null +++ b/src/angle/patches/0005-Fix-build-when-SSE2-is-not-available.patch @@ -0,0 +1,49 @@ +From 45a06cc846dbe451bf42c5b3f617729f208743b1 Mon Sep 17 00:00:00 2001 +From: Andy Shaw +Date: Wed, 28 Nov 2012 15:38:58 +0100 +Subject: [PATCH] Fix build when SSE2 is not available. + +Although SSE2 support is detected at runtime it still may not be +available at build time, so we have to ensure it only uses SSE2 +when it is available at build time too. + +Change-Id: I86c45a6466ab4cec79aa0f62b0d5230a78ad825a +--- + src/3rdparty/angle/src/libGLESv2/Texture.cpp | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/3rdparty/angle/src/libGLESv2/Texture.cpp b/src/3rdparty/angle/src/libGLESv2/Texture.cpp +index af430bf..0ea475d 100644 +--- a/src/3rdparty/angle/src/libGLESv2/Texture.cpp ++++ b/src/3rdparty/angle/src/libGLESv2/Texture.cpp +@@ -378,11 +378,13 @@ void Image::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height + switch (mInternalFormat) + { + case GL_ALPHA8_EXT: ++#if defined(__SSE2__) + if (supportsSSE2()) + { + loadAlphaDataSSE2(width, height, inputPitch, input, locked.Pitch, locked.pBits); + } + else ++#endif + { + loadAlphaData(width, height, inputPitch, input, locked.Pitch, locked.pBits); + } +@@ -418,11 +420,13 @@ void Image::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height + loadRGB565Data(width, height, inputPitch, input, locked.Pitch, locked.pBits); + break; + case GL_RGBA8_OES: ++#if defined(__SSE2__) + if (supportsSSE2()) + { + loadRGBAUByteDataSSE2(width, height, inputPitch, input, locked.Pitch, locked.pBits); + } + else ++#endif + { + loadRGBAUByteData(width, height, inputPitch, input, locked.Pitch, locked.pBits); + } +-- +1.7.9.msysgit.0 + diff --git a/src/angle/src/libGLESv2/libGLESv2.pro b/src/angle/src/libGLESv2/libGLESv2.pro index 32be7e6..ae522b2 100644 --- a/src/angle/src/libGLESv2/libGLESv2.pro +++ b/src/angle/src/libGLESv2/libGLESv2.pro @@ -62,10 +62,11 @@ SOURCES += \ $$ANGLE_DIR/src/libGLESv2/ResourceManager.cpp \ $$ANGLE_DIR/src/libGLESv2/Shader.cpp \ $$ANGLE_DIR/src/libGLESv2/Texture.cpp \ - $$ANGLE_DIR/src/libGLESv2/TextureSSE2.cpp \ $$ANGLE_DIR/src/libGLESv2/utilities.cpp \ $$ANGLE_DIR/src/libGLESv2/VertexDataManager.cpp +SSE2_SOURCES += $$ANGLE_DIR/src/libGLESv2/TextureSSE2.cpp + float_converter.target = float_converter float_converter.commands = python $$ANGLE_DIR/src/libGLESv2/Float16ToFloat32.py \ > $$ANGLE_DIR/src/libGLESv2/Float16ToFloat32.cpp