Merge branch 'animesh' of https://github.com/singularity-viewer/SingularityViewer into animesh
This commit is contained in:
@@ -17,6 +17,8 @@ if(NOT DEFINED COMMON_CMAKE_DIR)
|
||||
set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake")
|
||||
endif(NOT DEFINED COMMON_CMAKE_DIR)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
set(LIBS_CLOSED_PREFIX)
|
||||
set(LIBS_OPEN_PREFIX)
|
||||
set(SCRIPTS_PREFIX ../scripts)
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
//////////////////////////
|
||||
|
||||
// Ctor
|
||||
LLMatrix3a() {}
|
||||
LLMatrix3a() = default;
|
||||
|
||||
// Ctor for setting by columns
|
||||
inline LLMatrix3a( const LLVector4a& c0, const LLVector4a& c1, const LLVector4a& c2 );
|
||||
@@ -121,12 +121,14 @@ class LLRotation : public LLMatrix3a
|
||||
{
|
||||
public:
|
||||
|
||||
LLRotation() {}
|
||||
LLRotation() = default;
|
||||
|
||||
// Returns true if this rotation is orthonormal with det ~= 1
|
||||
inline bool isOkRotation() const;
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
static_assert(std::is_trivial<LLMatrix3a>::value, "LLMatrix3a must be a trivial type");
|
||||
static_assert(std::is_standard_layout<LLMatrix3a>::value, "LLMatrix3a must be a standard layout type");
|
||||
|
||||
static_assert(std::is_trivially_copyable<LLMatrix3a>::value, "LLMatrix3a must be a trivially copyable type");
|
||||
static_assert(std::is_trivially_copyable<LLRotation>::value, "LLRotation must be a trivially copyable type");
|
||||
static_assert(std::is_trivial<LLRotation>::value, "LLRotation must be a trivial type");
|
||||
static_assert(std::is_standard_layout<LLRotation>::value, "LLRotation must be a standard layout type");
|
||||
#endif
|
||||
|
||||
@@ -50,13 +50,22 @@ public:
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void* operator new[](size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
LLMatrix4a()
|
||||
{}
|
||||
void operator delete[](void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
LLMatrix4a() = default;
|
||||
LLMatrix4a(const LLQuad& q1,const LLQuad& q2,const LLQuad& q3,const LLQuad& q4)
|
||||
{
|
||||
mMatrix[0] = q1;
|
||||
@@ -709,5 +718,6 @@ inline std::ostream& operator<<(std::ostream& s, const LLMatrix4a& m)
|
||||
|
||||
void matMulBoundBox(const LLMatrix4a &a, const LLVector4a *in_extents, LLVector4a *out_extents);
|
||||
|
||||
static_assert(std::is_trivially_copyable<LLMatrix4a>::value, "LLMatrix4a must be a trivially copyable type");
|
||||
static_assert(std::is_trivial<LLMatrix4a>::value, "LLMatrix4a must be a trivial type");
|
||||
static_assert(std::is_standard_layout<LLMatrix4a>::value, "LLMatrix4a must be a standard layout type");
|
||||
#endif
|
||||
|
||||
@@ -43,7 +43,7 @@ class LLPlane
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
LLPlane() {}; // no default constructor
|
||||
LLPlane() = default; // no default constructor
|
||||
LLPlane(const LLVector3 &p0, F32 d) { setVec(p0, d); }
|
||||
LLPlane(const LLVector3 &p0, const LLVector3 &n) { setVec(p0, n); }
|
||||
inline void setVec(const LLVector3 &p0, F32 d) { mV.set(p0[0], p0[1], p0[2], d); }
|
||||
@@ -104,6 +104,7 @@ private:
|
||||
LL_ALIGN_16(LLVector4a mV);
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
|
||||
|
||||
static_assert(std::is_trivial<LLPlane>::value, "LLPlane must be a trivial type");
|
||||
static_assert(std::is_standard_layout<LLPlane>::value, "LLPlane must be a standard layout type");
|
||||
|
||||
#endif // LL_LLPLANE_H
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
//////////////////////////
|
||||
|
||||
// Ctor
|
||||
LLQuaternion2() {}
|
||||
LLQuaternion2() = default;
|
||||
|
||||
// Ctor from LLQuaternion
|
||||
explicit LLQuaternion2( const class LLQuaternion& quat );
|
||||
@@ -105,6 +105,7 @@ protected:
|
||||
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
|
||||
static_assert(std::is_trivially_copyable<LLQuaternion2>::value, "LLQuaternion2 must be a trivially copyable type");
|
||||
static_assert(std::is_trivial<LLQuaternion2>::value, "LLQuaternion2 must be a trivial type");
|
||||
static_assert(std::is_standard_layout<LLQuaternion2>::value, "LLQuaternion2 must be a standard layout type");
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,7 +50,7 @@ __forceinline const __m128i _mm_castps_si128( const __m128 a ) { return reinterp
|
||||
class LLBool32
|
||||
{
|
||||
public:
|
||||
inline LLBool32() {}
|
||||
inline LLBool32() = default;
|
||||
inline LLBool32(int rhs) : m_bool(rhs) {}
|
||||
inline LLBool32(unsigned int rhs) : m_bool(rhs) {}
|
||||
inline LLBool32(bool rhs) { m_bool = static_cast<const int>(rhs); }
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
class LLSimdScalar
|
||||
{
|
||||
public:
|
||||
inline LLSimdScalar() {}
|
||||
inline LLSimdScalar() = default;
|
||||
inline LLSimdScalar(LLQuad q)
|
||||
{
|
||||
mQ = q;
|
||||
@@ -120,8 +120,9 @@ public:
|
||||
private:
|
||||
LLQuad mQ;
|
||||
};
|
||||
|
||||
static_assert(std::is_trivially_copyable<LLBool32>::value, "LLBool32 must be a trivially copyable type");
|
||||
static_assert(std::is_trivially_copyable<LLSimdScalar>::value, "LLSimdScalar must be a trivially copyable type");
|
||||
static_assert(std::is_trivial<LLBool32>::value, "LLBool32 must be a trivial type");
|
||||
static_assert(std::is_standard_layout<LLBool32>::value, "LLBool32 must be a standard layout type");
|
||||
static_assert(std::is_trivial<LLSimdScalar>::value, "LLSimdScalar must be a trivial type");
|
||||
static_assert(std::is_standard_layout<LLSimdScalar>::value, "LLSimdScalar must be a standard layout type");
|
||||
|
||||
#endif //LL_SIMD_TYPES_H
|
||||
|
||||
@@ -93,9 +93,13 @@ public:
|
||||
////////////////////////////////////
|
||||
|
||||
LLVector4a()
|
||||
#if !defined(LL_DEBUG)
|
||||
= default;
|
||||
#else
|
||||
{ //DO NOT INITIALIZE -- The overhead is completely unnecessary
|
||||
ll_assert_aligned(this,16);
|
||||
}
|
||||
#endif
|
||||
|
||||
LLVector4a(F32 x, F32 y, F32 z, F32 w = 0.f)
|
||||
{
|
||||
@@ -346,5 +350,6 @@ inline std::ostream& operator<<(std::ostream& s, const LLVector4a& v)
|
||||
return s;
|
||||
}
|
||||
|
||||
static_assert(std::is_trivially_copyable<LLVector4a>::value, "LLVector4a must be a trivially copyable type");
|
||||
static_assert(std::is_trivial<LLVector4a>::value, "LLVector4a must be a be a trivial type");
|
||||
static_assert(std::is_standard_layout<LLVector4a>::value, "LLVector4a must be a standard layout type");
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
};
|
||||
|
||||
// Empty default ctor
|
||||
LLVector4Logical() {}
|
||||
LLVector4Logical() = default;
|
||||
|
||||
LLVector4Logical( const LLQuad& quad )
|
||||
{
|
||||
@@ -122,5 +122,7 @@ private:
|
||||
|
||||
LLQuad mQ;
|
||||
};
|
||||
static_assert(std::is_trivial<LLVector4Logical>::value, "LLVector4Logical must be a trivial type");
|
||||
static_assert(std::is_standard_layout<LLVector4Logical>::value, "LLVector4Logical must be a standard layout type");
|
||||
|
||||
#endif //LL_VECTOR4ALOGICAL_H
|
||||
|
||||
@@ -332,11 +332,11 @@ void LLPluginClassMedia::setSizeInternal(void)
|
||||
mRequestedMediaHeight = nextPowerOf2(mRequestedMediaHeight);
|
||||
}
|
||||
|
||||
if(mRequestedMediaWidth > 2048)
|
||||
mRequestedMediaWidth = 2048;
|
||||
if(mRequestedMediaWidth > 6000)
|
||||
mRequestedMediaWidth = 6000;
|
||||
|
||||
if(mRequestedMediaHeight > 2048)
|
||||
mRequestedMediaHeight = 2048;
|
||||
if(mRequestedMediaHeight > 6000)
|
||||
mRequestedMediaHeight = 6000;
|
||||
}
|
||||
|
||||
void LLPluginClassMedia::setAutoScale(bool auto_scale)
|
||||
|
||||
@@ -1157,8 +1157,8 @@ source_group("CMake Rules" FILES ViewerInstall.cmake)
|
||||
# the summary.json file is created for the benefit of the TeamCity builds, where
|
||||
# it is used to provide descriptive information to the build results page
|
||||
add_custom_target(generate_viewer_version ALL
|
||||
COMMAND cmake -E echo ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION} > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
||||
COMMAND cmake -E echo {"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"} > ${CMAKE_BINARY_DIR}/summary.json
|
||||
COMMAND ${CMAKE_COMMAND} -E echo ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION} > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E echo {"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"} > ${CMAKE_BINARY_DIR}/summary.json
|
||||
COMMENT "Generating viewer_version.txt for manifest processing"
|
||||
)
|
||||
|
||||
@@ -1342,6 +1342,7 @@ if (WINDOWS)
|
||||
shell32
|
||||
user32
|
||||
Vfw32
|
||||
wer
|
||||
Wbemuuid
|
||||
winspool
|
||||
Normaliz
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
|
||||
#include <fcntl.h> //_O_APPEND
|
||||
#include <io.h> //_open_osfhandle()
|
||||
#include <errorrep.h> // for AddERExcludedApplicationA()
|
||||
#include <process.h> // _spawnl()
|
||||
#include <tchar.h> // For TCHAR support
|
||||
#include <Werapi.h>
|
||||
@@ -379,34 +378,15 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
||||
|
||||
void LLAppViewerWin32::disableWinErrorReporting()
|
||||
{
|
||||
const char win_xp_string[] = "Microsoft Windows XP";
|
||||
BOOL is_win_xp = ( getOSInfo().getOSString().substr(0, strlen(win_xp_string) ) == win_xp_string ); /* Flawfinder: ignore*/
|
||||
if( is_win_xp )
|
||||
std::string const& executable_name = gDirUtilp->getExecutableFilename();
|
||||
|
||||
if( S_OK == WerAddExcludedApplication( utf8str_to_utf16str(executable_name).c_str(), FALSE ) )
|
||||
{
|
||||
// Note: we need to use run-time dynamic linking, because load-time dynamic linking will fail
|
||||
// on systems that don't have the library installed (all non-Windows XP systems)
|
||||
HINSTANCE fault_rep_dll_handle = LoadLibrary(L"faultrep.dll"); /* Flawfinder: ignore */
|
||||
if( fault_rep_dll_handle )
|
||||
{
|
||||
pfn_ADDEREXCLUDEDAPPLICATIONA pAddERExcludedApplicationA = (pfn_ADDEREXCLUDEDAPPLICATIONA) GetProcAddress(fault_rep_dll_handle, "AddERExcludedApplicationA");
|
||||
if( pAddERExcludedApplicationA )
|
||||
{
|
||||
|
||||
// Strip the path off the name
|
||||
const char* executable_name = gDirUtilp->getExecutableFilename().c_str();
|
||||
|
||||
if( 0 == pAddERExcludedApplicationA( executable_name ) )
|
||||
{
|
||||
U32 error_code = GetLastError();
|
||||
LL_INFOS() << "AddERExcludedApplication() failed with error code " << error_code << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS() << "AddERExcludedApplication() success for " << executable_name << LL_ENDL;
|
||||
}
|
||||
}
|
||||
FreeLibrary( fault_rep_dll_handle );
|
||||
}
|
||||
LL_INFOS() << "WerAddExcludedApplication() succeeded for " << executable_name << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS() << "WerAddExcludedApplication() failed for " << executable_name << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +431,7 @@ bool LLAppViewerWin32::init()
|
||||
{
|
||||
// Platform specific initialization.
|
||||
|
||||
// Turn off Windows XP Error Reporting
|
||||
// Turn off Windows Error Reporting
|
||||
// (Don't send our data to Microsoft--at least until we are Logo approved and have a way
|
||||
// of getting the data back from them.)
|
||||
//
|
||||
|
||||
@@ -796,9 +796,6 @@ static void xform4a(LLVector4a &tex_coord, const LLVector4a& trans, const LLVect
|
||||
// Texture transforms are done about the center of the face.
|
||||
st.setAdd(tex_coord, trans);
|
||||
|
||||
// Handle rotation
|
||||
LLVector4a rot_st;
|
||||
|
||||
// <s0 * cosAng, s0*-sinAng, s1*cosAng, s1*-sinAng>
|
||||
LLVector4a s0;
|
||||
s0.splat(st, 0);
|
||||
@@ -873,7 +870,6 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
|
||||
|
||||
//VECTORIZE THIS
|
||||
LLMatrix4a mat_vert = mat_vert_in;
|
||||
LLVector4a new_extents[2];
|
||||
|
||||
llassert(less_than_max_mag(face.mExtents[0]));
|
||||
llassert(less_than_max_mag(face.mExtents[1]));
|
||||
|
||||
@@ -2685,7 +2685,7 @@ void LLMeshRepository::notifyLoadedMeshes()
|
||||
|
||||
void LLMeshRepository::notifySkinInfoReceived(LLMeshSkinInfo& info)
|
||||
{
|
||||
mSkinMap[info.mMeshID] = info;
|
||||
mSkinMap.insert_or_assign(info.mMeshID, info);
|
||||
|
||||
skin_load_map::iterator iter = mLoadingSkins.find(info.mMeshID);
|
||||
if (iter != mLoadingSkins.end())
|
||||
@@ -2792,8 +2792,8 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, const
|
||||
{
|
||||
if (mesh_id.notNull())
|
||||
{
|
||||
skin_map::iterator iter = mSkinMap.find(mesh_id);
|
||||
if (iter != mSkinMap.end())
|
||||
const auto iter = mSkinMap.find(mesh_id);
|
||||
if (iter != mSkinMap.cend())
|
||||
{
|
||||
return &(iter->second);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#include "lluploadfloaterobservers.h"
|
||||
#include "aistatemachinethread.h"
|
||||
|
||||
#include <absl/container/node_hash_map.h>
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
@@ -561,7 +563,7 @@ public:
|
||||
typedef std::map<LLVolumeParams, std::vector<LLVOVolume*> > mesh_load_map;
|
||||
mesh_load_map mLoadingMeshes[4];
|
||||
|
||||
typedef boost::unordered_map<LLUUID, LLMeshSkinInfo> skin_map;
|
||||
typedef absl::node_hash_map<LLUUID, LLMeshSkinInfo> skin_map;
|
||||
skin_map mSkinMap;
|
||||
|
||||
typedef std::map<LLUUID, LLModel::Decomposition*> decomposition_map;
|
||||
|
||||
@@ -2002,13 +2002,13 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi
|
||||
return NULL;
|
||||
}
|
||||
|
||||
mUUIDObjectMap[fullid] = objectp;
|
||||
mUUIDObjectMap.insert_or_assign(fullid, objectp);
|
||||
if(objectp->isAvatar())
|
||||
{
|
||||
LLVOAvatar *pAvatar = dynamic_cast<LLVOAvatar*>(objectp);
|
||||
if(pAvatar)
|
||||
{
|
||||
mUUIDAvatarMap[fullid] = pAvatar;
|
||||
mUUIDAvatarMap.insert_or_assign(fullid, pAvatar);
|
||||
// <singu>
|
||||
if (LLFloaterIMPanel* im = find_im_floater(fullid))
|
||||
im->addDynamicFocus();
|
||||
@@ -2052,13 +2052,13 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
|
||||
regionp->addToCreatedList(local_id);
|
||||
}
|
||||
|
||||
mUUIDObjectMap[fullid] = objectp;
|
||||
mUUIDObjectMap.insert_or_assign(fullid, objectp);
|
||||
if(objectp->isAvatar())
|
||||
{
|
||||
LLVOAvatar *pAvatar = dynamic_cast<LLVOAvatar*>(objectp);
|
||||
if(pAvatar)
|
||||
{
|
||||
mUUIDAvatarMap[fullid] = pAvatar;
|
||||
mUUIDAvatarMap.insert_or_assign(fullid, pAvatar);
|
||||
// <singu>
|
||||
if (LLFloaterIMPanel* im = find_im_floater(fullid))
|
||||
im->addDynamicFocus();
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
|
||||
// common includes
|
||||
#include "llstat.h"
|
||||
#include "llstring.h"
|
||||
@@ -219,8 +221,8 @@ public:
|
||||
|
||||
uuid_set_t mDeadObjects;
|
||||
|
||||
boost::unordered_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
|
||||
boost::unordered_map<LLUUID, LLPointer<LLVOAvatar> > mUUIDAvatarMap;
|
||||
absl::flat_hash_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
|
||||
absl::flat_hash_map<LLUUID, LLPointer<LLVOAvatar> > mUUIDAvatarMap;
|
||||
|
||||
//set of objects that need to update their cost
|
||||
uuid_set_t mStaleObjectCost;
|
||||
@@ -272,8 +274,8 @@ extern LLViewerObjectList gObjectList;
|
||||
// Inlines
|
||||
inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id) const
|
||||
{
|
||||
boost::unordered_map<LLUUID, LLPointer<LLViewerObject> >::const_iterator iter = mUUIDObjectMap.find(id);
|
||||
if(iter != mUUIDObjectMap.end())
|
||||
auto iter = mUUIDObjectMap.find(id);
|
||||
if(iter != mUUIDObjectMap.cend())
|
||||
{
|
||||
return iter->second;
|
||||
}
|
||||
@@ -285,8 +287,8 @@ inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id) const
|
||||
|
||||
inline LLVOAvatar *LLViewerObjectList::findAvatar(const LLUUID &id) const
|
||||
{
|
||||
boost::unordered_map<LLUUID, LLPointer<LLVOAvatar> >::const_iterator iter = mUUIDAvatarMap.find(id);
|
||||
return (iter != mUUIDAvatarMap.end()) ? iter->second.get() : NULL;
|
||||
auto iter = mUUIDAvatarMap.find(id);
|
||||
return (iter != mUUIDAvatarMap.cend()) ? iter->second.get() : NULL;
|
||||
}
|
||||
|
||||
inline LLViewerObject *LLViewerObjectList::getObject(const S32 index)
|
||||
|
||||
@@ -6391,6 +6391,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start,
|
||||
LLVector4a local_end = end;
|
||||
|
||||
LLVector4a position;
|
||||
position.clear();
|
||||
|
||||
LLDrawable* drawable = NULL;
|
||||
|
||||
@@ -6442,6 +6443,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
|
||||
LLVector4a local_end = end;
|
||||
|
||||
LLVector4a position;
|
||||
position.clear();
|
||||
|
||||
sPickAvatar = FALSE; //LLToolMgr::getInstance()->inBuildMode() ? FALSE : TRUE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user