diff options
-rw-r--r-- | autobuild.xml | 5 | ||||
-rw-r--r-- | indra/cmake/00-Common.cmake | 44 | ||||
-rw-r--r-- | indra/llcommon/classic_callback.h | 4 | ||||
-rw-r--r-- | indra/llcommon/coro_scheduler.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/tests/llerror_test.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/tests/llsingleton_test.cpp | 4 | ||||
-rw-r--r-- | indra/llrender/llgl.cpp | 3 | ||||
-rw-r--r-- | indra/llrender/llgl.h | 5 | ||||
-rw-r--r-- | indra/media_plugins/cef/volume_catcher.h | 2 | ||||
-rw-r--r-- | indra/newview/llgltfmateriallist.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llhudrender.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llreflectionmap.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewerstats.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llxmlrpctransaction.cpp | 2 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 5 |
18 files changed, 42 insertions, 68 deletions
diff --git a/autobuild.xml b/autobuild.xml index f0f96f025a..4f70212fa8 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3204,7 +3204,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <array> <string>-G</string> <string>Ninja</string> - <string>-DLL_TESTS=Off</string> + <string>-DUSE_OPENAL:BOOL=ON</string> </array> <key>arguments</key> <array> @@ -3229,8 +3229,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <array> <string>-G</string> <string>Ninja</string> - <string>-DLL_TESTS=Off</string> - <string>-DUSE_OPENAL=On</string> + <string>-DUSE_OPENAL:BOOL=ON</string> </array> </map> <key>build</key> diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 5cb25368d2..be38574041 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -155,30 +155,11 @@ if (LINUX) -fvisibility=hidden ) - set(GCC_CLANG_COMPATIBLE_WARNINGS - -Wno-parentheses - -Wno-deprecated - -Wno-c++20-compat - -Wno-pessimizing-move - ) - - set(CLANG_WARNINGS - ${GCC_CLANG_COMPATIBLE_WARNINGS} - # Put clang specific warning configuration here - ) - - set(GCC_WARNINGS - ${GCC_CLANG_COMPATIBLE_WARNINGS} - ) - add_link_options( -Wl,--no-keep-memory -Wl,--build-id -Wl,--no-undefined ) - if (NOT GCC_DISABLE_FATAL_WARNINGS) - add_compile_options( -Werror ) - endif (NOT GCC_DISABLE_FATAL_WARNINGS) # this stops us requiring a really recent glibc at runtime add_compile_options(-fno-stack-protector) @@ -189,9 +170,6 @@ if (LINUX) -lstdc++ -lm ) - add_compile_options(${CLANG_WARNINGS}) - else() - add_compile_options(${GCC_WARNINGS}) endif() endif (LINUX) @@ -209,22 +187,26 @@ if (DARWIN) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}") # NOTE: it's critical that the optimization flag is put in front. # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. -## Really?? On developer machines too? -##set(ENABLE_SIGNING TRUE) -##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") + ## Really?? On developer machines too? + ##set(ENABLE_SIGNING TRUE) + ##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") # required for clang-15/xcode-15 since our boost package still uses deprecated std::unary_function/binary_function # see https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#C++-Standard-Library add_compile_definitions(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) +endif(DARWIN) - set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs) - - list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor ) +if(LINUX OR DARWIN) + add_compile_options(-Wall -Wno-sign-compare -Wno-trigraphs -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable) - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13) - list(APPEND GCC_WARNINGS -Wno-unused-but-set-variable -Wno-unused-variable ) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + add_compile_options(-Wno-stringop-truncation -Wno-parentheses -Wno-c++20-compat) endif() + if (NOT GCC_DISABLE_FATAL_WARNINGS) + add_compile_options(-Werror) + endif () + add_compile_options(${GCC_WARNINGS}) add_compile_options(-m${ADDRESS_SIZE}) -endif () +endif (LINUX OR DARWIN) diff --git a/indra/llcommon/classic_callback.h b/indra/llcommon/classic_callback.h index 009c25d67c..8a6ac7f7ff 100644 --- a/indra/llcommon/classic_callback.h +++ b/indra/llcommon/classic_callback.h @@ -184,8 +184,8 @@ protected: template <typename SIGNATURE, typename USERDATA=void*, typename CALLABLE=void(*)()> auto makeClassicCallback(CALLABLE&& callable) { - return std::move(ClassicCallback<SIGNATURE, USERDATA, CALLABLE> - (std::forward<CALLABLE>(callable))); + return ClassicCallback<SIGNATURE, USERDATA, CALLABLE> + (std::forward<CALLABLE>(callable)); } /***************************************************************************** diff --git a/indra/llcommon/coro_scheduler.cpp b/indra/llcommon/coro_scheduler.cpp index 02b9f11333..2d8b6e1a97 100644 --- a/indra/llcommon/coro_scheduler.cpp +++ b/indra/llcommon/coro_scheduler.cpp @@ -87,7 +87,7 @@ boost::fibers::context* scheduler::pick_next() noexcept /*------------------------- logging stuff --------------------------*/ // Unless this log tag is enabled, don't even bother posting. - LL_DEBUGS("LLCoros.scheduler"); + LL_DEBUGS("LLCoros.scheduler") << " "; // This feature is inherently hard to verify. The logging in the // lambda below seems useful, but also seems like a lot of overhead // for a coroutine context switch. Try posting the logging lambda to a diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp index d597e90ba0..b6a1bea42c 100644 --- a/indra/llcommon/tests/llerror_test.cpp +++ b/indra/llcommon/tests/llerror_test.cpp @@ -61,6 +61,8 @@ namespace { #ifdef __clang__ # pragma clang diagnostic ignored "-Wunused-function" +#elif defined(LL_GNUC) +# pragma GCC diagnostic ignored "-Wunused-function" #endif void test_that_error_h_includes_enough_things_to_compile_a_message() { diff --git a/indra/llcommon/tests/llsingleton_test.cpp b/indra/llcommon/tests/llsingleton_test.cpp index adf5804272..91304b4885 100644 --- a/indra/llcommon/tests/llsingleton_test.cpp +++ b/indra/llcommon/tests/llsingleton_test.cpp @@ -240,12 +240,14 @@ namespace tut PSing1::initParamSingleton("again"); }); ensure_contains("second ctor(string) didn't throw", threw, "twice"); +#ifndef LL_GNUC // FIXME: Fails to build under GCC // try to initialize using the other constructor -- should be // well-formed, but illegal at runtime threw = catcherr.catch_llerrs([](){ PSing1::initParamSingleton(17); }); ensure_contains("other ctor(int) didn't throw", threw, "twice"); +#endif PSing1::deleteSingleton(); ensure("false negative on wasDeleted()", PSing1::wasDeleted()); threw = catcherr.catch_llerrs([](){ @@ -254,6 +256,7 @@ namespace tut ensure_contains("accessed deleted LLParamSingleton", threw, "deleted"); } +#ifndef LL_GNUC // FIXME: Fails to build under GCC template<> template<> void singleton_object_t::test<13>() { @@ -275,6 +278,7 @@ namespace tut }); ensure_contains("other ctor(string) didn't throw", threw, "twice"); } +#endif class CircularPCtor: public LLParamSingleton<CircularPCtor> { diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 33f7098c5c..a9627a87d3 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -994,9 +994,6 @@ LLGLManager::LLGLManager() : mIsAMD(false), mIsNVIDIA(false), mIsIntel(false), -#if LL_DARWIN - mIsMobileGF(false), -#endif mHasRequirements(true), mDriverVersionMajor(1), mDriverVersionMinor(0), diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index f5b1e8d786..08cf662526 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -107,11 +107,6 @@ public: // hints to the render pipe U32 mDownScaleMethod = 0; // see settings.xml RenderDownScaleMethod -#if LL_DARWIN - // Needed to distinguish problem cards on older Macs that break with Materials - bool mIsMobileGF; -#endif - // Whether this version of GL is good enough for SL to use bool mHasRequirements; diff --git a/indra/media_plugins/cef/volume_catcher.h b/indra/media_plugins/cef/volume_catcher.h index 6933854e8e..ead0511149 100644 --- a/indra/media_plugins/cef/volume_catcher.h +++ b/indra/media_plugins/cef/volume_catcher.h @@ -49,7 +49,9 @@ public: #endif private: +#if LL_LINUX || LL_WINDOWS VolumeCatcherImpl *pimpl; +#endif }; #endif // VOLUME_CATCHER_H diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 25438eae5e..5e5e6425b8 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -45,7 +45,9 @@ #include "llworld.h" #include "tinygltf/tiny_gltf.h" -#include <strstream> + +#include <boost/iostreams/device/array.hpp> +#include <boost/iostreams/stream.hpp> #include <unordered_set> @@ -168,7 +170,7 @@ namespace void LLGLTFMaterialList::applyOverrideMessage(LLMessageSystem* msg, const std::string& data_in) { - std::istringstream str(data_in); + boost::iostreams::stream<boost::iostreams::array_source> str(data_in.data(), data_in.size()); LLSD data; @@ -539,8 +541,7 @@ void LLGLTFMaterialList::onAssetLoadComplete(const LLUUID& id, LLAssetType::ETyp LLSD asset; // read file into buffer - std::istrstream str(&buffer[0], static_cast<S32>(buffer.size())); - + boost::iostreams::stream<boost::iostreams::array_source> str(buffer.data(), buffer.size()); if (LLSDSerialize::deserialize(asset, str, buffer.size())) { if (asset.has("version") && LLGLTFMaterial::isAcceptedVersion(asset["version"].asString())) diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index aa440c6cf5..2255eb236f 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -109,7 +109,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw(); glm::ivec4 viewport(world_view_rect.mLeft, world_view_rect.mBottom, world_view_rect.getWidth(), world_view_rect.getHeight()); - glm::vec3 win_coord = glm::project(glm::make_vec3(render_pos.mV), get_current_modelview(), get_current_projection(), viewport); + glm::vec3 win_coord = glm::project(glm::make_vec3(LLVector4(render_pos).mV), get_current_modelview(), get_current_projection(), viewport); //fonts all render orthographically, set up projection`` gGL.matrixMode(LLRender::MM_PROJECTION); diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index dde238eddb..b5e494379d 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -63,8 +63,9 @@ #include "tinygltf/tiny_gltf.h" #include "lltinygltfhelper.h" -#include <strstream> +#include <boost/iostreams/device/array.hpp> +#include <boost/iostreams/stream.hpp> const std::string MATERIAL_BASE_COLOR_DEFAULT_NAME = "Base Color"; const std::string MATERIAL_NORMAL_DEFAULT_NAME = "Normal"; @@ -1245,7 +1246,7 @@ bool LLMaterialEditor::decodeAsset(const std::vector<char>& buffer) { LLSD asset; - std::istrstream str(&buffer[0], buffer.size()); + boost::iostreams::stream<boost::iostreams::array_source> str(buffer.data(), buffer.size()); if (LLSDSerialize::deserialize(asset, str, buffer.size())) { if (asset.has("version") && LLGLTFMaterial::isAcceptedVersion(asset["version"].asString())) diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp index f77d37f821..07e2c39379 100644 --- a/indra/newview/llreflectionmap.cpp +++ b/indra/newview/llreflectionmap.cpp @@ -256,7 +256,7 @@ bool LLReflectionMap::getBox(LLMatrix4& box) glm::mat4 mv(get_current_modelview()); LLVector3 s = mViewerObject->getScale().scaledVec(LLVector3(0.5f, 0.5f, 0.5f)); mRadius = s.magVec(); - glm::mat4 scale = glm::scale(glm::make_vec3(s.mV)); + glm::mat4 scale = glm::scale(glm::make_vec3(LLVector4(s).mV)); if (mViewerObject->mDrawable != nullptr) { // object to agent space (no scale) diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 95d3a419bc..a8fe221d98 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -730,14 +730,6 @@ std::string LLViewerShaderMgr::loadBasicShaders() S32 sum_lights_class = 3; -#if LL_DARWIN - // Work around driver crashes on older Macs when using deferred rendering - // NORSPEC-59 - // - if (gGLManager.mIsMobileGF) - sum_lights_class = 3; -#endif - // Use the feature table to mask out the max light level to use. Also make sure it's at least 1. S32 max_light_class = gSavedSettings.getS32("RenderShaderLightingMaxLevel"); sum_lights_class = llclamp(sum_lights_class, 1, max_light_class); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index ff86684499..9d4c072909 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -781,7 +781,7 @@ void send_viewer_stats(bool include_preferences) LL_INFOS("LogViewerStatsPacket") << "Sending viewer statistics: " << body << LL_ENDL; // <ND> Do those lines even do anything sane in regard of debug logging? - LL_DEBUGS("LogViewerStatsPacket"); + LL_DEBUGS("LogViewerStatsPacket") << " "; std::string filename("viewer_stats_packet.xml"); llofstream of(filename.c_str()); LLSDSerialize::toPrettyXML(body,of); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8178dade8b..c8a4e4c205 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1940,10 +1940,10 @@ bool LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& if (linesegment_sphere(LLVector3(glm::value_ptr(p1)), LLVector3(glm::value_ptr(p2)), LLVector3(0,0,0), 1.f, position, norm)) { - glm::vec3 res_pos(glm::make_vec3(position.mV)); + glm::vec3 res_pos(glm::make_vec3(LLVector4(position).mV)); res_pos = mul_mat4_vec3(mat, res_pos); - glm::vec3 res_norm(glm::make_vec3(norm.mV)); + glm::vec3 res_norm(glm::make_vec3(LLVector4(norm).mV)); res_norm = glm::normalize(res_norm); res_norm = glm::mat3(norm_mat) * res_norm; diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 07e2b118d3..0f956d8350 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -218,7 +218,7 @@ LLXMLRPCTransaction::Impl::Impl mCertStore = gSavedSettings.getString("CertStore"); httpOpts->setSSLVerifyPeer(vefifySSLCert); - httpOpts->setSSLVerifyHost(vefifySSLCert ? 2 : 0); + httpOpts->setSSLVerifyHost(vefifySSLCert); // LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e36cb795bd..8a44148e7f 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8599,13 +8599,12 @@ void LLPipeline::renderDeferredLighting() LLDrawable* drawablep = *iter; LLVOVolume* volume = drawablep->getVOVolume(); LLVector3 center = drawablep->getPositionAgent(); - F32* c = center.mV; F32 light_size_final = volume->getLightRadius() * 1.5f; F32 light_falloff_final = volume->getLightFalloff(DEFERRED_LIGHT_FALLOFF); sVisibleLightCount++; - glm::vec3 tc(glm::make_vec3(c)); + glm::vec3 tc(glm::make_vec3(LLVector4(center).mV)); tc = mul_mat4_vec3(mat, tc); setupSpotLight(gDeferredMultiSpotLightProgram, drawablep); @@ -10145,7 +10144,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) view[j] = glm::inverse(view[j]); //llassert(origin.isFinite()); - glm::vec3 origin_agent(glm::make_vec3(origin.mV)); + glm::vec3 origin_agent(glm::make_vec3(LLVector4(origin).mV)); //translate view to origin origin_agent = mul_mat4_vec3(view[j], origin_agent); |