summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzue@gmx.net>2020-04-29 09:30:45 +0200
committerJames Le Cuirot <chewi@gentoo.org>2020-08-25 22:59:57 +0100
commit2e8d95ccd9fba724a65aea0dee63ee3752afddcb (patch)
treed50c5873e2b8db22a55c6bb1082585a0de9c7604 /dev-games/ogre/files
parentdev-games/ogre: 1.12.8 version bump plus fixes/additions (diff)
downloadgentoo-2e8d95ccd9fba724a65aea0dee63ee3752afddcb.tar.gz
gentoo-2e8d95ccd9fba724a65aea0dee63ee3752afddcb.tar.bz2
gentoo-2e8d95ccd9fba724a65aea0dee63ee3752afddcb.zip
dev-games/ogre: Bump to 2.1 - First major 2.1 release
Changes from the pre-release: * gles2 USE flag is gone, the GLES2 render system is not ported, yet * Added "fine-granularity" USE flag to enable XXXX which has a noticable performance impact. * double-precision USE flag is back in. But if activated, both OGRE_SIMD_NEON and OGRE_SIMD_SSE2 must be disabled, so the performance impact is quite big. * mobile USE flag is gone, this needs further testing. Also I think that building for mobile devices is not really interesting on Gentoo, is it? * Fixed a few warnings and issues, and spoke with upstream about them. ( See: https://github.com/OGRECave/ogre-next/issues/90 ) * Fixed a missing include compilation issue and reported it to upstream. ( See: OGRECave/ogre-next#132 ) Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: Sven Eden <yamakuzure@gmx.net> Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'dev-games/ogre/files')
-rw-r--r--dev-games/ogre/files/ogre-2.1-d1c1116.patch62
-rw-r--r--dev-games/ogre/files/ogre-2.1-fix_compilation_issues.patch67
-rw-r--r--dev-games/ogre/files/ogre-2.1-fix_opengl_search.patch12
-rw-r--r--dev-games/ogre/files/ogre-2.1-fix_warnings.patch15
4 files changed, 156 insertions, 0 deletions
diff --git a/dev-games/ogre/files/ogre-2.1-d1c1116.patch b/dev-games/ogre/files/ogre-2.1-d1c1116.patch
new file mode 100644
index 000000000000..6fbf5ecda4d0
--- /dev/null
+++ b/dev-games/ogre/files/ogre-2.1-d1c1116.patch
@@ -0,0 +1,62 @@
+From d1c1116924ca537c1f061ed5422dd9a5207d989a Mon Sep 17 00:00:00 2001
+From: "Matias N. Goldberg" <dark_sylinc@yahoo.com.ar>
+Date: Mon, 24 Feb 2020 17:23:25 -0300
+Subject: [PATCH] Bugfix: Bone::_getDerivedTransform using uninitialized values
+ causing asserts to trigger Also prefer using Mathlib::LAST_AFFINE_COLUMN in
+ ArrayMatrixAf4x3::store
+
+---
+ .../include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h | 6 +-----
+ .../include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h | 6 +-----
+ OgreMain/src/Animation/OgreBone.cpp | 4 ++--
+ 3 files changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h b/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h
+index 137b7cb5b2..2e2468149d 100644
+--- a/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h
++++ b/OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.h
+@@ -217,11 +217,7 @@ namespace Ogre
+ vst1q_f32( dstPtr, mChunkBase[0] );
+ vst1q_f32( dstPtr + 4, mChunkBase[1] );
+ vst1q_f32( dstPtr + 8, mChunkBase[2] );
+- dstPtr += 12;
+- *dstPtr++ = 0;
+- *dstPtr++ = 0;
+- *dstPtr++ = 0;
+- *dstPtr++ = 1;
++ vst1q_f32( dstPtr + 12, MathlibNEON::LAST_AFFINE_COLUMN );
+ }
+
+ /// Assumes dst is aligned
+diff --git a/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h b/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h
+index 01b75b2730..a96d9a11e0 100644
+--- a/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h
++++ b/OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrixAf4x3.h
+@@ -217,11 +217,7 @@ namespace Ogre
+ _mm_store_ps( dstPtr, mChunkBase[0] );
+ _mm_store_ps( dstPtr + 4, mChunkBase[1] );
+ _mm_store_ps( dstPtr + 8, mChunkBase[2] );
+- dstPtr += 12;
+- *dstPtr++ = 0;
+- *dstPtr++ = 0;
+- *dstPtr++ = 0;
+- *dstPtr++ = 1;
++ _mm_store_ps( dstPtr + 12, MathlibSSE2::LAST_AFFINE_COLUMN );
+ }
+
+ /// Assumes dst is aligned
+diff --git a/OgreMain/src/Animation/OgreBone.cpp b/OgreMain/src/Animation/OgreBone.cpp
+index 588c6cb442..8735ed2a2f 100644
+--- a/OgreMain/src/Animation/OgreBone.cpp
++++ b/OgreMain/src/Animation/OgreBone.cpp
+@@ -257,8 +257,8 @@ namespace Ogre {
+ OGRE_ALIGNED_DECL( Matrix4, localSpaceBone, OGRE_SIMD_ALIGNMENT );
+ OGRE_ALIGNED_DECL( Matrix4, parentNodeTransform, OGRE_SIMD_ALIGNMENT );
+
+- mTransform.mDerivedTransform[mTransform.mIndex].store4x3( &localSpaceBone );
+- mTransform.mParentNodeTransform[mTransform.mIndex]->store4x3( &parentNodeTransform );
++ mTransform.mDerivedTransform[mTransform.mIndex].store( &localSpaceBone );
++ mTransform.mParentNodeTransform[mTransform.mIndex]->store( &parentNodeTransform );
+
+ parentNodeTransform.concatenateAffine( localSpaceBone );
+
diff --git a/dev-games/ogre/files/ogre-2.1-fix_compilation_issues.patch b/dev-games/ogre/files/ogre-2.1-fix_compilation_issues.patch
new file mode 100644
index 000000000000..4f2248dd1a36
--- /dev/null
+++ b/dev-games/ogre/files/ogre-2.1-fix_compilation_issues.patch
@@ -0,0 +1,67 @@
+--- a/Components/Paging/src/OgreGrid3DPageStrategy.cpp 2020-04-28 09:31:06.301940556 +0200
++++ b/Components/Paging/src/OgreGrid3DPageStrategy.cpp 2020-04-28 09:40:51.777904025 +0200
+@@ -367,9 +367,9 @@
+ {
+ mat = MaterialManager::getSingleton().create(matName, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
+ Pass* pass = mat->getTechnique(0)->getPass(0);
+- pass->setLightingEnabled(false);
++ //pass->setLightingEnabled(false);
+ pass->setVertexColourTracking(TVC_AMBIENT);
+- pass->setDepthWriteEnabled(false);
++ //pass->setDepthWriteEnabled(false);
+ mat->load();
+ }
+
+@@ -383,7 +383,7 @@
+ else
+ {
+ mo = p->getParentSection()->getSceneManager()->createManualObject();
+- mo->begin(matName, RenderOperation::OT_LINE_STRIP);
++ mo->begin(matName, OperationType::OT_LINE_STRIP);
+ }
+
+ ColourValue vcol = ColourValue::Green;
+--- a/Components/Paging/src/OgreGrid2DPageStrategy.cpp 2020-04-28 09:43:23.119894582 +0200
++++ b/Components/Paging/src/OgreGrid2DPageStrategy.cpp 2020-04-28 09:44:00.844892228 +0200
+@@ -405,9 +405,9 @@
+ {
+ mat = MaterialManager::getSingleton().create(matName, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
+ Pass* pass = mat->getTechnique(0)->getPass(0);
+- pass->setLightingEnabled(false);
++ //pass->setLightingEnabled(false);
+ pass->setVertexColourTracking(TVC_AMBIENT);
+- pass->setDepthWriteEnabled(false);
++ //pass->setDepthWriteEnabled(false);
+ mat->load();
+ }
+
+@@ -416,7 +416,7 @@
+ if (sn->numAttachedObjects() == 0)
+ {
+ mo = p->getParentSection()->getSceneManager()->createManualObject();
+- mo->begin(matName, RenderOperation::OT_LINE_STRIP);
++ mo->begin(matName, OperationType::OT_LINE_STRIP);
+ }
+ else
+ {
+--- a/OgreMain/src/OgrePVRTCCodec.cpp 2020-04-27 20:00:44.816974345 +0200
++++ b/OgreMain/src/OgrePVRTCCodec.cpp 2020-04-27 20:03:49.186962841 +0200
+@@ -33,6 +33,7 @@
+ #include "OgreException.h"
+ #include "OgreLogManager.h"
+ #include "OgreBitwise.h"
++#include "OgreDataStream.h"
+
+ #define FOURCC(c0, c1, c2, c3) (c0 | (c1 << 8) | (c2 << 16) | (c3 << 24))
+ #define PVR_TEXTURE_FLAG_TYPE_MASK 0xff
+--- a/OgreMain/src/OgrePlatformInformation.cpp 2020-08-23 17:39:09.971041355 +0200
++++ b/OgreMain/src/OgrePlatformInformation.cpp 2020-08-23 17:40:11.594044907 +0200
+@@ -42,7 +42,7 @@
+ #if OGRE_PLATFORM != OGRE_PLATFORM_WIN32
+ #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
+ #include <linux/sysctl.h>
+- #else
++ #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
+ #include <sys/sysctl.h>
+ #endif
+ #endif
diff --git a/dev-games/ogre/files/ogre-2.1-fix_opengl_search.patch b/dev-games/ogre/files/ogre-2.1-fix_opengl_search.patch
new file mode 100644
index 000000000000..e5a09804407b
--- /dev/null
+++ b/dev-games/ogre/files/ogre-2.1-fix_opengl_search.patch
@@ -0,0 +1,12 @@
+--- a/CMake/Dependencies.cmake 2020-04-27 15:59:25.005877828 +0200
++++ b/CMake/Dependencies.cmake 2020-04-27 15:59:42.572876732 +0200
+@@ -111,6 +111,9 @@
+ #######################################################################
+
+ # Find OpenGL
++if(POLICY CMP0072)
++ cmake_policy(SET CMP0072 NEW)
++endif()
+ if(NOT ANDROID AND NOT EMSCRIPTEN)
+ find_package(OpenGL)
+ macro_log_feature(OPENGL_FOUND "OpenGL" "Support for the OpenGL render system" "http://www.opengl.org/" FALSE "" "")
diff --git a/dev-games/ogre/files/ogre-2.1-fix_warnings.patch b/dev-games/ogre/files/ogre-2.1-fix_warnings.patch
new file mode 100644
index 000000000000..a76687998889
--- /dev/null
+++ b/dev-games/ogre/files/ogre-2.1-fix_warnings.patch
@@ -0,0 +1,15 @@
+--- a/Samples/2.0/Tutorials/Tutorial_Terrain/src/Terra/TerrainCell.cpp 2020-04-28 18:10:40.416995414 +0200
++++ b/Samples/2.0/Tutorials/Tutorial_Terrain/src/Terra/TerrainCell.cpp 2020-04-28 18:30:46.074920186 +0200
+@@ -133,7 +133,11 @@
+ gpuPtr[0] = m_verticesPerLine;
+ gpuPtr[1] = m_lodLevel;
+ gpuPtr[2] = vao->getPrimitiveCount() / m_verticesPerLine - 2u;
+- gpuPtr[3] = *reinterpret_cast<uint32*>( &m_parentTerra->m_skirtSize );
++ /* Triggers: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
++ * gpuPtr[3] = *reinterpret_cast<uint32*>( &m_parentTerra->m_skirtSize );
++ * See: http://zaynar.co.uk/docs/float-aliasing.html
++ */
++ memcpy(&gpuPtr[3], &m_parentTerra->m_skirtSize, sizeof(gpuPtr[3]));
+
+ //ivec4 xzTexPosBounds
+ ((int32*RESTRICT_ALIAS)gpuPtr)[4] = m_gridX;