diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 4d9ba30a50ec8610ba843e7b180af9ba6a4b157e..55e87c1550576699cc941f946362f74059a1ab82 100644 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -1350,7 +1350,6 @@ BOOL LLBVHLoader::serialize(LLDataPacker& dp) dp.packS32(joint->mNumRotKeys, "num_rot_keys"); LLQuaternion::Order order = bvhStringToOrder( joint->mOrder ); - S32 outcount = 0; S32 frame = 0; for (Key& key : joint->mKeys) { @@ -1416,7 +1415,6 @@ BOOL LLBVHLoader::serialize(LLDataPacker& dp) dp.packU16(x, "rot_angle_x"); dp.packU16(y, "rot_angle_y"); dp.packU16(z, "rot_angle_z"); - outcount++; frame++; } diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index b193493def553149e83769afdb76d0676c2b0b89..b78c63944dc9c484c788cd39cf2ec7c6250c3673 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -2174,9 +2174,9 @@ LLUZipHelper::EZipRresult LLUZipHelper::unzip_llsd(LLSD& data, std::istream& is, LLUZipHelper::EZipRresult LLUZipHelper::unzip_llsd(LLSD& data, const U8* in, S32 size) { U8* result = NULL; - U32 cur_size = 0; + llssize cur_size = 0; z_stream strm; - + constexpr U32 CHUNK = 1024 * 512; static thread_local std::unique_ptr<U8[]> out; @@ -2388,7 +2388,7 @@ U8* unzip_llsdNavMesh( bool& valid, size_t& outsize, const U8* in, S32 size ) return result; } -char* strip_deprecated_header(char* in, U32& cur_size, U32* header_size) +char* strip_deprecated_header(char* in, llssize& cur_size, size_t* header_size) { const char* deprecated_header = "<? LLSD/Binary ?>"; constexpr size_t deprecated_header_size = 17; diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h index 91820046cce3d2990362c14d19d1cc429c089f7f..ae6298fd021bbdef891851e839dd74c800be7289 100644 --- a/indra/llcommon/llsdserialize.h +++ b/indra/llcommon/llsdserialize.h @@ -874,5 +874,5 @@ LL_COMMON_API U8* unzip_llsdNavMesh( bool& valid, size_t& outsize,std::istream& LL_COMMON_API U8* unzip_llsdNavMesh(bool& valid, size_t& outsize, const U8* in, S32 size); // returns a pointer to the array or past the array if the deprecated header exists -LL_COMMON_API char* strip_deprecated_header(char* in, U32& cur_size, U32* header_size = nullptr); +LL_COMMON_API char* strip_deprecated_header(char* in, llssize& cur_size, size_t* header_size = nullptr); #endif // LL_LLSDSERIALIZE_H diff --git a/indra/llcommon/stdtypes.h b/indra/llcommon/stdtypes.h index 79847c49467f3c8b85f565a67e58aa81c86c3631..6cc47dd29a318fd3f9ba18136ed8788d6bec3913 100644 --- a/indra/llcommon/stdtypes.h +++ b/indra/llcommon/stdtypes.h @@ -42,7 +42,7 @@ typedef unsigned int U32; // to express an index that might go negative // (ssize_t is provided by SOME compilers, don't collide) -typedef typename std::make_signed<size_t>::type llssize; +typedef typename std::make_signed<std::size_t>::type llssize; #if LL_WINDOWS // https://docs.microsoft.com/en-us/cpp/build/reference/zc-wchar-t-wchar-t-is-native-type diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index 7ee36a9ea6ace696a16c22c078cb6574c1174b60..60005fc6a9570c92d50970ed3eb23e1cee3d6e5b 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -109,7 +109,7 @@ namespace tut "import os\n" "import sys\n" "\n" - "from llbase import llsd\n" + "import llsd\n" "\n" "class ProtocolError(Exception):\n" " def __init__(self, msg, data):\n" diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp index f90d7ce22a116caa91f1479df3d82448169d4da5..e4f16e2261ae08353b83961377ea7a6b2be95db4 100644 --- a/indra/llcommon/tests/llsdserialize_test.cpp +++ b/indra/llcommon/tests/llsdserialize_test.cpp @@ -1705,7 +1705,7 @@ namespace tut // scanner. import_llsd("import os.path\n" "import sys\n" - "from llbase import llsd\n") + "import llsd\n") {} ~TestPythonCompatible() {} diff --git a/indra/llcorehttp/tests/test_llcorehttp_peer.py b/indra/llcorehttp/tests/test_llcorehttp_peer.py index 55e4a57eae13ae99af272cd764ef35b24c21f140..7410fda1db3a2f90db689863858de9aa9ec4c30d 100755 --- a/indra/llcorehttp/tests/test_llcorehttp_peer.py +++ b/indra/llcorehttp/tests/test_llcorehttp_peer.py @@ -38,7 +38,7 @@ from http.server import HTTPServer, BaseHTTPRequestHandler -from llbase import llsd +import llsd # we're in llcorehttp/tests ; testrunner.py is found in llmessage/tests sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index c003ee48e8b07d45627c2c9ef5fa1c46a5fb36b4..58ce0b25703a7f16f56a981c0bac87cb51adfe81 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -271,7 +271,6 @@ void LLCircuitData::ackReliablePacket(TPACKETID packet_num) S32 LLCircuitData::resendUnackedPackets(const F64Seconds now) { - S32 resent_packets = 0; LLReliablePacket *packetp; @@ -375,7 +374,6 @@ S32 LLCircuitData::resendUnackedPackets(const F64Seconds now) // Don't remove it yet, it still gets to try to resend at least once. ++iter; } - resent_packets++; } else { diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py new file mode 100755 index 0000000000000000000000000000000000000000..8e9b6c09e730f7e2051409489a860d57e4fc206f --- /dev/null +++ b/indra/llmessage/tests/test_llsdmessage_peer.py @@ -0,0 +1,176 @@ +#!/usr/bin/env python3 +"""\ +@file test_llsdmessage_peer.py +@author Nat Goodspeed +@date 2008-10-09 +@brief This script asynchronously runs the executable (with args) specified on + the command line, returning its result code. While that executable is + running, we provide dummy local services for use by C++ tests. + +$LicenseInfo:firstyear=2008&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2010, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" + +import os +import sys +from http.server import HTTPServer, BaseHTTPRequestHandler + +from llsd.fastest_elementtree import parse as xml_parse +import llsd +from testrunner import freeport, run, debug, VERBOSE +import time + +_storage=None + +class TestHTTPRequestHandler(BaseHTTPRequestHandler): + """This subclass of BaseHTTPRequestHandler is to receive and echo + LLSD-flavored messages sent by the C++ LLHTTPClient. + """ + def read(self): + # The following logic is adapted from the library module + # SimpleXMLRPCServer.py. + # Get arguments by reading body of request. + # We read this in chunks to avoid straining + # socket.read(); around the 10 or 15Mb mark, some platforms + # begin to have problems (bug #792570). + try: + size_remaining = int(self.headers["content-length"]) + except (KeyError, ValueError): + return "" + max_chunk_size = 10*1024*1024 + L = [] + while size_remaining: + chunk_size = min(size_remaining, max_chunk_size) + chunk = self.rfile.read(chunk_size) + L.append(chunk) + size_remaining -= len(chunk) + return ''.join(L) + # end of swiped read() logic + + def read_xml(self): + # This approach reads the entire POST data into memory first + return llsd.parse(self.read()) +## # This approach attempts to stream in the LLSD XML from self.rfile, +## # assuming that the underlying XML parser reads its input file +## # incrementally. Unfortunately I haven't been able to make it work. +## tree = xml_parse(self.rfile) +## debug("Finished raw parse") +## debug("parsed XML tree %s", tree) +## debug("parsed root node %s", tree.getroot()) +## debug("root node tag %s", tree.getroot().tag) +## return llsd.to_python(tree.getroot()) + + def do_HEAD(self): + self.do_GET(withdata=False) + + def do_GET(self, withdata=True): + # Of course, don't attempt to read data. + data = dict(reply="success", body="avatar", random=17) + self.answer(data, withdata=withdata) + + def do_POST(self): + # Read the provided POST data. + self.answer(self.read_xml()) + + def do_PUT(self): + # Read the provided PUT data. + self.answer(self.read_xml()) + + def answer(self, data, withdata=True): + global _storage + debug("%s.answer(%s): self.path = %r", self.__class__.__name__, data, self.path) + if "fail" in self.path or "test/error" in self.path: # fail requested + status = data.get("status", 500) + # self.responses maps an int status to a (short, long) pair of + # strings. We want the longer string. That's why we pass a string + # pair to get(): the [1] will select the second string, whether it + # came from self.responses or from our default pair. + reason = data.get("reason", + self.responses.get(status, + ("fail requested", + "Your request specified failure status %s " + "without providing a reason" % status))[1]) + debug("fail requested: %s: %r", status, reason) + self.send_error(status, reason) + else: + if "web/echo" in self.path: + pass + elif "test/timeout" in self.path: + time.sleep(5.0) + return + elif "test/storage" in self.path: + if "GET" == self.command: + data = _storage + else: + _storage = data + data = "ok" + else: + data = data.copy() # we're going to modify + # Ensure there's a "reply" key in data, even if there wasn't before + data["reply"] = data.get("reply", llsd.LLSD("success")) + response = llsd.format_xml(data) + debug("success: %s", response) + self.send_response(200) + self.send_header("Content-type", "application/llsd+xml") + self.send_header("Content-Length", str(len(response))) + self.end_headers() + if withdata: + self.wfile.write(response) + + if not VERBOSE: + # When VERBOSE is set, skip both these overrides because they exist to + # suppress output. + + def log_request(self, code, size=None): + # For present purposes, we don't want the request splattered onto + # stderr, as it would upset devs watching the test run + pass + + def log_error(self, format, *args): + # Suppress error output as well + pass + +class Server(HTTPServer): + # This pernicious flag is on by default in HTTPServer. But proper + # operation of freeport() absolutely depends on it being off. + allow_reuse_address = False + +if __name__ == "__main__": + # function to make a server with specified port + make_server = lambda port: Server(('127.0.0.1', port), TestHTTPRequestHandler) + + if not sys.platform.startswith("win"): + # Instantiate a Server(TestHTTPRequestHandler) on a port chosen by the + # runtime. + httpd = make_server(0) + else: + # "Then there's Windows" + # Instantiate a Server(TestHTTPRequestHandler) on the first free port + # in the specified port range. + httpd, port = freeport(range(8000, 8020), make_server) + + # Pass the selected port number to the subject test program via the + # environment. We don't want to impose requirements on the test program's + # command-line parsing -- and anyway, for C++ integration tests, that's + # performed in TUT code rather than our own. + os.environ["PORT"] = str(httpd.server_port) + debug("$PORT = %s", httpd.server_port) + sys.exit(run(server_inst=httpd, *sys.argv[1:])) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index b4c03ddd847a1de1d6f214ed14bdd86f8151952b..67a90a6b74453fc3d3af92b52d4f1886593fec1a 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -2990,9 +2990,7 @@ void LLGLSyncFence::wait() if (mSync) { while (glClientWaitSync(mSync, 0, FENCE_WAIT_TIME_NANOSECONDS) == GL_TIMEOUT_EXPIRED) - { //track the number of times we've waited here - static S32 waits = 0; - waits++; + { } } } diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index acf119a205c4db337409ab85f016b26e51bedb67..d47bc31808cd9261a4b1a55899e07f12c36dcac3 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -963,11 +963,8 @@ void LLButton::draw() break; } - S32 y_offset = 2 + (getRect().getHeight() - 20)/2; - if (pressed && mDisplayPressedState) { - y_offset--; x++; } diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 423adea3b916c9019aadca044020fcde1066a6b0..13452d2d2f65abe061f0817578e6ade9b36cbba0 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -488,9 +488,6 @@ void LLMenuItemGL::draw( void ) // let disabled items be highlighted, just don't draw them as such if( getEnabled() && getHighlight() && !mBriefItem) { - int debug_count = 0; - if (dynamic_cast<LLMenuItemCallGL*>(this)) - debug_count++; gGL.color4fv( mHighlightBackground.get().mV ); gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0 ); diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 7b9707159a4c4145893487b0086025ff9a2b96c7..3a2eb513f885872384aca7af59788b662d4e11b3 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -846,7 +846,6 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require return 0; } - U32 item = 0; U32 validitems = 0; S32 version; @@ -880,8 +879,6 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require } // Got an item. Load it up. - item++; - // If not declared, assume it's a string if (!declared) { diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a11b6e71ed1647cef5a9349613b1a314b0d321bd..dd239f3990f36eeadd3c2b798b9e3e1fa3cb9be0 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3890,7 +3890,6 @@ void LLAgent::processScriptControlChange(LLMessageSystem *msg, void **) // take controls msg->getU32Fast(_PREHASH_Data, _PREHASH_Controls, controls, block_index ); msg->getBOOLFast(_PREHASH_Data, _PREHASH_PassToAgent, passon, block_index ); - U32 total_count = 0; for (i = 0; i < TOTAL_CONTROLS; i++) { if (controls & ( 1 << i)) @@ -3903,7 +3902,6 @@ void LLAgent::processScriptControlChange(LLMessageSystem *msg, void **) { gAgent.mControlsTakenCount[i]++; } - total_count++; } } } diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index f770292465296b5eff53a7699282988ff5cf12b7..906d5245dd8ca22d9652fa86bfcbe549293e2027 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1745,10 +1745,10 @@ EMeshProcessingResult LLMeshRepoThread::headerReceived(const LLVolumeParams& mes LLMeshHeader header; - U32 header_size = 0; + size_t header_size = 0; if (data_size > 0) { - U32 dsize = data_size; + llssize dsize = data_size; char* result_ptr = strip_deprecated_header((char*)data, dsize, &header_size); data_size = dsize; @@ -4070,6 +4070,7 @@ void LLMeshRepository::notifyMeshUnavailable(const LLVolumeParams& mesh_params, if (sys_volume) { sys_volume->setMeshAssetUnavaliable(true); + LLPrimitive::getVolumeManager()->unrefVolume(sys_volume); } for (auto vobj : obj_iter->second) diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index b05421ee8775c12f3759641a5f4d3a05fe3ce9ae..834ad02aaa4727dd849c3b1adcf0226c6ddbe6f0 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -2719,9 +2719,6 @@ void LLModelPreview::clearBuffers() void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights) { - U32 mesh_count = 0; - - LLModelLoader::model_list* model = NULL; if (lod < 0 || lod > 4) @@ -2889,8 +2886,6 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights) vb->unmapBuffer(); mVertexBuffer[lod][mdl].push_back(vb); - - ++mesh_count; } } } diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index e05ccefe0e9bc488298bc253093686d140eeb7cc..41b0e8c4cbdbad9e79124ed6bef5372d57178863 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -619,7 +619,6 @@ void LLPanelNearByMedia::refreshList() LLViewerMedia::impl_list impls = media_inst->getPriorityList(); LLViewerMedia::impl_list::iterator priority_iter; - U32 enabled_count = 0; U32 disabled_count = 0; // iterate over the impl list, creating rows as necessary. @@ -662,13 +661,10 @@ void LLPanelNearByMedia::refreshList() { disabled_count++; } - else { - enabled_count++; } } - } mDisableAllCtrl->setEnabled((gSavedSettings.getBOOL("AudioStreamingMusic") || - gSavedSettings.getBOOL("AudioStreamingMedia")) && + gSavedSettings.getBOOL("AudioStreamingMedia")) && (media_inst->isAnyMediaShowing() || media_inst->isParcelMediaPlaying() || media_inst->isParcelAudioPlaying())); diff --git a/indra/newview/llsceneview.cpp b/indra/newview/llsceneview.cpp index 5e339a52bf1da57f3c522456fa88c1747c573bc5..9b1d2d48c65cdbe7f7bb1316f88ce1d1cc86129b 100644 --- a/indra/newview/llsceneview.cpp +++ b/indra/newview/llsceneview.cpp @@ -100,8 +100,6 @@ void LLSceneView::draw() F32 total_physics[] = { 0.f, 0.f }; - U32 object_count = 0; - LLViewerRegion* region = gAgent.getRegion(); if (region) { @@ -116,8 +114,7 @@ void LLSceneView::draw() U32 idx = object->isAttachment() ? 1 : 0; LLVolume* volume = object->getVolume(); - object_count++; - + F32 radius = object->getScale().magVec(); size[idx].push_back(radius); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 7c638cd0f2603abdfa7d2bc779458dffae6b0573..ebfe841de27a6d5fd4ee247d766c5a0f643189da 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5429,8 +5429,8 @@ void LLSelectMgr::sendListToRegions(LLObjectSelectionHandle selected_handle, LLViewerRegion* last_region; LLViewerRegion* current_region; - S32 objects_sent = 0; - S32 packets_sent = 0; +// S32 objects_sent = 0; +// S32 packets_sent = 0; S32 objects_in_this_packet = 0; bool link_operation = message_name == "ObjectLink"; @@ -5562,7 +5562,7 @@ void LLSelectMgr::sendListToRegions(LLObjectSelectionHandle selected_handle, (*pack_body)(node, user_data); // do any related logging (*log_func)(node, user_data); - ++objects_sent; +// ++objects_sent; ++objects_in_this_packet; // and on to the next object @@ -5580,7 +5580,7 @@ void LLSelectMgr::sendListToRegions(LLObjectSelectionHandle selected_handle, { // otherwise send current message and start new one gMessageSystem->sendReliable( last_region->getHost()); - packets_sent++; +// packets_sent++; objects_in_this_packet = 0; gMessageSystem->newMessage(message_name.c_str()); @@ -5597,7 +5597,7 @@ void LLSelectMgr::sendListToRegions(LLObjectSelectionHandle selected_handle, { // add root instance into new message (*pack_body)(linkset_root, user_data); - ++objects_sent; +// ++objects_sent; ++objects_in_this_packet; } } @@ -5611,7 +5611,7 @@ void LLSelectMgr::sendListToRegions(LLObjectSelectionHandle selected_handle, if (gMessageSystem->getCurrentSendTotal() > 0) { gMessageSystem->sendReliable( current_region->getHost()); - packets_sent++; +// packets_sent++; } else { diff --git a/indra/newview/llsprite.cpp b/indra/newview/llsprite.cpp index b641afc1ef7dc77d99eb84adb0349c521dd74afb..af0b5a40b4992965397f836da7a7ddf397bf6243 100644 --- a/indra/newview/llsprite.cpp +++ b/indra/newview/llsprite.cpp @@ -79,7 +79,6 @@ void LLSprite::updateFace(LLFace &face) // First, figure out how many vertices/indices we need. U32 num_vertices, num_indices; - U32 vertex_count = 0; // Get the total number of vertices and indices if (mFollow) @@ -202,25 +201,21 @@ void LLSprite::updateFace(LLFace &face) *verticesp = mC; tex_coordsp++; verticesp++; - vertex_count++; *tex_coordsp = LLVector2(0.f, 1.f); *verticesp = mB; tex_coordsp++; verticesp++; - vertex_count++; *tex_coordsp = LLVector2(1.f, 1.f); *verticesp = mA; tex_coordsp++; verticesp++; - vertex_count++; *tex_coordsp = LLVector2(1.f, 0.0f); *verticesp = mD; tex_coordsp++; verticesp++; - vertex_count++; // Generate indices, since they're easy. // Just a series of quads. diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8166d44f5597da470dc2b54ba6f4ecebcd5edf9a..0181e0879912b98c817da1512ae963f62de3a363 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3365,7 +3365,7 @@ LLSD transform_cert_args(LLPointer<LLCertificate> cert) // are actually arrays, and we want to format them as comma separated // strings, so special case those. LLSDSerialize::toXML(cert_info[iter->first], std::cout); - if((iter->first== std::string(CERT_KEY_USAGE)) | + if((iter->first == std::string(CERT_KEY_USAGE)) || (iter->first == std::string(CERT_EXTENDED_KEY_USAGE))) { value = ""; diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 4e792eb67b65ad6751037ebe6b7d2976dffbab7e..4b8a1bec833bc09fbf2beb3a992a3fe22c618830 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -831,8 +831,8 @@ void LLTextureView::draw() if (imagep->getID() == LLAppViewer::getTextureFetch()->mDebugID) { - static S32 debug_count = 0; - ++debug_count; // for breakpoints +// static S32 debug_count = 0; +// ++debug_count; // for breakpoints } F32 pri; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 2fed4170a629f6d55c8ec2c618b7ad0a2a463cdf..1c19843b9d4ce420d6aebf08ff574e9a2bc4c0e4 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -814,7 +814,6 @@ void LLViewerObjectList::setAllObjectDefaultTextures(U32 nChannel, bool fShowDef void LLViewerObjectList::updateApparentAngles(LLAgent &agent) { S32 i; - S32 num_objects = 0; LLViewerObject *objectp; S32 num_updates, max_value; @@ -836,8 +835,6 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) objectp = mObjects[i]; if (!objectp->isDead()) { - num_objects++; - // Update distance & gpw objectp->setPixelAreaAndAngle(agent); // Also sets the approx. pixel area objectp->updateTextures(); // Update the image levels of textures for this object. diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp index 2729253d183a0cff83dbe8abe2d3cc8dcd0724bc..20390a316ae0f4c5f3d558fdb963169a9f225ac6 100644 --- a/indra/newview/llviewerthrottle.cpp +++ b/indra/newview/llviewerthrottle.cpp @@ -84,7 +84,7 @@ LLViewerThrottleGroup::LLViewerThrottleGroup() } -LLViewerThrottleGroup::LLViewerThrottleGroup(const F32 settings[]) +LLViewerThrottleGroup::LLViewerThrottleGroup(const F32 settings[TC_EOF]) { mThrottleTotal = 0.f; S32 i; diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 07b6322411de39cc03e8f9393de8dc9d90a664fb..751c635d26a4490dc4b366fc395c6cd89c14813e 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -388,7 +388,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, LLStrider<U16> &indicesp, U32 &index_offset) { - S32 vertex_count = 0; S32 i, x, y; S32 num_vertices; @@ -423,7 +422,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, normalsp++; texCoords0p++; texCoords1p++; - vertex_count++; } // North patch @@ -436,7 +434,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, normalsp++; texCoords0p++; texCoords1p++; - vertex_count++; } @@ -473,7 +470,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, normalsp++; texCoords0p++; texCoords1p++; - vertex_count++; } // Iterate through the north patch's points @@ -487,7 +483,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, normalsp++; texCoords0p++; texCoords1p++; - vertex_count++; } @@ -531,7 +526,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, normalsp++; texCoords0p++; texCoords1p++; - vertex_count++; } // Iterate through the north patch's points @@ -545,7 +539,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep, normalsp++; texCoords0p++; texCoords1p++; - vertex_count++; } for (i = 0; i < length; i++) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 18a6c2f06777c6a93878fa7dc51c41326d5e6c0f..db112cfc899698467e64c478384c70dd90bf47ec 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -6198,7 +6198,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace LLSpatialGroup::buffer_map_t buffer_map; LLViewerTexture* last_tex = NULL; - S32 buffer_index = 0; S32 texture_index_channels = 1; @@ -6210,8 +6209,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace if (distance_sort) { texture_index_channels = gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels; - buffer_index = -1; - } + } texture_index_channels = LLGLSLShader::sIndexedTextureChannels; @@ -6231,14 +6229,9 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace tex = NULL; } - if (last_tex == tex) - { - buffer_index++; - } - else + if (last_tex != tex) { last_tex = tex; - buffer_index = 0; } bool bake_sunlight = LLPipeline::sBakeSunlight && facep->getDrawable()->isStatic(); @@ -6492,12 +6485,15 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace } } - F32 te_alpha = te->getColor().mV[3]; + F32 blinn_phong_alpha = te->getColor().mV[3]; bool use_legacy_bump = te->getBumpmap() && (te->getBumpmap() < 18) && (!mat || mat->getNormalID().isNull()); - bool opaque = te_alpha >= 0.999f; - bool transparent = te_alpha < 0.999f; + bool blinn_phong_opaque = blinn_phong_alpha >= 0.999f; + bool blinn_phong_transparent = blinn_phong_alpha < 0.999f; - is_alpha = (is_alpha || transparent) ? TRUE : FALSE; + if (!gltf_mat) + { + is_alpha = (is_alpha || blinn_phong_transparent) ? TRUE : FALSE; + } if (gltf_mat || (mat && !hud_group)) { @@ -6527,7 +6523,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace { if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK) { - if (opaque) + if (blinn_phong_opaque) { registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK); } @@ -6548,7 +6544,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace } else { - if (opaque) + if (blinn_phong_opaque) { registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT); } @@ -6559,7 +6555,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace } } } - else if (transparent) + else if (blinn_phong_transparent) { registerFace(group, facep, LLRenderPass::PASS_ALPHA); } diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 8ecd4eed745edb6420589e26e2ee27e4e8b64a3f..f74a901b63ae2a6d509ae7bd8462b256257412a2 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -51,7 +51,7 @@ # indra.util.llmanifest under their system Python! sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python")) from indra.util.llmanifest import LLManifest, main, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL, ManifestError, MissingError -from llbase import llsd +import llsd class ViewerManifest(LLManifest): def is_packaging_viewer(self): diff --git a/scripts/metrics/slp_conv.py b/scripts/metrics/slp_conv.py index 27f922b74ac3dd66e8015fbef72f80e81851f905..25f9a8c060f45db007feddf9611684476027ea98 100644 --- a/scripts/metrics/slp_conv.py +++ b/scripts/metrics/slp_conv.py @@ -29,7 +29,7 @@ $/LicenseInfo$ """ -from llbase import llsd +import llsd import argparse parser = argparse.ArgumentParser( diff --git a/scripts/metrics/viewer_asset_logs.py b/scripts/metrics/viewer_asset_logs.py index dbbdfb101866285aa865d3d1dae7ac57c15be8eb..59c0929d000e8f2134242e7b8a9e1df209767b02 100644 --- a/scripts/metrics/viewer_asset_logs.py +++ b/scripts/metrics/viewer_asset_logs.py @@ -28,7 +28,7 @@ import argparse from lxml import etree -from llbase import llsd +import llsd def get_metrics_record(infiles): for filename in args.infiles: diff --git a/scripts/metrics/viewerstats.py b/scripts/metrics/viewerstats.py index 9a003480f16df43d6f5cad3cbd72d3ec5ed138c0..4140cf4cdba2cc613f00d7f27d99b34a0d7040c0 100755 --- a/scripts/metrics/viewerstats.py +++ b/scripts/metrics/viewerstats.py @@ -31,7 +31,7 @@ import pandas as pd import json from collections import Counter, defaultdict -from llbase import llsd +import llsd import io import re import os