From 132db6225e5e8af78a8ce36f51c1429b7a0064ca Mon Sep 17 00:00:00 2001 From: Shyotl Date: Thu, 16 Apr 2020 00:49:42 -0500 Subject: [PATCH] Make Debug configuration compile once more. --- indra/llmath/llmatrix3a.h | 3 +++ indra/llmath/llmatrix4a.h | 2 ++ indra/llmath/llplane.h | 3 ++- indra/llmath/llquaternion2.h | 2 ++ indra/llmath/llvector4a.h | 2 ++ indra/newview/llattachmentsmgr.cpp | 5 ++++- indra/newview/pipeline.cpp | 4 ++-- 7 files changed, 17 insertions(+), 4 deletions(-) diff --git a/indra/llmath/llmatrix3a.h b/indra/llmath/llmatrix3a.h index 933a15081..491fac5f2 100644 --- a/indra/llmath/llmatrix3a.h +++ b/indra/llmath/llmatrix3a.h @@ -126,9 +126,12 @@ public: // Returns true if this rotation is orthonormal with det ~= 1 inline bool isOkRotation() const; } LL_ALIGN_POSTFIX(16); + +#if !defined(LL_DEBUG) static_assert(std::is_trivial::value, "LLMatrix3a must be a trivial type"); static_assert(std::is_standard_layout::value, "LLMatrix3a must be a standard layout type"); static_assert(std::is_trivial::value, "LLRotation must be a trivial type"); static_assert(std::is_standard_layout::value, "LLRotation must be a standard layout type"); #endif +#endif diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h index 29298886e..024dbb6c5 100644 --- a/indra/llmath/llmatrix4a.h +++ b/indra/llmath/llmatrix4a.h @@ -718,6 +718,8 @@ inline std::ostream& operator<<(std::ostream& s, const LLMatrix4a& m) void matMulBoundBox(const LLMatrix4a &a, const LLVector4a *in_extents, LLVector4a *out_extents); +#if !defined(LL_DEBUG) static_assert(std::is_trivial::value, "LLMatrix4a must be a trivial type"); static_assert(std::is_standard_layout::value, "LLMatrix4a must be a standard layout type"); #endif +#endif diff --git a/indra/llmath/llplane.h b/indra/llmath/llplane.h index b7dafd96f..e1aa741f1 100644 --- a/indra/llmath/llplane.h +++ b/indra/llmath/llplane.h @@ -104,7 +104,8 @@ private: LL_ALIGN_16(LLVector4a mV); } LL_ALIGN_POSTFIX(16); +#if !defined(LL_DEBUG) static_assert(std::is_trivial::value, "LLPlane must be a trivial type"); static_assert(std::is_standard_layout::value, "LLPlane must be a standard layout type"); - +#endif #endif // LL_LLPLANE_H diff --git a/indra/llmath/llquaternion2.h b/indra/llmath/llquaternion2.h index 8546c6b42..75b54be0e 100644 --- a/indra/llmath/llquaternion2.h +++ b/indra/llmath/llquaternion2.h @@ -105,7 +105,9 @@ protected: } LL_ALIGN_POSTFIX(16); +#if !defined(LL_DEBUG) static_assert(std::is_trivial::value, "LLQuaternion2 must be a trivial type"); static_assert(std::is_standard_layout::value, "LLQuaternion2 must be a standard layout type"); +#endif #endif diff --git a/indra/llmath/llvector4a.h b/indra/llmath/llvector4a.h index 9e5b269e4..b96671824 100644 --- a/indra/llmath/llvector4a.h +++ b/indra/llmath/llvector4a.h @@ -350,6 +350,8 @@ inline std::ostream& operator<<(std::ostream& s, const LLVector4a& v) return s; } +#if !defined(LL_DEBUG) static_assert(std::is_trivial::value, "LLVector4a must be a be a trivial type"); static_assert(std::is_standard_layout::value, "LLVector4a must be a standard layout type"); #endif +#endif diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index 2be3da1d4..ef533de19 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -349,7 +349,10 @@ bool LLAttachmentsMgr::getPendingAttachments(uuid_set_t& ids) const ids.clear(); // Returns the union of the LL maintained list of attachments that are waiting for link creation and our maintained list of attachments that are pending link creation - set_union(mRecentlyArrivedAttachments.begin(), mRecentlyArrivedAttachments.end(), mPendingAttachLinks.begin(), mPendingAttachLinks.end(), std::inserter(ids, ids.begin())); + ids.insert(mRecentlyArrivedAttachments.begin(), mRecentlyArrivedAttachments.end()); + ids.insert(mPendingAttachLinks.begin(), mPendingAttachLinks.end()); + // Singu Note: "Expression: Sequence not ordered" using std::set_union + //set_union(mRecentlyArrivedAttachments.begin(), mRecentlyArrivedAttachments.end(), mPendingAttachLinks.begin(), mPendingAttachLinks.end(), std::inserter(ids, ids.begin())); return !ids.empty(); } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ab83c4f21..db626588e 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1153,7 +1153,7 @@ void LLPipeline::createGLBuffers() { if (!mNoiseMap) { - LLVector3 noise[NOISE_MAP_RES*NOISE_MAP_RES]; + std::array noise; F32 scaler = gSavedSettings.getF32("RenderDeferredNoise")/100.f; for (auto& val : noise) @@ -1166,7 +1166,7 @@ void LLPipeline::createGLBuffers() mNoiseMap = LLImageGL::createTextureName(); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseMap->getTexName()); - LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, NOISE_MAP_RES, NOISE_MAP_RES, GL_RGB, GL_FLOAT, noise); + LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, NOISE_MAP_RES, NOISE_MAP_RES, GL_RGB, GL_FLOAT, noise.data()); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); }