diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index a8fc4f09a3..29484197d5 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1217,7 +1217,21 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) prev_obj_id = objectp->getID(); } } - + else + { + if (prev_obj_id != objectp->getID()) + { + if (has_pbr_material && (mComboMatMedia->getCurrentIndex() == MATMEDIA_MATERIAL)) + { + mComboMatMedia->selectNthItem(MATMEDIA_PBR); + } + else if (!has_pbr_material && (mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)) + { + mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL); + } + prev_obj_id = objectp->getID(); + } + } mComboMatMedia->setEnabled(editable); //LLRadioGroup* radio_mat_type = getChild("radio_material_type"); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index d3cb48b013..beca344d17 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2213,9 +2213,6 @@ bool LLViewerFetchedTexture::updateFetch() } } - llassert(mRawImage.notNull() || !mIsRawImageValid); - llassert(mRawImage.notNull() || !mNeedsCreateTexture); - return mIsFetching ? true : false; } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 47fba6c113..21a36f110c 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -907,6 +907,13 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag { F32 vsize = face->getPixelArea(); + // scale desired texture resolution higher or lower depending on texture scale + const LLTextureEntry* te = face->getTextureEntry(); + F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f; + min_scale = llmax(min_scale*min_scale, 0.1f); + + vsize /= min_scale; + #if LL_DARWIN vsize /= 1.f + LLViewerTexture::sDesiredDiscardBias*(1.f+face->getDrawable()->mDistanceWRTCamera*bias_distance_scale); #else @@ -924,7 +931,6 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag // if a GLTF material is present, ignore that face // as far as this texture stats go, but update the GLTF material // stats - const LLTextureEntry* te = face->getTextureEntry(); LLFetchedGLTFMaterial* mat = te ? (LLFetchedGLTFMaterial*)te->getGLTFRenderMaterial() : nullptr; llassert(mat == nullptr || dynamic_cast(te->getGLTFRenderMaterial()) != nullptr); if (mat)