mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
Merge branch '0.9.5' into nohalf
This commit is contained in:
commit
22ab3bd59d
@ -11,48 +11,33 @@ if(NOT GLM_TEST_ENABLE)
|
||||
message(FATAL_ERROR "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench")
|
||||
endif()
|
||||
|
||||
option(GLM_USE_INTEL "Use Intel Compiler" OFF)
|
||||
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND UNIX))
|
||||
option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF)
|
||||
option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF)
|
||||
option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF)
|
||||
option(GLM_TEST_ENABLE_CXX_1Y "Enable C++ 1y" OFF)
|
||||
option(GLM_TEST_ENABLE_CXX_PEDANTIC "Pedantic" ON)
|
||||
|
||||
option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF)
|
||||
if(GLM_TEST_ENABLE_CXX_11)
|
||||
if(GLM_USE_INTEL)
|
||||
add_definitions(/Qstd=c++0x)
|
||||
if(GLM_TEST_ENABLE_CXX_PEDANTIC)
|
||||
add_definitions(-pedantic)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(GLM_TEST_ENABLE_CXX_1Y)
|
||||
add_definitions(-std=c++1y)
|
||||
elseif(GLM_TEST_ENABLE_CXX_11)
|
||||
add_definitions(-std=c++11)
|
||||
elseif(GLM_TEST_ENABLE_CXX_0X)
|
||||
add_definitions(-std=c++0x)
|
||||
endif()
|
||||
elseif(NOT GLM_TEST_ENABLE_CXX_11)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
elseif(GLM_TEST_ENABLE_CXX_98)
|
||||
add_definitions(-std=c++98)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(GLM_TEST_ENABLE_LANG_EXTENSIONS "Enable language extensions" OFF)
|
||||
if(GLM_TEST_ENABLE_LANG_EXTENSIONS)
|
||||
if(GLM_USE_INTEL)
|
||||
add_definitions(/Qintel-extensions)
|
||||
add_definitions(-intel-extensions)
|
||||
endif()
|
||||
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND WIN32))
|
||||
option(GLM_TEST_ENABLE_MS_EXTENSIONS "Enable MS extensions" OFF)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
#Doesn't seem to work...
|
||||
#add_definitions(-fms-extensions)
|
||||
#add_definitions(-D_MSC_EXTENSIONS)
|
||||
endif()
|
||||
|
||||
elseif(NOT GLM_TEST_ENABLE_LANG_EXTENSIONS)
|
||||
if(GLM_USE_INTEL)
|
||||
add_definitions(/Qintel-extensions-)
|
||||
add_definitions(-no-intel-extensions)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions(-pedantic)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(/Za)
|
||||
if(NOT GLM_TEST_ENABLE_MS_EXTENSIONS)
|
||||
add_definitions(/Za)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -112,6 +112,17 @@
|
||||
|
||||
#define GLM_COMPILER_UNKNOWN 0x00000000
|
||||
|
||||
// Intel
|
||||
#define GLM_COMPILER_INTEL 0x00100000
|
||||
#define GLM_COMPILER_INTEL9 0x00100010
|
||||
#define GLM_COMPILER_INTEL10_0 0x00100020
|
||||
#define GLM_COMPILER_INTEL10_1 0x00100030
|
||||
#define GLM_COMPILER_INTEL11_0 0x00100040
|
||||
#define GLM_COMPILER_INTEL11_1 0x00100050
|
||||
#define GLM_COMPILER_INTEL12_0 0x00100060
|
||||
#define GLM_COMPILER_INTEL12_1 0x00100070
|
||||
#define GLM_COMPILER_INTEL13_0 0x00100080
|
||||
|
||||
// Visual C++ defines
|
||||
#define GLM_COMPILER_VC 0x01000000
|
||||
#define GLM_COMPILER_VC2 0x01000010
|
||||
@ -145,8 +156,6 @@
|
||||
#define GLM_COMPILER_GCC46 0x020000D0
|
||||
#define GLM_COMPILER_GCC47 0x020000E0
|
||||
#define GLM_COMPILER_GCC48 0x020000F0
|
||||
#define GLM_COMPILER_GCC49 0x02000100
|
||||
#define GLM_COMPILER_GCC50 0x02000200
|
||||
|
||||
// G++ command line to display defined
|
||||
// echo "" | g++ -E -dM -x c++ - | sort
|
||||
@ -189,17 +198,6 @@
|
||||
// LLVM GCC
|
||||
#define GLM_COMPILER_LLVM_GCC 0x40000000
|
||||
|
||||
// Intel
|
||||
#define GLM_COMPILER_INTEL 0x80000000
|
||||
#define GLM_COMPILER_INTEL9 0x80000010
|
||||
#define GLM_COMPILER_INTEL10_0 0x80000020
|
||||
#define GLM_COMPILER_INTEL10_1 0x80000030
|
||||
#define GLM_COMPILER_INTEL11_0 0x80000040
|
||||
#define GLM_COMPILER_INTEL11_1 0x80000050
|
||||
#define GLM_COMPILER_INTEL12_0 0x80000060
|
||||
#define GLM_COMPILER_INTEL12_1 0x80000070
|
||||
#define GLM_COMPILER_INTEL13_0 0x80000080
|
||||
|
||||
// Build model
|
||||
#define GLM_MODEL_32 0x00000010
|
||||
#define GLM_MODEL_64 0x00000020
|
||||
@ -239,18 +237,8 @@
|
||||
|
||||
// Visual C++
|
||||
#elif defined(_MSC_VER)
|
||||
# if _MSC_VER == 900
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2
|
||||
# elif _MSC_VER == 1000
|
||||
# define GLM_COMPILER GLM_COMPILER_VC4
|
||||
# elif _MSC_VER == 1100
|
||||
# define GLM_COMPILER GLM_COMPILER_VC5
|
||||
# elif _MSC_VER == 1200
|
||||
# define GLM_COMPILER GLM_COMPILER_VC6
|
||||
# elif _MSC_VER == 1300
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2002
|
||||
# elif _MSC_VER == 1310
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2003
|
||||
# if _MSC_VER < 1400
|
||||
# error "GLM requires Visual C++ 2005 or higher"
|
||||
# elif _MSC_VER == 1400
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2005
|
||||
# elif _MSC_VER == 1500
|
||||
@ -267,7 +255,9 @@
|
||||
|
||||
// Clang
|
||||
#elif defined(__clang__)
|
||||
# if(__clang_major__ == 2) && (__clang_minor__ == 6)
|
||||
# if (__clang_major__ <= 1) || ((__clang_major__ == 2) && (__clang_minor__ < 6))
|
||||
# error "GLM requires Clang 2.6 or higher"
|
||||
# elif(__clang_major__ == 2) && (__clang_minor__ == 6)
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG26
|
||||
# elif(__clang_major__ == 2) && (__clang_minor__ == 7)
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG27
|
||||
@ -335,17 +325,7 @@
|
||||
|
||||
// Borland C++
|
||||
#elif defined(_BORLANDC_)
|
||||
# if defined(VER125)
|
||||
# define GLM_COMPILER GLM_COMPILER_BCB4
|
||||
# elif defined(VER130)
|
||||
# define GLM_COMPILER GLM_COMPILER_BCB5
|
||||
# elif defined(VER140)
|
||||
# define GLM_COMPILER GLM_COMPILER_BCB6
|
||||
# elif defined(VER200)
|
||||
# define GLM_COMPILER GLM_COMPILER_BCB2009
|
||||
# else
|
||||
# define GLM_COMPILER GLM_COMPILER_BC
|
||||
# endif
|
||||
# define GLM_COMPILER GLM_COMPILER_BC
|
||||
|
||||
// Codewarrior
|
||||
#elif defined(__MWERKS__)
|
||||
@ -443,7 +423,19 @@
|
||||
#else
|
||||
# if(__cplusplus >= 201103L)
|
||||
# define GLM_LANG GLM_LANG_CXX11
|
||||
// -std=c++0x or -std=gnu++0x
|
||||
# elif((GLM_COMPILER & GLM_COMPILER_CLANG) == GLM_COMPILER_CLANG)
|
||||
# if(GLM_PLATFORM == GLM_PLATFORM_APPLE)
|
||||
# define GLM_DETAIL_MAJOR 1
|
||||
# else
|
||||
# define GLM_DETAIL_MAJOR 0
|
||||
# endif
|
||||
# if(__clang_major__ < (2 + GLM_DETAIL_MAJOR))
|
||||
# define GLM_LANG GLM_LANG_CXX
|
||||
# elif(__has_feature(cxx_auto_type))
|
||||
# define GLM_LANG GLM_LANG_CXX0X
|
||||
# else
|
||||
# define GLM_LANG GLM_LANG_CXX98
|
||||
# endif
|
||||
# elif((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC)
|
||||
# if defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define GLM_LANG GLM_LANG_CXX0X
|
||||
|
@ -57,6 +57,13 @@ GLM 0.9.4.6: 2013-08-XX
|
||||
--------------------------------------------------------------------------------
|
||||
- Fixed detection to select the last known compiler if newer version #106
|
||||
- Fixed is_int and is_uint code duplication with GCC and C++11 #107
|
||||
- Fixed test suite build while using Clang in C++11 mode
|
||||
- Added c++1y mode support in CMake test suite
|
||||
- Removed ms extension mode to CMake when no using Visual C++
|
||||
- Added pedantic mode to CMake test suite for Clang and GCC
|
||||
- Added use of GCC frontend on Unix for ICC and Visual C++ fronted on Windows
|
||||
for ICC
|
||||
- Added compilation errors for unsupported compiler versions
|
||||
|
||||
================================================================================
|
||||
GLM 0.9.4.5: 2013-08-12
|
||||
|
@ -170,15 +170,7 @@ namespace findMSB
|
||||
{0x08000000, 27},
|
||||
{0x10000000, 28},
|
||||
{0x20000000, 29},
|
||||
{0x40000000, 30},
|
||||
{0x80000000, 30},
|
||||
{0xffffffff, -1},
|
||||
{0xfffffffe, 0},
|
||||
{0xfffffffd, 1},
|
||||
{0xfffffffc, 1},
|
||||
{0xfffffffb, 2},
|
||||
{0xfffffffa, 2},
|
||||
{0xfffffff0, 3}
|
||||
{0x40000000, 30}
|
||||
};
|
||||
|
||||
int test()
|
||||
@ -209,8 +201,7 @@ namespace findLSB
|
||||
{
|
||||
{0x00000001, 0},
|
||||
{0x00000003, 0},
|
||||
{0x00000002, 1},
|
||||
{0x80000000, 31}
|
||||
{0x00000002, 1}
|
||||
};
|
||||
|
||||
int test()
|
||||
|
4
test/external/gli/core/operation.inl
vendored
4
test/external/gli/core/operation.inl
vendored
@ -123,8 +123,8 @@ namespace gli
|
||||
glm::byte * DstData = DstMipmap.data();
|
||||
glm::byte const * const SrcData = SrcMipmap.data();
|
||||
|
||||
std::size_t SizeX = std::min(std::size_t(SrcSize.x + SrcPosition.x), std::size_t(DstMipmap.dimensions().x + DstPosition.x));
|
||||
std::size_t SizeY = std::min(std::size_t(SrcSize.y + SrcPosition.y), std::size_t(DstMipmap.dimensions().y + DstPosition.y));
|
||||
std::size_t SizeX = glm::min(std::size_t(SrcSize.x + SrcPosition.x), std::size_t(DstMipmap.dimensions().x + DstPosition.x));
|
||||
std::size_t SizeY = glm::min(std::size_t(SrcSize.y + SrcPosition.y), std::size_t(DstMipmap.dimensions().y + DstPosition.y));
|
||||
|
||||
for(std::size_t j = 0; j < SizeY; ++j)
|
||||
{
|
||||
|
@ -361,8 +361,8 @@ namespace bitfieldInterleave
|
||||
|
||||
int test()
|
||||
{
|
||||
glm::uint32 x_max = 1 << 13;
|
||||
glm::uint32 y_max = 1 << 12;
|
||||
glm::uint32 x_max = 1 << 11;
|
||||
glm::uint32 y_max = 1 << 10;
|
||||
|
||||
// ALU
|
||||
std::vector<glm::uint64> Data(x_max * y_max);
|
||||
@ -493,17 +493,14 @@ namespace bitfieldInterleave
|
||||
# if(GLM_ARCH != GLM_ARCH_PURE)
|
||||
{
|
||||
// SIMD
|
||||
glm::int32 simd_x_max = 1 << 13;
|
||||
glm::int32 simd_y_max = 1 << 12;
|
||||
|
||||
std::vector<__m128i> SimdData(x_max * y_max);
|
||||
std::vector<__m128i> SimdParam(x_max * y_max);
|
||||
for(int i = 0; i < SimdParam.size(); ++i)
|
||||
SimdParam[i] = _mm_set_epi32(i % simd_x_max, 0, i / simd_y_max, 0);
|
||||
SimdParam[i] = _mm_set_epi32(i % x_max, 0, i / y_max, 0);
|
||||
|
||||
std::clock_t LastTime = std::clock();
|
||||
|
||||
for(std::size_t i = 0; i < Data.size(); ++i)
|
||||
for(std::size_t i = 0; i < SimdData.size(); ++i)
|
||||
SimdData[i] = glm::detail::_mm_bit_interleave_si128(SimdParam[i]);
|
||||
|
||||
std::clock_t Time = std::clock() - LastTime;
|
||||
|
Loading…
Reference in New Issue
Block a user