Merge branch 'DRTVWR-588-maint-W' of https://github.com/secondlife/viewer

# Conflicts:
#	autobuild.xml
#	indra/newview/lldrawpoolground.cpp
#	indra/newview/llviewerobject.cpp
#	indra/newview/skins/default/textures/textures.xml
master
Ansariel 2023-10-04 15:22:25 +02:00
commit fde2521319
19 changed files with 170 additions and 144 deletions

View File

@ -3195,16 +3195,30 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>6ba629ff34c4b14a1f851de707bc35041df8b6a9</string>
<string>6db9317ed29ccb00c2f75758f4aa2d4cd8784f46</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://github.com/secondlife/viewer-manager/releases/download/v3.0-bd3aec2/viewer_manager-3.0-bd3aec2-darwin64-bd3aec2.tar.zst</string>
<string>https://github.com/secondlife/viewer-manager/releases/download/v3.0-83fb46a/viewer_manager-3.0-83fb46a-darwin64-83fb46a.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
</map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>426d3b30681b747056027ca21136ae56b188cd47</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://github.com/secondlife/viewer-manager/releases/download/v3.0-83fb46a/viewer_manager-3.0-83fb46a-linux64-83fb46a.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
</map>
<key>windows</key>
<map>
<key>archive</key>
<map>
@ -3223,11 +3237,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>1eab994c0c1df5b2c057878a4071a88320cec978</string>
<string>fe8e9ee00f53f11a7417a7bcf1db069e25dace5d</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://github.com/secondlife/viewer-manager/releases/download/v3.0-bd3aec2/viewer_manager-3.0-bd3aec2-windows64-bd3aec2.tar.zst</string>
<string>https://github.com/secondlife/viewer-manager/releases/download/v3.0-83fb46a/viewer_manager-3.0-83fb46a-windows64-83fb46a.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@ -3238,7 +3252,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>source_type</key>
<string>hg</string>
<key>version</key>
<string>3.0-bd3aec2</string>
<string>3.0-83fb46a</string>
</map>
<key>vlc-bin</key>
<map>

View File

@ -38,6 +38,12 @@ const S32 FULL_VOLATILE_APR_POOL = 1024 ; //number of references to LLVolatileAP
bool gAPRInitialized = false;
int abortfunc(int retcode)
{
LL_WARNS("APR") << "Allocation failure in apr pool with code " << (S32)retcode << LL_ENDL;
return 0;
}
void ll_init_apr()
{
// Initialize APR and create the global pool
@ -45,7 +51,7 @@ void ll_init_apr()
if (!gAPRPoolp)
{
apr_pool_create(&gAPRPoolp, NULL);
apr_pool_create_ex(&gAPRPoolp, NULL, abortfunc, NULL);
}
if(!LLAPRFile::sAPRFilePoolp)

View File

@ -529,6 +529,7 @@ LLProcess::LLProcess(const LLSDOrParams& params):
// preserve existing semantics, we promise that mAttached defaults to the
// same setting as mAutokill.
mAttached(params.attached.isProvided()? params.attached : params.autokill),
mPool(NULL),
mPipes(NSLOTS)
{
// Hmm, when you construct a ptr_vector with a size, it merely reserves
@ -549,8 +550,14 @@ LLProcess::LLProcess(const LLSDOrParams& params):
mPostend = params.postend;
apr_pool_create(&mPool, gAPRPoolp);
if (!mPool)
{
LLTHROW(LLProcessError(STRINGIZE("failed to create apr pool")));
}
apr_procattr_t *procattr = NULL;
chkapr(apr_procattr_create(&procattr, gAPRPoolp));
chkapr(apr_procattr_create(&procattr, mPool));
// IQA-490, CHOP-900: On Windows, ask APR to jump through hoops to
// constrain the set of handles passed to the child process. Before we
@ -689,14 +696,14 @@ LLProcess::LLProcess(const LLSDOrParams& params):
// one. Hand-expand chkapr() macro so we can fill in the actual command
// string instead of the variable names.
if (ll_apr_warn_status(apr_proc_create(&mProcess, argv[0], &argv[0], NULL, procattr,
gAPRPoolp)))
mPool)))
{
LLTHROW(LLProcessError(STRINGIZE(params << " failed")));
}
// arrange to call status_callback()
apr_proc_other_child_register(&mProcess, &LLProcess::status_callback, this, mProcess.in,
gAPRPoolp);
mPool);
// and make sure we poll it once per "mainloop" tick
sProcessListener.addPoll(*this);
mStatus.mState = RUNNING;
@ -815,6 +822,12 @@ LLProcess::~LLProcess()
{
kill("destructor");
}
if (mPool)
{
apr_pool_destroy(mPool);
mPool = NULL;
}
}
bool LLProcess::kill(const std::string& who)

View File

@ -568,6 +568,7 @@ private:
// explicitly want this ptr_vector to be able to store NULLs
typedef boost::ptr_vector< boost::nullable<BasePipe> > PipeVector;
PipeVector mPipes;
apr_pool_t* mPool;
};
/// for logging

View File

@ -93,6 +93,17 @@ void APIENTRY gl_debug_callback(GLenum source,
return;
}
if (gGLManager.mIsDisabled &&
severity == GL_DEBUG_SEVERITY_HIGH_ARB &&
source == GL_DEBUG_SOURCE_API_ARB &&
type == GL_DEBUG_TYPE_ERROR_ARB &&
id == GL_INVALID_VALUE)
{
// Suppress messages about deleting already deleted objects called from LLViewerWindow::stopGL()
// "GL_INVALID_VALUE error generated. Handle does not refer to an object generated by OpenGL."
return;
}
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
{
LL_WARNS() << "----- GL ERROR --------" << LL_ENDL;
@ -106,7 +117,8 @@ void APIENTRY gl_debug_callback(GLenum source,
LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL;
LL_WARNS() << "Message: " << message << LL_ENDL;
LL_WARNS() << "-----------------------" << LL_ENDL;
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
// No needs to halt when is called from LLViewerWindow::stopGL()
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB && !gGLManager.mIsDisabled)
{
LL_ERRS() << "Halting on GL Error" << LL_ENDL;
}

View File

@ -2207,65 +2207,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
//set up pointers if the data mask is different ...
bool setup = (sLastMask != data_mask);
if (gDebugGL && data_mask != 0)
{ //make sure data requirements are fulfilled
LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
if (shader)
{
U32 required_mask = 0;
for (U32 i = 0; i < LLVertexBuffer::TYPE_TEXTURE_INDEX; ++i)
{
if (shader->getAttribLocation(i) > -1)
{
U32 required = 1 << i;
if ((data_mask & required) == 0)
{
LL_WARNS() << "Missing attribute: " << LLShaderMgr::instance()->mReservedAttribs[i] << LL_ENDL;
}
required_mask |= required;
}
}
if ((data_mask & required_mask) != required_mask)
{
U32 unsatisfied_mask = (required_mask & ~data_mask);
for (U32 i = 0; i < TYPE_MAX; i++)
{
U32 unsatisfied_flag = unsatisfied_mask & (1 << i);
switch (unsatisfied_flag)
{
case 0: break;
case MAP_VERTEX: LL_INFOS() << "Missing vert pos" << LL_ENDL; break;
case MAP_NORMAL: LL_INFOS() << "Missing normals" << LL_ENDL; break;
case MAP_TEXCOORD0: LL_INFOS() << "Missing TC 0" << LL_ENDL; break;
case MAP_TEXCOORD1: LL_INFOS() << "Missing TC 1" << LL_ENDL; break;
case MAP_TEXCOORD2: LL_INFOS() << "Missing TC 2" << LL_ENDL; break;
case MAP_TEXCOORD3: LL_INFOS() << "Missing TC 3" << LL_ENDL; break;
case MAP_COLOR: LL_INFOS() << "Missing vert color" << LL_ENDL; break;
case MAP_EMISSIVE: LL_INFOS() << "Missing emissive" << LL_ENDL; break;
case MAP_TANGENT: LL_INFOS() << "Missing tangent" << LL_ENDL; break;
case MAP_WEIGHT: LL_INFOS() << "Missing weight" << LL_ENDL; break;
case MAP_WEIGHT4: LL_INFOS() << "Missing weightx4" << LL_ENDL; break;
case MAP_CLOTHWEIGHT: LL_INFOS() << "Missing clothweight" << LL_ENDL; break;
case MAP_TEXTURE_INDEX: LL_INFOS() << "Missing tex index" << LL_ENDL; break;
default: LL_INFOS() << "Missing who effin knows: " << unsatisfied_flag << LL_ENDL;
}
}
// TYPE_INDEX is beyond TYPE_MAX, so check for it individually
if (unsatisfied_mask & (1 << TYPE_INDEX))
{
LL_INFOS() << "Missing indices" << LL_ENDL;
}
LL_ERRS() << "Shader consumption mismatches data provision." << LL_ENDL;
}
}
}
if (useVBOs())
{
if (mGLArray)

View File

@ -291,6 +291,8 @@ void LLToolTip::initFromParams(const LLToolTip::Params& p)
mTextBox->setText(p.message());
}
mIsTooltipPastable = p.allow_paste_tooltip;
updateTextBox();
snapToChildren();
}
@ -321,8 +323,6 @@ void LLToolTip::snapToChildren()
}
setShape(tooltip_rect);
mIsTooltipPastable = p.allow_paste_tooltip;
}
void LLToolTip::setVisible(BOOL visible)

View File

@ -382,6 +382,7 @@ void LLControlAvatar::idleUpdate(LLAgent &agent, const F64 &time)
void LLControlAvatar::markDead()
{
mRootVolp = NULL;
super::markDead();
mControlAVBridge = NULL;
}

View File

@ -770,19 +770,6 @@ void LLDrawable::movePartition()
if (part)
{
part->move(this, getSpatialGroup());
// SL-18251 "On-screen animesh characters using pelvis offset animations
// disappear when root goes off-screen"
//
// Update extents of the root node when Control Avatar changes it's bounds
if (mRenderType == LLPipeline::RENDER_TYPE_CONTROL_AV && isRoot())
{
LLControlAvatar* controlAvatar = dynamic_cast<LLControlAvatar*>(getVObj().get());
if (controlAvatar && controlAvatar->mControlAVBridge)
{
((LLSpatialGroup*)controlAvatar->mControlAVBridge->mOctree->getListener(0))->setState(LLViewerOctreeGroup::DIRTY);
}
}
}
}

View File

@ -54,14 +54,14 @@ void LLDrawPoolGround::prerender()
void LLDrawPoolGround::render(S32 pass)
{
// <FS:PP> Attempt to speed up things a little
// if (mDrawFace.empty() || !gSavedSettings.getBOOL("RenderGround"))
// if (mDrawFace.empty() || !LLGLSLShader::sCurBoundShaderPtr || !gSavedSettings.getBOOL("RenderGround"))
static LLCachedControl<bool> RenderGround(gSavedSettings, "RenderGround");
if (mDrawFace.empty() || !RenderGround)
if (mDrawFace.empty() || !LLGLSLShader::sCurBoundShaderPtr || !RenderGround)
// </FS:PP>
{
return;
}
}
LLGLSPipelineDepthTestSkyBox gls_skybox(true, false);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);

View File

@ -2282,6 +2282,24 @@ void move_items_to_new_subfolder(const uuid_vec_t& selected_uuids, const std::st
gInventory.createNewCategory(first_item->getParentUUID(), LLFolderType::FT_NONE, folder_name, func);
}
std::string get_category_path(LLUUID cat_id)
{
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
std::string localized_cat_name;
if (!LLTrans::findString(localized_cat_name, "InvFolder " + cat->getName()))
{
localized_cat_name = cat->getName();
}
if (cat->getParentUUID().notNull())
{
return get_category_path(cat->getParentUUID()) + " > " + localized_cat_name;
}
else
{
return localized_cat_name;
}
}
// Returns true if the item can be moved to Current Outfit or any outfit folder.
bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit)
{
@ -2320,24 +2338,6 @@ bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_out
return true;
}
std::string get_category_path(LLUUID cat_id)
{
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
std::string localized_cat_name;
if (!LLTrans::findString(localized_cat_name, "InvFolder " + cat->getName()))
{
localized_cat_name = cat->getName();
}
if (cat->getParentUUID().notNull())
{
return get_category_path(cat->getParentUUID()) + " > " + localized_cat_name;
}
else
{
return localized_cat_name;
}
}
// Returns TRUE if item is a landmark or a link to a landmark
// and can be moved to Favorites or Landmarks folder.
bool can_move_to_landmarks(LLInventoryItem* inv_item)

View File

@ -75,6 +75,17 @@ bool LLSearchHistory::save()
{
// build filename for each user
std::string resolved_filename = getHistoryFilePath();
// delete the file if it is empty or contains only empty entries
if (std::find_if(mSearchHistory.begin(), mSearchHistory.end(), [](const LLSearchHistoryItem& x)
{
return !x.search_query.empty();
}) == mSearchHistory.end())
{
remove(resolved_filename.c_str());
return true;
}
// open a file for writing
llofstream file(resolved_filename.c_str());
if (!file.is_open())

View File

@ -855,6 +855,43 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c
assert_states_valid(this);
}
//virtual
void LLSpatialGroup::rebound()
{
if (!isDirty())
return;
super::rebound();
if (mSpatialPartition->mDrawableType == LLPipeline::RENDER_TYPE_CONTROL_AV)
{
llassert(mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_CONTROL_AV);
LLSpatialBridge* bridge = getSpatialPartition()->asBridge();
if (bridge &&
bridge->mDrawable &&
bridge->mDrawable->getVObj() &&
bridge->mDrawable->getVObj()->isRoot())
{
LLControlAvatar* controlAvatar = bridge->mDrawable->getVObj()->getControlAvatar();
if (controlAvatar &&
controlAvatar->mDrawable &&
controlAvatar->mControlAVBridge)
{
llassert(controlAvatar->mControlAVBridge->mOctree);
LLSpatialGroup* root = (LLSpatialGroup*)controlAvatar->mControlAVBridge->mOctree->getListener(0);
if (this == root)
{
const LLVector4a* addingExtents = controlAvatar->mDrawable->getSpatialExtents();
const LLXformMatrix* currentTransform = bridge->mDrawable->getXform();
expandExtents(addingExtents, *currentTransform);
}
}
}
}
}
void LLSpatialGroup::destroyGL(bool keep_occlusion)
{
// <FS:Ansariel> Reset VB during TP
@ -1323,17 +1360,8 @@ void drawBox(const LLVector4a& c, const LLVector4a& r)
void drawBoxOutline(const LLVector3& pos, const LLVector3& size)
{
llassert(pos.isFinite());
llassert(size.isFinite());
llassert(!llisnan(pos.mV[0]));
llassert(!llisnan(pos.mV[1]));
llassert(!llisnan(pos.mV[2]));
llassert(!llisnan(size.mV[0]));
llassert(!llisnan(size.mV[1]));
llassert(!llisnan(size.mV[2]));
if (!pos.isFinite() || !size.isFinite())
return;
LLVector3 v1 = size.scaledVec(LLVector3( 1, 1,1));
LLVector3 v2 = size.scaledVec(LLVector3(-1, 1,1));
@ -1648,6 +1676,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask)
// - a linked rigged drawable face has the wrong draw order index
bool check_rigged_group(LLDrawable* drawable)
{
#if 0
if (drawable->isState(LLDrawable::RIGGED))
{
LLSpatialGroup* group = drawable->getSpatialGroup();
@ -1695,7 +1724,7 @@ bool check_rigged_group(LLDrawable* drawable)
}
}
}
#endif
return true;
}

View File

@ -216,6 +216,7 @@ public:
LL_ALIGN_PREFIX(64)
class LLSpatialGroup : public LLOcclusionCullingGroup
{
using super = LLOcclusionCullingGroup;
friend class LLSpatialPartition;
friend class LLOctreeStateCheck;
public:
@ -333,6 +334,9 @@ public:
virtual void handleDestruction(const TreeNode* node);
virtual void handleChildAddition(const OctreeNode* parent, OctreeNode* child);
// LLViewerOctreeGroup
virtual void rebound();
public:
LL_ALIGN_16(LLVector4a mViewAngle);
LL_ALIGN_16(LLVector4a mLastUpdateViewAngle);

View File

@ -3310,7 +3310,6 @@ void LLViewerObject::unlinkControlAvatar()
if (mControlAvatar)
{
mControlAvatar->markForDeath();
mControlAvatar->mRootVolp = NULL;
mControlAvatar = NULL;
}
}
@ -5109,7 +5108,7 @@ void LLViewerObject::setTEImage(const U8 te, LLViewerTexture *imagep)
S32 LLViewerObject::setTETextureCore(const U8 te, LLViewerTexture *image)
{
LLUUID old_image_id = getTEref(te).getID();
const LLUUID& uuid = image->getID();
const LLUUID& uuid = image ? image->getID() : LLUUID::null;
S32 retval = 0;
if (uuid != getTEref(te).getID() ||
uuid == LLUUID::null)

View File

@ -769,7 +769,10 @@ bool LLVOSky::updateSky()
mForceUpdate = FALSE;
mForceUpdateThrottle.setTimerExpirySec(UPDATE_EXPRY);
gPipeline.markRebuild(gSky.mVOGroundp->mDrawable, LLDrawable::REBUILD_ALL, TRUE);
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_GROUND))
{
gPipeline.markRebuild(gSky.mVOGroundp->mDrawable, LLDrawable::REBUILD_ALL, TRUE);
}
if (mDrawable.notNull() && mDrawable->getFace(0) && !mDrawable->getFace(0)->getVertexBuffer())
{

View File

@ -1933,17 +1933,23 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin();
iter != gPipeline.mNearbyLights.end(); iter++)
{
const LLViewerObject *vobj = iter->drawable->getVObj();
if (vobj && vobj->getAvatar()
&& vobj->isAttachment() && vobj->getAvatar() == muted_avatar)
{
gPipeline.mLights.erase(iter->drawable);
gPipeline.mNearbyLights.erase(iter);
}
}
light_set_t::iterator iter = gPipeline.mNearbyLights.begin();
while (iter != gPipeline.mNearbyLights.end())
{
const LLViewerObject* vobj = iter->drawable->getVObj();
if (vobj
&& vobj->getAvatar()
&& vobj->isAttachment()
&& vobj->getAvatar() == muted_avatar)
{
gPipeline.mLights.erase(iter->drawable);
iter = gPipeline.mNearbyLights.erase(iter);
}
else
{
iter++;
}
}
}
U32 LLPipeline::addObject(LLViewerObject *vobj)

View File

@ -1070,14 +1070,13 @@ with the same filename but different name
<texture name="Icon_Attachment_Small" file_name="icons/Icon_Attachment_Small.png" preload="true"/>
<texture name="Icon_Attachment_Large" file_name="icons/Icon_Attachment_Large.png" preload="true"/>
<texture name="Icon_Color_Palette" file_name="icons/Icon_Color_Palette.png" preload="false"/>
<texture name="Icon_Font_Size" file_name="icons/Icon_Font_Size.png" preload="false"/>
<texture name="Single_Folder_Mode" file_name="icons/single_folder_mode.png" preload="true"/>
<texture name="Multi_Folder_Mode" file_name="icons/multi_folder_mode.png" preload="true"/>
<texture name="Single_Folder_Back" file_name="icons/single_folder_back.png" preload="true"/>
<texture name="Single_Folder_Forward" file_name="icons/single_folder_forward.png" preload="true"/>
<texture name="Single_Folder_Up" file_name="icons/single_folder_up.png" preload="true"/>
<texture name="Icon_Color_Palette" file_name="icons/Icon_Color_Palette.png" preload="false"/>
<texture name="Icon_Font_Size" file_name="icons/Icon_Font_Size.png" preload="false"/>
<!-- StarLight Textures -->

View File

@ -7,7 +7,7 @@
left="0"
name="im_panel"
top="0"
width="305">
width="310">
<string
name="message_max_lines_count">
6
@ -24,7 +24,7 @@
mouse_opaque="false"
name="im_header"
top="5"
width="295">
width="300">
<avatar_icon
follows="right"
height="18"
@ -65,11 +65,11 @@
name="user_name"
parse_urls="false"
text_color="White"
top="8"
top="7"
translate="false"
use_ellipses="true"
value="TestString PleaseIgnore"
width="205" />
value="TestString PleaseIgnore (testing plsignore)"
width="172" />
<!-- TIME STAMP -->
<text
font="SansSerifSmall"
@ -79,9 +79,9 @@
halign="right"
right="-5"
name="time_box"
top="8"
value="23:30"
width="50" />
top="7"
value="2022/09/23 23:30"
width="96" />
</panel>
<text
font="SansSerifSmall"
@ -94,7 +94,7 @@
top="33"
use_ellipses="true"
value=""
width="285"
width="290"
word_wrap="true"
max_length="350" />
</panel>