Remove functions overloading cmath functions from VecUtil.
authorJarkko Pöyry <jpoyry@google.com>
Fri, 22 May 2015 22:22:15 +0000 (15:22 -0700)
committerJarkko Pöyry <jpoyry@google.com>
Fri, 29 May 2015 02:40:36 +0000 (19:40 -0700)
Change-Id: Ie29b3fb393ae6f2693a77a4fba01bad4f1c39a58

framework/common/tcuVectorUtil.hpp
framework/opengl/simplereference/sglrReferenceContext.cpp

index 222e99c..e21fb2e 100644 (file)
@@ -63,8 +63,6 @@ template<>                            inline  deUint32        negate<deUint32>        (deUint32 f)    { return (deUint32)-
 
 inline float radians           (float f) { return deFloatRadians(f); }
 inline float degrees           (float f) { return deFloatDegrees(f); }
-inline float exp2                      (float f) { return deFloatExp2(f); }
-inline float log2                      (float f) { return deFloatLog2(f); }
 inline float inverseSqrt       (float f) { return deFloatRsq(f); }
 inline float sign                      (float f) { return (f < 0.0f) ? -1.0f : ((f > 0.0f) ? +1.0f : 0.0f); }
 inline float fract                     (float f) { return f - deFloatFloor(f); }
@@ -98,10 +96,6 @@ inline float refract         (float i, float n, float eta)
                return eta * i - (eta * cosAngle + deFloatSqrt(k)) * n;
 }
 
-inline float asinh                     (float a) { return deFloatAsinh(a); }
-inline float acosh                     (float a) { return deFloatAcosh(a); }
-inline float atanh                     (float a) { return deFloatAtanh(a); }
-
 template<typename T> inline bool       lessThan                        (T a, T b) { return (a < b); }
 template<typename T> inline bool       lessThanEqual           (T a, T b) { return (a <= b); }
 template<typename T> inline bool       greaterThan                     (T a, T b) { return (a > b); }
@@ -115,8 +109,6 @@ inline bool boolNot                         (bool a) { return !a; }
 
 inline int chopToInt                   (float a) { return deChopFloatToInt32(a); }
 
-inline float trunc                             (float a) { return (float)chopToInt(a); }
-
 inline float roundToEven (float a)
 {
        float q = deFloatFrac(a);
@@ -457,7 +449,7 @@ TCU_DECLARE_VECTOR_UNARY_FUNC(inverseSqrt, deFloatRsq)
 TCU_DECLARE_VECTOR_UNARY_FUNC(abs, de::abs)
 TCU_DECLARE_VECTOR_UNARY_FUNC(sign, deFloatSign)
 TCU_DECLARE_VECTOR_UNARY_FUNC(floor, deFloatFloor)
-TCU_DECLARE_VECTOR_UNARY_FUNC(trunc, trunc)
+TCU_DECLARE_VECTOR_UNARY_FUNC(trunc, deFloatTrunc)
 TCU_DECLARE_VECTOR_UNARY_FUNC(roundToEven, roundToEven)
 TCU_DECLARE_VECTOR_UNARY_FUNC(ceil, deFloatCeil)
 TCU_DECLARE_VECTOR_UNARY_FUNC(fract, deFloatFrac)
index f090707..e5f443b 100644 (file)
@@ -2068,12 +2068,12 @@ void ReferenceContext::framebufferTextureLayer (deUint32 target, deUint32 attach
                        if (texObj->getType() == Texture::TYPE_2D_ARRAY || texObj->getType() == Texture::TYPE_CUBE_MAP_ARRAY)
                        {
                                RC_IF_ERROR((layer < 0) || (layer >= GL_MAX_ARRAY_TEXTURE_LAYERS),              GL_INVALID_VALUE,               RC_RET_VOID);
-                               RC_IF_ERROR((level < 0) || (level > tcu::log2(GL_MAX_TEXTURE_SIZE)),    GL_INVALID_VALUE,               RC_RET_VOID);
+                               RC_IF_ERROR((level < 0) || (level > deFloatLog2(GL_MAX_TEXTURE_SIZE)),  GL_INVALID_VALUE,               RC_RET_VOID);
                        }
                        else if (texObj->getType() == Texture::TYPE_3D)
                        {
-                               RC_IF_ERROR((layer < 0) || (layer >= GL_MAX_3D_TEXTURE_SIZE),                   GL_INVALID_VALUE,               RC_RET_VOID);
-                               RC_IF_ERROR((level < 0) || (level > tcu::log2(GL_MAX_3D_TEXTURE_SIZE)), GL_INVALID_VALUE,               RC_RET_VOID);
+                               RC_IF_ERROR((layer < 0) || (layer >= GL_MAX_3D_TEXTURE_SIZE),                           GL_INVALID_VALUE,               RC_RET_VOID);
+                               RC_IF_ERROR((level < 0) || (level > deFloatLog2(GL_MAX_3D_TEXTURE_SIZE)),       GL_INVALID_VALUE,               RC_RET_VOID);
                        }
                }