diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index b599601b32..7d6bc9688d 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -108,6 +108,10 @@ bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, LLT llassert(usage == LLTexUnit::TT_TEXTURE); llassert(!isBoundInStack()); + if(mResX == resx && mResY == resy && mUsage == usage && depth == mUseDepth && mGenerateMipMaps == generateMipMaps) + { + return true; + } resx = llmin(resx, (U32) gGLManager.mGLMaxTextureSize); resy = llmin(resy, (U32) gGLManager.mGLMaxTextureSize); @@ -360,7 +364,8 @@ void LLRenderTarget::release() sBytesAllocated -= mResX*mResY*4; } - else if (mFBO) + // else if (mFBO) + if (mFBO) { glBindFramebuffer(GL_FRAMEBUFFER, mFBO); diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp index d398c73afe..92c9c813e7 100644 --- a/indra/newview/ao.cpp +++ b/indra/newview/ao.cpp @@ -203,6 +203,16 @@ void FloaterAO::updateList() } } +void FloaterAO::updateScrollListData() +{ + auto animationListData = mAnimationList->getAllData(); + for (auto index = 0; index < mSelectedState->mAnimations.size(); ++index) + { + LLScrollListItem* item = animationListData[index]; + item->setUserdata(&mSelectedState->mAnimations[index].mInventoryUUID); + } +} + bool FloaterAO::postBuild() { LLPanel* aoPanel = getChild("animation_overrider_outer_panel"); @@ -674,6 +684,7 @@ void FloaterAO::onClickMoveUp() if (AOEngine::instance().swapWithPrevious(mSelectedState, currentIndex)) { mAnimationList->swapWithPrevious(currentIndex); + updateScrollListData(); } } @@ -699,6 +710,7 @@ void FloaterAO::onClickMoveDown() if (AOEngine::instance().swapWithNext(mSelectedState, currentIndex)) { mAnimationList->swapWithNext(currentIndex); + updateScrollListData(); } } diff --git a/indra/newview/ao.h b/indra/newview/ao.h index be4de0fbc5..1ef283d9c0 100644 --- a/indra/newview/ao.h +++ b/indra/newview/ao.h @@ -55,6 +55,7 @@ class FloaterAO virtual void onOpen(const LLSD& key); virtual void onClose(bool app_quitting); void updateList(); + void updateScrollListData(); void updateSetParameters(); void updateAnimationList(); diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index ae611bd320..e8dd82fc73 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -718,7 +718,7 @@ void LLAppViewerWin32::bugsplatAddStaticAttributes(const LLSD& info) if (bugSplatMap.writeToFile(BugSplatAttributes::getCrashContextFileName())) { - LL_INFOS() << "Crash context saved to " << WCSTR(BugSplatAttributes::getCrashContextFileName()) << LL_ENDL; + LL_INFOS() << "Crash context saved to " << BugSplatAttributes::getCrashContextFileName() << LL_ENDL; } #endif } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 537da7cef7..030b01a6f3 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -551,9 +551,12 @@ public: static LLCachedControl debugShowMemory(gSavedSettings, "DebugShowMemory"); if (debugShowMemory) { + auto rss = LLMemory::getCurrentRSS() / 1024; addText(xpos, ypos, - STRINGIZE("Memory: " << (LLMemory::getCurrentRSS() / 1024) << " (KB)")); + STRINGIZE("Memory: " << rss << " (KB)")); ypos += y_inc; + LL_PROFILE_PLOT("RSS", (int64_t)rss ); + LL_PROFILE_PLOT("GL:", (int64_t)LLRenderTarget::sBytesAllocated ); } if (gDisplayCameraPos) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index d1c17604f1..2e136b0c8f 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -372,7 +372,13 @@ bool addDeferredAttachments(LLRenderTarget& target, bool for_impostor = false) U32 orm = GL_RGBA; U32 norm = GL_RGBA16F; U32 emissive = GL_RGB16F; - + // FIRE-34483 additional fix + if (target.getNumTextures() > 1) + { + LL_DEBUGS() << "LLPipeline::addDeferredAttachments() - target already has textures - skipping" << LL_ENDL; + return true; + } + // static LLCachedControl has_emissive(gSavedSettings, "RenderEnableEmissiveBuffer", false); static LLCachedControl has_hdr(gSavedSettings, "RenderHDREnabled", true); bool hdr = has_hdr() && gGLManager.mGLVersion > 4.05f; @@ -877,6 +883,7 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY) if (mRT == &mMainRT) { // hacky -- allocate auxillary buffer + LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("check reflection map setup"); // improve Tracy scoping gCubeSnapshot = true; @@ -961,8 +968,10 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY) if (!gCubeSnapshot) // hack to not re-allocate various targets for cube snapshots { + LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("non-cube allocations"); // improve Tracy scoping if (RenderUIBuffer) { + LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("UIBuffer"); // improve Tracy scoping if (!mUIScreen.allocate(resX, resY, GL_RGBA)) { return false; @@ -971,9 +980,11 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY) if (RenderFSAAType > 0) { + LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("FSAABuffer"); // improve Tracy scoping if (!mFXAAMap.allocate(resX, resY, GL_RGBA)) return false; if (RenderFSAAType == 2) { + LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("SMAABuffer"); // improve Tracy scoping if (!mSMAABlendBuffer.allocate(resX, resY, GL_RGBA, false)) return false; } } @@ -988,6 +999,7 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY) if(RenderScreenSpaceReflections) { + LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("SSRBuffer"); // improve Tracy scoping mSceneMap.allocate(resX, resY, screenFormat, true); } else @@ -995,14 +1007,22 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY) mSceneMap.release(); } + {LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("mPostMapBuffer"); // improve Tracy scoping mPostMap.allocate(resX, resY, screenFormat); - + } // improve Tracy scoping // used to scale down textures // See LLViwerTextureList::updateImagesCreateTextures and LLImageGL::scaleDown + {LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("DownResBuffer");// create an independent preview screen target mDownResMap.allocate(1024, 1024, GL_RGBA); + }// create an independent preview screen target - mPreviewScreen.allocate(MAX_PREVIEW_WIDTH, MAX_PREVIEW_HEIGHT, GL_RGBA); // create an independent preview screen target + // create an independent preview screen target + {LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("PreviewScreenBuffer"); + mPreviewScreen.allocate(MAX_PREVIEW_WIDTH, MAX_PREVIEW_HEIGHT, GL_RGBA); + } // + {LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("BakeMapBuffer");// create an independent preview screen target mBakeMap.allocate(LLAvatarAppearanceDefines::SCRATCH_TEX_WIDTH, LLAvatarAppearanceDefines::SCRATCH_TEX_HEIGHT, GL_RGBA); + }// create an independent preview screen target } //HACK make screenbuffer allocations start failing after 30 seconds if (gSavedSettings.getBOOL("SimulateFBOFailure")) @@ -8019,7 +8039,10 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) F32 blur_constant = focal_length * focal_length / (fnumber * (subject_distance - focal_length)); blur_constant /= 1000.f; // convert to meters for shader F32 magnification = focal_length / (subject_distance - focal_length); - + // FIRE-13989 DOF should be equivalent in all resolutions of the same rendered image + F32 screen_to_target_scale_factor = (F32)gViewerWindow->getWindowHeightRaw()/dst->getHeight(); + F32 adj_COF = CameraMaxCoF / screen_to_target_scale_factor; + // { // build diffuse+bloom+CoF mRT->deferredLight.bindTarget(); @@ -8033,9 +8056,16 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) gDeferredCoFProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight()); gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance / 1000.f); gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant); - gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f / LLDrawable::sCurPixelAngle)); + // FIRE-13989 DOF should be equivalent in all resolutions of the same rendered image + // gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f / LLDrawable::sCurPixelAngle)); + gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f / LLDrawable::sCurPixelAngle) * screen_to_target_scale_factor); + // gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification); - gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF); + // FIRE-13989 DOF should be equivalent in all resolutions of the same rendered image + // gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF); + // divide by the screen->target ratio so tha a larger target (ratio < 1) has a higher MaxCoF value + gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, adj_COF); + // gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale); mScreenTriangleVB->setBuffer(); @@ -8057,7 +8087,10 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) gDeferredPostProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, &mRT->deferredLight, LLTexUnit::TFO_POINT); gDeferredPostProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight()); - gDeferredPostProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF); + // FIRE-13989 DOF should be equivalent in all resolutions of the same rendered image + // gDeferredPostProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF); + gDeferredPostProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, adj_COF); + // gDeferredPostProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale); mScreenTriangleVB->setBuffer(); @@ -8079,7 +8112,10 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) gDeferredDoFCombineProgram.bindTexture(LLShaderMgr::DEFERRED_LIGHT, &mRT->deferredLight, LLTexUnit::TFO_POINT); gDeferredDoFCombineProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight()); - gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF); + // FIRE-13989 DOF should be equivalent in all resolutions of the same rendered image + // gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF); + gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, adj_COF); + // gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale); gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_WIDTH, (dof_width - 1) / (F32)src->getWidth()); gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_HEIGHT, (dof_height - 1) / (F32)src->getHeight()); diff --git a/indra/newview/skins/default/xui/de/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/de/panel_snapshot_inventory.xml index 13ce9917ff..69f118ecac 100644 --- a/indra/newview/skins/default/xui/de/panel_snapshot_inventory.xml +++ b/indra/newview/skins/default/xui/de/panel_snapshot_inventory.xml @@ -7,6 +7,8 @@ + + diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml index 2d634ddeb4..f46c8df284 100644 --- a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml @@ -59,6 +59,14 @@ label="Large (512x512)" name="Large(512x512)" value="[i512,i512]" /> + +