Compare commits

...
Author SHA1 Message Date
Automatic Release Builder af8b27032f new version: 2020.1.2 2020-05-18 11:54:22 +01:00
James Turner f76b72e2f3 Adjust RelWithDebInfo optimisation for Clang
This should give a bit of speed boost to macOS official builds.
2020-05-14 13:50:58 +01:00
James Turner 59512aea1f Windows: ensure RelWithDebInfo is fast
Default CMake RelWithDebInfo pessimizes inlining
2020-05-10 19:46:27 +01:00
James Turner 96618a2e26 Enable old-style texture compression
Thanks to Dany for tracking this down!
2020-05-10 19:46:27 +01:00
4 changed files with 38 additions and 38 deletions
+14 -6
View File
@@ -165,6 +165,11 @@ if (MSVC)
else (EXISTS ${TEST_3RDPARTY_DIR})
set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
endif (EXISTS ${TEST_3RDPARTY_DIR})
# override CMake default RelWithDebInfo flags. This is important to ensure
# good performance
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Zi /O2 /Ob2 /D NDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/Zi /O2 /Ob2 /D NDEBUG")
else (MSVC)
set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
endif (MSVC)
@@ -440,15 +445,18 @@ if (CLANG)
# fix Boost compilation :(
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -O0 -fno-omit-frame-pointer -fno-inline-functions")
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -O0 -fno-omit-frame-pointer -fno-inline-functions")
elseif (ENABLE_SIMD)
# override CMake default RelWithDebInfo flags.
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
if (ENABLE_SIMD)
if (X86 OR X86_64)
set(CMAKE_C_FLAGS_RELEASE "-O3 -msse2 -mfpmath=sse -ftree-vectorize -ftree-slp-vectorize")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -msse2 -mfpmath=sse -ftree-vectorize -ftree-slp-vectorize")
# propogate to the RelWithDebInfo flags
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -g -DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} -g -DNDEBUG")
endif()
endif()
endif()
-8
View File
@@ -113,9 +113,6 @@ protected:
}
};
// disabling old-syle texture compression in favour of the
// texture-cache
#if 0
class SGTexCompressionVisitor : public SGTextureStateAttributeVisitor {
public:
virtual void apply(int, StateSet::RefAttributePair& refAttr)
@@ -146,7 +143,6 @@ public:
}
}
};
#endif
class SGTexDataVarianceVisitor : public SGTextureStateAttributeVisitor {
public:
@@ -644,12 +640,8 @@ osg::Node* OptimizeModelPolicy::optimize(osg::Node* node,
SGTexDataVarianceVisitor dataVarianceVisitor;
node->accept(dataVarianceVisitor);
// disabling old-syle texture compression in favour of the
// texture-cache
#if 0
SGTexCompressionVisitor texComp;
node->accept(texComp);
#endif
return node;
}
+23 -23
View File
@@ -69,29 +69,29 @@ SGSceneFeatures::instance()
void
SGSceneFeatures::applyTextureCompression(osg::Texture* texture) const
{
// disable older texture-compression, since it interacts confusingly
// with the the runtime texture-cache. We always want to use
// 'USE_IMAGE_DATA_FORMAT' when the texture-cache is active, since we
// decided whether to compress (or not) prior to this point.
#if 0
switch (_textureCompression) {
case UseARBCompression:
texture->setInternalFormatMode(osg::Texture::USE_ARB_COMPRESSION);
break;
case UseDXT1Compression:
texture->setInternalFormatMode(osg::Texture::USE_S3TC_DXT1_COMPRESSION);
break;
case UseDXT3Compression:
texture->setInternalFormatMode(osg::Texture::USE_S3TC_DXT3_COMPRESSION);
break;
case UseDXT5Compression:
texture->setInternalFormatMode(osg::Texture::USE_S3TC_DXT5_COMPRESSION);
break;
default:
texture->setInternalFormatMode(osg::Texture::USE_IMAGE_DATA_FORMAT);
break;
}
#endif
// if the texture cache is active, always use the file data format
if (_TextureCacheActive && _TextureCacheCompressionActive) {
texture->setInternalFormatMode(osg::Texture::USE_IMAGE_DATA_FORMAT);
} else {
// keep the older texture compression working, some people need it
switch (_textureCompression) {
case UseARBCompression:
texture->setInternalFormatMode(osg::Texture::USE_ARB_COMPRESSION);
break;
case UseDXT1Compression:
texture->setInternalFormatMode(osg::Texture::USE_S3TC_DXT1_COMPRESSION);
break;
case UseDXT3Compression:
texture->setInternalFormatMode(osg::Texture::USE_S3TC_DXT3_COMPRESSION);
break;
case UseDXT5Compression:
texture->setInternalFormatMode(osg::Texture::USE_S3TC_DXT5_COMPRESSION);
break;
default:
texture->setInternalFormatMode(osg::Texture::USE_IMAGE_DATA_FORMAT);
break;
}
}
}
bool
+1 -1
View File
@@ -1 +1 @@
2020.1.1
2020.1.2