summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-11-19 21:05:46 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2025-11-19 21:05:46 +0200
commit093d969eb97ca03dbf4ae5cd3a3c784f58613a32 (patch)
tree916a65d49f2bfe6c12effba979bfa39417d6304a /indra/llmath
parent7e09943d57ecf2d9b15249cbc19b4e2ec16f7bf3 (diff)
parentae659adab6f8d1adf0224d12fb3b379251eaa501 (diff)
Merge branch 'develop-linux' into marchcat/slua-linux
# Conflicts: # indra/newview/llfeaturemanager.cpp # indra/newview/llstartup.cpp
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/CMakeLists.txt8
-rw-r--r--indra/llmath/llcalc.cpp11
-rw-r--r--indra/llmath/llcalc.h7
-rw-r--r--indra/llmath/llcalcparser.h18
-rw-r--r--indra/llmath/llcamera.h12
-rw-r--r--indra/llmath/llmatrix3a.cpp2
-rw-r--r--indra/llmath/llmatrix3a.h5
-rw-r--r--indra/llmath/llmatrix4a.h5
-rw-r--r--indra/llmath/llplane.h7
-rw-r--r--indra/llmath/llquantize.h8
-rw-r--r--indra/llmath/llquaternion2.h3
-rw-r--r--indra/llmath/llquaternion2.inl2
-rw-r--r--indra/llmath/llsimdtypes.inl4
-rw-r--r--indra/llmath/llvector4a.cpp4
-rw-r--r--indra/llmath/llvector4a.inl10
-rw-r--r--indra/llmath/llvector4logical.h4
-rw-r--r--indra/llmath/llvolume.cpp2
-rw-r--r--indra/llmath/llvolumeoctree.h6
-rw-r--r--indra/llmath/tests/alignment_test.cpp5
19 files changed, 63 insertions, 60 deletions
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt
index bd860adc31..fb57e5db11 100644
--- a/indra/llmath/CMakeLists.txt
+++ b/indra/llmath/CMakeLists.txt
@@ -99,10 +99,14 @@ set(llmath_HEADER_FILES
list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES})
-add_library (llmath ${llmath_SOURCE_FILES})
+add_library(llmath ${llmath_SOURCE_FILES})
target_link_libraries(llmath llcommon llmeshoptimizer ll::sse2neon)
-target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories(llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+
+if (USE_PRECOMPILED_HEADERS)
+ target_precompile_headers(llmath REUSE_FROM llprecompiled)
+endif ()
# Add tests
if (LL_TESTS)
diff --git a/indra/llmath/llcalc.cpp b/indra/llmath/llcalc.cpp
index e060b5df58..311e1e7059 100644
--- a/indra/llmath/llcalc.cpp
+++ b/indra/llmath/llcalc.cpp
@@ -116,17 +116,6 @@ void LLCalc::clearAllVariables()
mVariables.clear();
}
-/*
-void LLCalc::updateVariables(LLSD& vars)
-{
- LLSD::map_iterator cIt = vars.beginMap();
- for(; cIt != vars.endMap(); cIt++)
- {
- setVar(cIt->first, (F32)(LLSD::Real)cIt->second);
- }
-}
-*/
-
bool LLCalc::evalString(const std::string& expression, F32& result)
{
std::string expr_upper = expression;
diff --git a/indra/llmath/llcalc.h b/indra/llmath/llcalc.h
index 09672eb13b..14797de996 100644
--- a/indra/llmath/llcalc.h
+++ b/indra/llmath/llcalc.h
@@ -73,10 +73,9 @@ public:
void setVar(const std::string& name, const F32& value);
void clearVar(const std::string& name);
void clearAllVariables();
-// void updateVariables(LLSD& vars);
bool evalString(const std::string& expression, F32& result);
- std::string::size_type getLastErrorPos() { return mLastErrorPos; }
+ std::string::size_type getLastErrorPos() const { return mLastErrorPos; }
static LLCalc* getInstance();
static void cleanUp();
@@ -89,10 +88,6 @@ private:
calc_map_t mConstants;
calc_map_t mVariables;
- // *TODO: Add support for storing user defined variables, and stored functions.
- // Will need UI work, and a means to save them between sessions.
-// calc_map_t mUserVariables;
-
// "There shall be only one"
static LLCalc* sInstance;
};
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h
index ea71752ebc..fe4e6bb1a4 100644
--- a/indra/llmath/llcalcparser.h
+++ b/indra/llmath/llcalcparser.h
@@ -27,6 +27,13 @@
#ifndef LL_CALCPARSER_H
#define LL_CALCPARSER_H
+#include "llpreprocessor.h"
+
+#if defined(LL_GNUC) && GCC_VERSION >= 130000
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wdangling-pointer"
+#endif
+
#include <boost/spirit/include/classic_attribute.hpp>
#include <boost/spirit/include/classic_core.hpp>
#include <boost/spirit/include/classic_error_handling.hpp>
@@ -35,6 +42,10 @@
#include <boost/spirit/include/classic_symbols.hpp>
using namespace boost::spirit::classic;
+#if defined(LL_GNUC) && GCC_VERSION >= 130000
+# pragma GCC diagnostic pop
+#endif
+
#include "llcalc.h"
#include "llmath.h"
@@ -131,14 +142,14 @@ struct LLCalcParser : grammar<LLCalcParser>
power =
unary_expr[power.value = arg1] >>
- *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&powf)(power.value, arg1)]))
+ *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&LLCalcParser::_pow)(self, power.value, arg1)]))
;
term =
power[term.value = arg1] >>
*(('*' >> assert_syntax(power[term.value *= arg1])) |
('/' >> assert_syntax(power[term.value /= arg1])) |
- ('%' >> assert_syntax(power[term.value = phoenix::bind(&fmodf)(term.value, arg1)]))
+ ('%' >> assert_syntax(power[term.value = phoenix::bind(&LLCalcParser::_fmod)(self, term.value, arg1)]))
)
;
@@ -177,10 +188,11 @@ private:
F32 _floor(const F32& a) const { return (F32)llfloor(a); }
F32 _ceil(const F32& a) const { return (F32)llceil(a); }
F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); }
+ F32 _pow(const F32& a, const F32& b) const { return powf(a, b); }
+ F32 _fmod(const F32&a, const F32& b) const { return fmodf(a, b); }
LLCalc::calc_map_t* mConstants;
LLCalc::calc_map_t* mVariables;
-// LLCalc::calc_map_t* mUserVariables;
F32& mResult;
};
diff --git a/indra/llmath/llcamera.h b/indra/llmath/llcamera.h
index 6201761c46..3863588407 100644
--- a/indra/llmath/llcamera.h
+++ b/indra/llmath/llcamera.h
@@ -60,10 +60,10 @@ constexpr F32 MAX_FIELD_OF_VIEW = 175.f * DEG_TO_RAD;
// roll(), pitch(), yaw()
// etc...
-LL_ALIGN_PREFIX(16)
-class LLCamera
+class alignas(16) LLCamera
: public LLCoordFrame
{
+ LL_ALIGN_NEW
public:
LLCamera(const LLCamera& rhs)
{
@@ -120,9 +120,9 @@ public:
};
private:
- LL_ALIGN_16(LLPlane mAgentPlanes[AGENT_PLANE_USER_CLIP_NUM]); //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP
- LL_ALIGN_16(LLPlane mRegionPlanes[AGENT_PLANE_USER_CLIP_NUM]); //frustum planes in a local region space, derived from mAgentPlanes
- LL_ALIGN_16(LLPlane mLastAgentPlanes[AGENT_PLANE_USER_CLIP_NUM]);
+ LLPlane mAgentPlanes[AGENT_PLANE_USER_CLIP_NUM]; //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP
+ LLPlane mRegionPlanes[AGENT_PLANE_USER_CLIP_NUM]; //frustum planes in a local region space, derived from mAgentPlanes
+ LLPlane mLastAgentPlanes[AGENT_PLANE_USER_CLIP_NUM];
U8 mPlaneMask[PLANE_MASK_NUM]; // 8 for alignment
F32 mView; // angle between top and bottom frustum planes in radians.
@@ -218,7 +218,7 @@ protected:
void calculateFrustumPlanes();
void calculateFrustumPlanes(F32 left, F32 right, F32 top, F32 bottom);
void calculateFrustumPlanesFromWindow(F32 x1, F32 y1, F32 x2, F32 y2);
-} LL_ALIGN_POSTFIX(16);
+};
#endif
diff --git a/indra/llmath/llmatrix3a.cpp b/indra/llmath/llmatrix3a.cpp
index c0b00201cf..904c9de2a1 100644
--- a/indra/llmath/llmatrix3a.cpp
+++ b/indra/llmath/llmatrix3a.cpp
@@ -28,7 +28,7 @@
#include "llmath.h"
-static LL_ALIGN_16(const F32 M_IDENT_3A[12]) =
+alignas(16) static const F32 M_IDENT_3A[12] =
{ 1.f, 0.f, 0.f, 0.f, // Column 1
0.f, 1.f, 0.f, 0.f, // Column 2
0.f, 0.f, 1.f, 0.f }; // Column 3
diff --git a/indra/llmath/llmatrix3a.h b/indra/llmath/llmatrix3a.h
index 9b173c22ed..742a2488fd 100644
--- a/indra/llmath/llmatrix3a.h
+++ b/indra/llmath/llmatrix3a.h
@@ -40,8 +40,9 @@
// LLMatrix3a is the base class for LLRotation, which should be used instead any time you're dealing with a
// rotation matrix.
-class LLMatrix3a
+class alignas(16) LLMatrix3a
{
+ LL_ALIGN_NEW
public:
// Utility function for quickly transforming an array of LLVector4a's
@@ -111,7 +112,7 @@ public:
protected:
- LL_ALIGN_16(LLVector4a mColumns[3]);
+ LLVector4a mColumns[3];
};
diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h
index 377203098e..2967949993 100644
--- a/indra/llmath/llmatrix4a.h
+++ b/indra/llmath/llmatrix4a.h
@@ -31,10 +31,11 @@
#include "m4math.h"
#include "m3math.h"
-class LLMatrix4a
+class alignas(16) LLMatrix4a
{
+ LL_ALIGN_NEW
public:
- LL_ALIGN_16(LLVector4a mMatrix[4]);
+ LLVector4a mMatrix[4];
LLMatrix4a() = default;
diff --git a/indra/llmath/llplane.h b/indra/llmath/llplane.h
index 832004bb64..822e6a7b6f 100644
--- a/indra/llmath/llplane.h
+++ b/indra/llmath/llplane.h
@@ -36,10 +36,9 @@
// The plane normal = [A, B, C]
// The closest approach = D / sqrt(A*A + B*B + C*C)
-
-LL_ALIGN_PREFIX(16)
-class LLPlane
+class alignas(16) LLPlane
{
+ LL_ALIGN_NEW
public:
// Constructors
@@ -102,7 +101,7 @@ public:
private:
LLVector4a mV;
-} LL_ALIGN_POSTFIX(16);
+};
static_assert(std::is_trivial<LLPlane>::value, "LLPlane must be a trivial type");
diff --git a/indra/llmath/llquantize.h b/indra/llmath/llquantize.h
index e8d880122e..2a53fdbf84 100644
--- a/indra/llmath/llquantize.h
+++ b/indra/llmath/llquantize.h
@@ -29,16 +29,16 @@
#define LL_LLQUANTIZE_H
const U16 U16MAX = 65535;
-LL_ALIGN_16( const F32 F_U16MAX_4A[4] ) = { 65535.f, 65535.f, 65535.f, 65535.f };
+alignas(16) const F32 F_U16MAX_4A[4] = { 65535.f, 65535.f, 65535.f, 65535.f };
const F32 OOU16MAX = 1.f/(F32)(U16MAX);
-LL_ALIGN_16( const F32 F_OOU16MAX_4A[4] ) = { OOU16MAX, OOU16MAX, OOU16MAX, OOU16MAX };
+alignas(16) const F32 F_OOU16MAX_4A[4] = { OOU16MAX, OOU16MAX, OOU16MAX, OOU16MAX };
const U8 U8MAX = 255;
-LL_ALIGN_16( const F32 F_U8MAX_4A[4] ) = { 255.f, 255.f, 255.f, 255.f };
+alignas(16) const F32 F_U8MAX_4A[4] = { 255.f, 255.f, 255.f, 255.f };
const F32 OOU8MAX = 1.f/(F32)(U8MAX);
-LL_ALIGN_16( const F32 F_OOU8MAX_4A[4] ) = { OOU8MAX, OOU8MAX, OOU8MAX, OOU8MAX };
+alignas(16) const F32 F_OOU8MAX_4A[4] = { OOU8MAX, OOU8MAX, OOU8MAX, OOU8MAX };
const U8 FIRSTVALIDCHAR = 54;
const U8 MAXSTRINGVAL = U8MAX - FIRSTVALIDCHAR; //we don't allow newline or null
diff --git a/indra/llmath/llquaternion2.h b/indra/llmath/llquaternion2.h
index c9dcc4573f..d73e1a0ca2 100644
--- a/indra/llmath/llquaternion2.h
+++ b/indra/llmath/llquaternion2.h
@@ -40,8 +40,9 @@
/////////////////////////////
#include "llquaternion.h"
-class LLQuaternion2
+class alignas(16) LLQuaternion2
{
+ LL_ALIGN_NEW
public:
//////////////////////////
diff --git a/indra/llmath/llquaternion2.inl b/indra/llmath/llquaternion2.inl
index ce5ed73926..2ebc8e0bfb 100644
--- a/indra/llmath/llquaternion2.inl
+++ b/indra/llmath/llquaternion2.inl
@@ -57,7 +57,7 @@ inline LLVector4a& LLQuaternion2::getVector4aRw()
// Set this quaternion to the conjugate of src
inline void LLQuaternion2::setConjugate(const LLQuaternion2& src)
{
- static LL_ALIGN_16( const U32 F_QUAT_INV_MASK_4A[4] ) = { 0x80000000, 0x80000000, 0x80000000, 0x00000000 };
+ alignas(16) static const U32 F_QUAT_INV_MASK_4A[4] = { 0x80000000, 0x80000000, 0x80000000, 0x00000000 };
mQ = _mm_xor_ps(src.mQ, *reinterpret_cast<const LLQuad*>(&F_QUAT_INV_MASK_4A));
}
diff --git a/indra/llmath/llsimdtypes.inl b/indra/llmath/llsimdtypes.inl
index 125f4b9df5..20ea7640b6 100644
--- a/indra/llmath/llsimdtypes.inl
+++ b/indra/llmath/llsimdtypes.inl
@@ -61,7 +61,7 @@ inline LLSimdScalar operator/(const LLSimdScalar& a, const LLSimdScalar& b)
inline LLSimdScalar operator-(const LLSimdScalar& a)
{
- static LL_ALIGN_16(const U32 signMask[4]) = {0x80000000, 0x80000000, 0x80000000, 0x80000000 };
+ alignas(16) static const U32 signMask[4] = {0x80000000, 0x80000000, 0x80000000, 0x80000000 };
ll_assert_aligned(signMask,16);
return _mm_xor_ps(*reinterpret_cast<const LLQuad*>(signMask), a);
}
@@ -146,7 +146,7 @@ inline LLSimdScalar& LLSimdScalar::operator/=(const LLSimdScalar& rhs)
inline LLSimdScalar LLSimdScalar::getAbs() const
{
- static const LL_ALIGN_16(U32 F_ABS_MASK_4A[4]) = { 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF };
+ alignas(16) static const U32 F_ABS_MASK_4A[4] = { 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF };
ll_assert_aligned(F_ABS_MASK_4A,16);
return _mm_and_ps( mQ, *reinterpret_cast<const LLQuad*>(F_ABS_MASK_4A));
}
diff --git a/indra/llmath/llvector4a.cpp b/indra/llmath/llvector4a.cpp
index b81d50f0f9..6bdc97e420 100644
--- a/indra/llmath/llvector4a.cpp
+++ b/indra/llmath/llvector4a.cpp
@@ -101,7 +101,7 @@ void LLVector4a::quantize8( const LLVector4a& low, const LLVector4a& high )
// 8-bit quantization means we can do with just 12 bits of reciprocal accuracy
const LLVector4a oneOverDelta = _mm_rcp_ps(delta.mQ);
// {
-// static LL_ALIGN_16( const F32 F_TWO_4A[4] ) = { 2.f, 2.f, 2.f, 2.f };
+// alignas(16) static const F32 F_TWO_4A[4] = { 2.f, 2.f, 2.f, 2.f };
// LLVector4a two; two.load4a( F_TWO_4A );
//
// // Here we use _mm_rcp_ps plus one round of newton-raphson
@@ -146,7 +146,7 @@ void LLVector4a::quantize16( const LLVector4a& low, const LLVector4a& high )
// 16-bit quantization means we need a round of Newton-Raphson
LLVector4a oneOverDelta;
{
- static LL_ALIGN_16( const F32 F_TWO_4A[4] ) = { 2.f, 2.f, 2.f, 2.f };
+ alignas(16) static const F32 F_TWO_4A[4] = { 2.f, 2.f, 2.f, 2.f };
ll_assert_aligned(F_TWO_4A,16);
LLVector4a two; two.load4a( F_TWO_4A );
diff --git a/indra/llmath/llvector4a.inl b/indra/llmath/llvector4a.inl
index 443a46c317..b6e2a4fce5 100644
--- a/indra/llmath/llvector4a.inl
+++ b/indra/llmath/llvector4a.inl
@@ -196,7 +196,7 @@ inline void LLVector4a::setDiv(const LLVector4a& a, const LLVector4a& b)
// Set this to the element-wise absolute value of src
inline void LLVector4a::setAbs(const LLVector4a& src)
{
- static const LL_ALIGN_16(U32 F_ABS_MASK_4A[4]) = { 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF };
+ alignas(16) static const U32 F_ABS_MASK_4A[4] = { 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF };
mQ = _mm_and_ps(src.mQ, *reinterpret_cast<const LLQuad*>(F_ABS_MASK_4A));
}
@@ -448,7 +448,7 @@ inline void LLVector4a::normalize3fast_checked(LLVector4a* d)
// Return true if this vector is normalized with respect to x,y,z up to tolerance
inline LLBool32 LLVector4a::isNormalized3( F32 tolerance ) const
{
- static LL_ALIGN_16(const U32 ones[4]) = { 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000 };
+ alignas(16) static const U32 ones[4] = { 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000 };
LLSimdScalar tol = _mm_load_ss( &tolerance );
tol = _mm_mul_ss( tol, tol );
LLVector4a lenSquared; lenSquared.setAllDot3( *this, *this );
@@ -460,7 +460,7 @@ inline LLBool32 LLVector4a::isNormalized3( F32 tolerance ) const
// Return true if this vector is normalized with respect to all components up to tolerance
inline LLBool32 LLVector4a::isNormalized4( F32 tolerance ) const
{
- static LL_ALIGN_16(const U32 ones[4]) = { 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000 };
+ alignas(16) static const U32 ones[4] = { 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000 };
LLSimdScalar tol = _mm_load_ss( &tolerance );
tol = _mm_mul_ss( tol, tol );
LLVector4a lenSquared; lenSquared.setAllDot4( *this, *this );
@@ -507,7 +507,7 @@ inline void LLVector4a::setLerp(const LLVector4a& lhs, const LLVector4a& rhs, F3
inline LLBool32 LLVector4a::isFinite3() const
{
- static LL_ALIGN_16(const U32 nanOrInfMask[4]) = { 0x7f800000, 0x7f800000, 0x7f800000, 0x7f800000 };
+ alignas(16) static const U32 nanOrInfMask[4] = { 0x7f800000, 0x7f800000, 0x7f800000, 0x7f800000 };
ll_assert_aligned(nanOrInfMask,16);
const __m128i nanOrInfMaskV = *reinterpret_cast<const __m128i*> (nanOrInfMask);
const __m128i maskResult = _mm_and_si128( _mm_castps_si128(mQ), nanOrInfMaskV );
@@ -517,7 +517,7 @@ inline LLBool32 LLVector4a::isFinite3() const
inline LLBool32 LLVector4a::isFinite4() const
{
- static LL_ALIGN_16(const U32 nanOrInfMask[4]) = { 0x7f800000, 0x7f800000, 0x7f800000, 0x7f800000 };
+ alignas(16) static const U32 nanOrInfMask[4] = { 0x7f800000, 0x7f800000, 0x7f800000, 0x7f800000 };
const __m128i nanOrInfMaskV = *reinterpret_cast<const __m128i*> (nanOrInfMask);
const __m128i maskResult = _mm_and_si128( _mm_castps_si128(mQ), nanOrInfMaskV );
const LLVector4Logical equalityCheck = _mm_castsi128_ps(_mm_cmpeq_epi32( maskResult, nanOrInfMaskV ));
diff --git a/indra/llmath/llvector4logical.h b/indra/llmath/llvector4logical.h
index 77cb5862e5..411971c42d 100644
--- a/indra/llmath/llvector4logical.h
+++ b/indra/llmath/llvector4logical.h
@@ -39,7 +39,7 @@
// contact someone with SSE experience (Falcon, Richard, Davep, e.g.)
////////////////////////////
-static LL_ALIGN_16(const U32 S_V4LOGICAL_MASK_TABLE[4*4]) =
+alignas(16) static const U32 S_V4LOGICAL_MASK_TABLE[4*4] =
{
0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000,
@@ -77,7 +77,7 @@ public:
// Invert this mask
inline LLVector4Logical& invert()
{
- static const LL_ALIGN_16(U32 allOnes[4]) = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
+ alignas(16) static const U32 allOnes[4] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
ll_assert_aligned(allOnes,16);
mQ = _mm_andnot_ps( mQ, *(LLQuad*)(allOnes) );
return *this;
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index b3cb278d59..dfad66040e 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2348,7 +2348,9 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
const LLSD::Binary& pos = mdl[i]["Position"].asBinary();
const LLSD::Binary& norm = mdl[i]["Normal"].asBinary();
+#if 0 // keep this code for now in case we decide to add support for on-the-wire tangents
const LLSD::Binary& tangent = mdl[i]["Tangent"].asBinary();
+#endif
const LLSD::Binary& tc = mdl[i]["TexCoord0"].asBinary();
const LLSD::Binary& idx = mdl[i]["TriangleList"].asBinary();
diff --git a/indra/llmath/llvolumeoctree.h b/indra/llmath/llvolumeoctree.h
index 1d74644715..4200e0d5a1 100644
--- a/indra/llmath/llvolumeoctree.h
+++ b/indra/llmath/llvolumeoctree.h
@@ -53,7 +53,7 @@ public:
}
- LL_ALIGN_16(LLVector4a mPositionGroup);
+ LLVector4a mPositionGroup;
const LLVector4a* mV[3];
U32 mIndex[3];
@@ -99,8 +99,8 @@ public:
public:
- LL_ALIGN_16(LLVector4a mBounds[2]); // bounding box (center, size) of this node and all its children (tight fit to objects)
- LL_ALIGN_16(LLVector4a mExtents[2]); // extents (min, max) of this node and all its children
+ LLVector4a mBounds[2]; // bounding box (center, size) of this node and all its children (tight fit to objects)
+ LLVector4a mExtents[2]; // extents (min, max) of this node and all its children
};
class LLOctreeTriangleRayIntersect : public LLOctreeTraveler<LLVolumeTriangle, LLVolumeTriangle*>
diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp
index eb6fa4a3b8..f41ebe82aa 100644
--- a/indra/llmath/tests/alignment_test.cpp
+++ b/indra/llmath/tests/alignment_test.cpp
@@ -46,8 +46,7 @@ typedef test_group<alignment_test> alignment_test_t;
typedef alignment_test_t::object alignment_test_object_t;
tut::alignment_test_t tut_alignment_test("LLAlignment");
-LL_ALIGN_PREFIX(16)
-class MyVector4a
+class alignas(16) MyVector4a
{
public:
void* operator new(size_t size)
@@ -71,7 +70,7 @@ public:
}
LLQuad mQ;
-} LL_ALIGN_POSTFIX(16);
+};
// Verify that aligned allocators perform as advertised.