From 34e79c8f4e251200496651f9ae2b5126a6f7faa3 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 11 Mar 2022 10:21:08 -0600 Subject: SL-17005 WIP Simplify what feeds texture loading bias to only pay attention to available memory according to OS and GL driver, not (broken) internal accounting (breaks intel GPUs, compatibility pass incoming). --- indra/newview/llviewerwindow.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a54c29a404..47d612ab9a 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5532,8 +5532,6 @@ void LLViewerWindow::stopGL(BOOL save_state) LLGLSLShader* shader = *(LLGLSLShader::sInstances.begin()); shader->unload(); } - - LL_INFOS() << "Remaining allocated texture memory: " << LLImageGL::sGlobalTextureMemory.value() << " bytes" << LL_ENDL; } } -- cgit v1.2.3 From 93260cfeff2382dd1ffeecaef208d37bf21c2a01 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 4 May 2022 16:07:50 +0000 Subject: SL-17283 LLReflectionMapManager prototype. Remove snapshot code related overhead from reflection map renders. Add parallax correction and support for multiple reflection maps. --- indra/newview/llviewerwindow.cpp | 147 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 42e21f7130..f562a9458b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5170,6 +5170,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes) { + LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; gDisplaySwapBuffers = FALSE; glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); @@ -5266,6 +5267,152 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ return true; } +BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMap* cubemap) +{ + // NOTE: implementation derived from LLFloater360Capture::capture360Images() and simpleSnapshot + LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; + llassert(LLPipeline::sRenderDeferred); + + U32 res = cubemap->getResolution(); + + llassert(res <= gPipeline.mDeferredScreen.getWidth()); + llassert(res <= gPipeline.mDeferredScreen.getHeight()); + + + + // save current view/camera settings so we can restore them afterwards + S32 old_occlusion = LLPipeline::sUseOcclusion; + + // set new parameters specific to the 360 requirements + LLPipeline::sUseOcclusion = 0; + LLViewerCamera* camera = LLViewerCamera::getInstance(); + LLVector3 old_origin = camera->getOrigin(); + F32 old_fov = camera->getView(); + F32 old_aspect = camera->getAspect(); + F32 old_yaw = camera->getYaw(); + + // camera constants for the square, cube map capture image + camera->setAspect(1.0); // must set aspect ratio first to avoid undesirable clamping of vertical FoV + camera->setView(F_PI_BY_TWO); + camera->yaw(0.0); + camera->setOrigin(origin); + + gDisplaySwapBuffers = FALSE; + + glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + + BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE; + if (prev_draw_ui != false) + { + LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); + } + + LLPipeline::sShowHUDAttachments = FALSE; + LLRect window_rect = getWorldViewRectRaw(); + + LLRenderTarget scratch_space; // TODO: hold onto "scratch space" render target and allocate oncer per session (allocate takes > 1ms) + U32 color_fmt = GL_RGBA; + const bool use_depth_buffer = true; + const bool use_stencil_buffer = true; + if (scratch_space.allocate(res, res, color_fmt, use_depth_buffer, use_stencil_buffer)) + { + mWorldViewRectRaw.set(0, res, res, 0); + scratch_space.bindTarget(); + } + else + { + return FALSE; + } + + // "target" parameter of glCopyTexImage2D for each side of cubemap + U32 targets[6] = { + GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, + GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, + GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, + GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB + }; + + // these are the 6 directions we will point the camera, see LLCubeMap::mTargets + LLVector3 look_dirs[6] = { + LLVector3(-1, 0, 0), + LLVector3(1, 0, 0), + LLVector3(0, -1, 0), + LLVector3(0, 1, 0), + LLVector3(0, 0, -1), + LLVector3(0, 0, 1) + }; + + LLVector3 look_upvecs[6] = { + LLVector3(0, -1, 0), + LLVector3(0, -1, 0), + LLVector3(0, 0, -1), + LLVector3(0, 0, 1), + LLVector3(0, -1, 0), + LLVector3(0, -1, 0) + }; + + // for each of six sides of cubemap + for (int i = 0; i < 6; ++i) + { + // set up camera to look in each direction + camera->lookDir(look_dirs[i], look_upvecs[i]); + + // turning this flag off here prohibits the screen swap + // to present the new page to the viewer - this stops + // the black flash in between captures when the number + // of render passes is more than 1. We need to also + // set it here because code in LLViewerDisplay resets + // it to TRUE each time. + gDisplaySwapBuffers = FALSE; + + // actually render the scene + const U32 subfield = 0; + const bool do_rebuild = true; + const F32 zoom = 1.0; + const bool for_snapshot = TRUE; + display(do_rebuild, zoom, subfield, for_snapshot); + + // copy results to cube map face + cubemap->enable(0); + cubemap->bind(); + glCopyTexImage2D(targets[i], 0, GL_RGB, 0, 0, res, res, 0); + gGL.getTexUnit(0)->disable(); + cubemap->disable(); + } + + gDisplaySwapBuffers = FALSE; + gDepthDirty = TRUE; + + if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { + if (prev_draw_ui != false) + { + LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); + } + } + + LLPipeline::sShowHUDAttachments = TRUE; + + gPipeline.resetDrawOrders(); + mWorldViewRectRaw = window_rect; + scratch_space.flush(); + scratch_space.release(); + + // restore original view/camera/avatar settings settings + camera->setAspect(old_aspect); + camera->setView(old_fov); + camera->yaw(old_yaw); + camera->setOrigin(old_origin); + + LLPipeline::sUseOcclusion = old_occlusion; + + // ==================================================== + + return true; +} + void LLViewerWindow::destroyWindow() { if (mWindow) -- cgit v1.2.3 From 3400e5fd302c0d9dea6386c4d5bf38876f2cc287 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 16 May 2022 17:21:08 +0000 Subject: SL-17284 Reflection probe tuning and optimization take 1 --- indra/newview/llviewerwindow.cpp | 99 +++++++++++++++------------------------- 1 file changed, 36 insertions(+), 63 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index f562a9458b..9bda4bbf92 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -228,6 +228,7 @@ extern BOOL gDebugClicks; extern BOOL gDisplaySwapBuffers; extern BOOL gDepthDirty; extern BOOL gResizeScreenTexture; +extern BOOL gCubeSnapshot; LLViewerWindow *gViewerWindow = NULL; @@ -5267,29 +5268,30 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ return true; } -BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMap* cubemap) +void display_cube_face(); + +BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face) { // NOTE: implementation derived from LLFloater360Capture::capture360Images() and simpleSnapshot LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; llassert(LLPipeline::sRenderDeferred); + llassert(!gCubeSnapshot); //assert a snapshot isn't already in progress - U32 res = cubemap->getResolution(); + U32 res = LLRenderTarget::sCurResX; llassert(res <= gPipeline.mDeferredScreen.getWidth()); llassert(res <= gPipeline.mDeferredScreen.getHeight()); - - // save current view/camera settings so we can restore them afterwards S32 old_occlusion = LLPipeline::sUseOcclusion; // set new parameters specific to the 360 requirements LLPipeline::sUseOcclusion = 0; LLViewerCamera* camera = LLViewerCamera::getInstance(); - LLVector3 old_origin = camera->getOrigin(); - F32 old_fov = camera->getView(); - F32 old_aspect = camera->getAspect(); - F32 old_yaw = camera->getYaw(); + + LLViewerCamera saved_camera = LLViewerCamera::instance(); + glh::matrix4f saved_proj = get_current_projection(); + glh::matrix4f saved_mod = get_current_modelview(); // camera constants for the square, cube map capture image camera->setAspect(1.0); // must set aspect ratio first to avoid undesirable clamping of vertical FoV @@ -5297,8 +5299,6 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMap* cubemap) camera->yaw(0.0); camera->setOrigin(origin); - gDisplaySwapBuffers = FALSE; - glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE; @@ -5306,55 +5306,38 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMap* cubemap) { LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } - - LLPipeline::sShowHUDAttachments = FALSE; - LLRect window_rect = getWorldViewRectRaw(); - - LLRenderTarget scratch_space; // TODO: hold onto "scratch space" render target and allocate oncer per session (allocate takes > 1ms) - U32 color_fmt = GL_RGBA; - const bool use_depth_buffer = true; - const bool use_stencil_buffer = true; - if (scratch_space.allocate(res, res, color_fmt, use_depth_buffer, use_stencil_buffer)) - { - mWorldViewRectRaw.set(0, res, res, 0); - scratch_space.bindTarget(); - } - else + BOOL prev_draw_particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES); + if (prev_draw_particles) { - return FALSE; + gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES); } + LLPipeline::sShowHUDAttachments = FALSE; + LLRect window_rect = getWorldViewRectRaw(); - // "target" parameter of glCopyTexImage2D for each side of cubemap - U32 targets[6] = { - GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB - }; + mWorldViewRectRaw.set(0, res, res, 0); - // these are the 6 directions we will point the camera, see LLCubeMap::mTargets + // these are the 6 directions we will point the camera, see LLCubeMapArray::sTargets LLVector3 look_dirs[6] = { - LLVector3(-1, 0, 0), LLVector3(1, 0, 0), - LLVector3(0, -1, 0), + LLVector3(-1, 0, 0), LLVector3(0, 1, 0), - LLVector3(0, 0, -1), - LLVector3(0, 0, 1) + LLVector3(0, -1, 0), + LLVector3(0, 0, 1), + LLVector3(0, 0, -1) }; LLVector3 look_upvecs[6] = { LLVector3(0, -1, 0), LLVector3(0, -1, 0), - LLVector3(0, 0, -1), LLVector3(0, 0, 1), + LLVector3(0, 0, -1), LLVector3(0, -1, 0), LLVector3(0, -1, 0) }; // for each of six sides of cubemap - for (int i = 0; i < 6; ++i) + //for (int i = 0; i < 6; ++i) + int i = face; { // set up camera to look in each direction camera->lookDir(look_dirs[i], look_upvecs[i]); @@ -5368,22 +5351,12 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMap* cubemap) gDisplaySwapBuffers = FALSE; // actually render the scene - const U32 subfield = 0; - const bool do_rebuild = true; - const F32 zoom = 1.0; - const bool for_snapshot = TRUE; - display(do_rebuild, zoom, subfield, for_snapshot); - - // copy results to cube map face - cubemap->enable(0); - cubemap->bind(); - glCopyTexImage2D(targets[i], 0, GL_RGB, 0, 0, res, res, 0); - gGL.getTexUnit(0)->disable(); - cubemap->disable(); + gCubeSnapshot = TRUE; + display_cube_face(); + gCubeSnapshot = FALSE; } - gDisplaySwapBuffers = FALSE; - gDepthDirty = TRUE; + gDisplaySwapBuffers = TRUE; if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { @@ -5393,23 +5366,23 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMap* cubemap) } } + if (prev_draw_particles) + { + gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES); + } + LLPipeline::sShowHUDAttachments = TRUE; gPipeline.resetDrawOrders(); mWorldViewRectRaw = window_rect; - scratch_space.flush(); - scratch_space.release(); // restore original view/camera/avatar settings settings - camera->setAspect(old_aspect); - camera->setView(old_fov); - camera->yaw(old_yaw); - camera->setOrigin(old_origin); - + *camera = saved_camera; + set_current_modelview(saved_mod); + set_current_projection(saved_proj); LLPipeline::sUseOcclusion = old_occlusion; // ==================================================== - return true; } -- cgit v1.2.3 From 6c6d9a10f830e264cf75603949b54a12256cab78 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 20 May 2022 13:31:18 -0500 Subject: SL-17287 Update Tracy to 0.8.1. Clean up GPU instrumentation. --- indra/newview/llviewerwindow.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9c9c30ad95..ad57fcd802 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5274,6 +5274,7 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea { // NOTE: implementation derived from LLFloater360Capture::capture360Images() and simpleSnapshot LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; + LL_PROFILE_GPU_ZONE("cubeSnapshot"); llassert(LLPipeline::sRenderDeferred); llassert(!gCubeSnapshot); //assert a snapshot isn't already in progress -- cgit v1.2.3 From 6eaf8521abae0deeb1162f9c61747183110176b0 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 20 May 2022 19:05:28 -0500 Subject: SL-17287 Instrument and optimize cubemap render. Fix for cubemap snapshots doing a full resolution render instead of a 512x512 render. --- indra/newview/llviewerwindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ad57fcd802..a6597e3233 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4927,8 +4927,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei U32 color_fmt = type == LLSnapshotModel::SNAPSHOT_TYPE_DEPTH ? GL_DEPTH_COMPONENT : GL_RGBA; if (scratch_space.allocate(image_width, image_height, color_fmt, true, true)) { - original_width = gPipeline.mDeferredScreen.getWidth(); - original_height = gPipeline.mDeferredScreen.getHeight(); + original_width = gPipeline.mRT->deferredScreen.getWidth(); + original_height = gPipeline.mRT->deferredScreen.getHeight(); if (gPipeline.allocateScreenBuffer(image_width, image_height)) { @@ -5186,8 +5186,8 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ LLPipeline::sShowHUDAttachments = FALSE; LLRect window_rect = getWorldViewRectRaw(); - S32 original_width = LLPipeline::sRenderDeferred ? gPipeline.mDeferredScreen.getWidth() : gViewerWindow->getWorldViewWidthRaw(); - S32 original_height = LLPipeline::sRenderDeferred ? gPipeline.mDeferredScreen.getHeight() : gViewerWindow->getWorldViewHeightRaw(); + S32 original_width = LLPipeline::sRenderDeferred ? gPipeline.mRT->deferredScreen.getWidth() : gViewerWindow->getWorldViewWidthRaw(); + S32 original_height = LLPipeline::sRenderDeferred ? gPipeline.mRT->deferredScreen.getHeight() : gViewerWindow->getWorldViewHeightRaw(); LLRenderTarget scratch_space; U32 color_fmt = GL_RGBA; @@ -5280,8 +5280,8 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea U32 res = LLRenderTarget::sCurResX; - llassert(res <= gPipeline.mDeferredScreen.getWidth()); - llassert(res <= gPipeline.mDeferredScreen.getHeight()); + llassert(res <= gPipeline.mRT->deferredScreen.getWidth()); + llassert(res <= gPipeline.mRT->deferredScreen.getHeight()); // save current view/camera settings so we can restore them afterwards S32 old_occlusion = LLPipeline::sUseOcclusion; -- cgit v1.2.3 From dfa71e2bb59e81de93f626fada6975ae46b01bb6 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 31 May 2022 11:57:15 -0500 Subject: SL-17490 Only update a subset of textures each frame and remove dead debug code. --- indra/newview/llviewerwindow.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 65010f1985..e27b5caab7 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -493,24 +493,12 @@ public: if (gSavedSettings.getBOOL("DebugShowTime")) { - { - const U32 y_inc2 = 15; - LLFrameTimer& timer = gTextureTimer; - F32 time = timer.getElapsedTimeF32(); - S32 hours = (S32)(time / (60*60)); - S32 mins = (S32)((time - hours*(60*60)) / 60); - S32 secs = (S32)((time - hours*(60*60) - mins*60)); - addText(xpos, ypos, llformat("Texture: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc2; - } - - { F32 time = gFrameTimeSeconds; S32 hours = (S32)(time / (60*60)); S32 mins = (S32)((time - hours*(60*60)) / 60); S32 secs = (S32)((time - hours*(60*60) - mins*60)); addText(xpos, ypos, llformat("Time: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc; } - } if (gSavedSettings.getBOOL("DebugShowMemory")) { -- cgit v1.2.3 From 220afbcda0961df86ad08bbd51d96b8c868b2e62 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 2 Jun 2022 18:42:38 -0500 Subject: SL-17285 Add proper reflection probe support to LLVOVolume, LLPrimitive, and LLPanelVolume --- indra/newview/llviewerwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a6597e3233..6a60671040 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5270,7 +5270,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ void display_cube_face(); -BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face) +BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face, F32 near_clip) { // NOTE: implementation derived from LLFloater360Capture::capture360Images() and simpleSnapshot LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; @@ -5299,6 +5299,7 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea camera->setView(F_PI_BY_TWO); camera->yaw(0.0); camera->setOrigin(origin); + camera->setNear(near_clip); glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); -- cgit v1.2.3 From 50dca86f64a167fe0db901310d04784b2f0dfa1f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 9 Jun 2022 12:06:23 -0400 Subject: SL-17483: Recast LLImageDecodeThread as a facade for ThreadPool. Remove all references to LLQueuedThread (but emulate a couple bits of its API such as handle_t and getPending()). Migrate ImageRequest into llimageworker.cpp. It has never been part of LLImageDecodeThread's public API. Remove ImageRequest tests. Remove all references to LLImageDecodeThread::pause(). The idea of pausing another thread is bizarre to me, and LLThreadPool has no such operation. Nor does it have an abortRequest(). --- indra/newview/llviewerwindow.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e27b5caab7..15f20d1d34 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5476,7 +5476,6 @@ void LLViewerWindow::stopGL(BOOL save_state) // Pause texture decode threads (will get unpaused during main loop) LLAppViewer::getTextureCache()->pause(); - LLAppViewer::getImageDecodeThread()->pause(); LLAppViewer::getTextureFetch()->pause(); gSky.destroyGL(); -- cgit v1.2.3 From 0d9c23372bf8b34387b7d9de89234d3e9a5fd879 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 9 Jun 2022 14:09:33 -0500 Subject: SL-17551 Add "Select Reflection Probes" menu option and make invisible objects less annoying when alt-zooming in edit mode. --- indra/newview/llviewerwindow.cpp | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6a60671040..6613c8ac01 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3371,7 +3371,7 @@ void LLViewerWindow::updateUI() if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST)) { gDebugRaycastFaceHit = -1; - gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, + gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, &gDebugRaycastFaceHit, &gDebugRaycastIntersection, &gDebugRaycastTexCoord, @@ -4195,13 +4195,11 @@ void LLViewerWindow::pickAsync( S32 x, BOOL pick_rigged, BOOL pick_unselectable) { - BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); - if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) - { - // build mode allows interaction with all transparent objects - // "Show Debug Alpha" means no object actually transparent - pick_transparent = TRUE; - } + // "Show Debug Alpha" means no object actually transparent + if (LLDrawPoolAlpha::sShowDebugAlpha) + { + pick_transparent = TRUE; + } LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, callback); schedulePick(pick_info); @@ -4259,7 +4257,7 @@ void LLViewerWindow::returnEmptyPicks() } // Performs the GL object/land pick. -LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle) +LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle, BOOL pick_unselectable) { BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) @@ -4308,6 +4306,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de S32 this_face, BOOL pick_transparent, BOOL pick_rigged, + BOOL pick_unselectable, S32* face_hit, LLVector4a *intersection, LLVector2 *uv, @@ -4378,7 +4377,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de { if (this_object->isHUDAttachment()) // is a HUD object? { - if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent, pick_rigged, + if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent, pick_rigged, pick_unselectable, face_hit, intersection, uv, normal, tangent)) { found = this_object; @@ -4386,7 +4385,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de } else // is a world object { - if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, pick_rigged, + if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, pick_rigged, pick_unselectable, face_hit, intersection, uv, normal, tangent)) { found = this_object; @@ -4400,7 +4399,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de if (!found) // if not found in HUD, look in world: { - found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged, + found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged, pick_unselectable, face_hit, intersection, uv, normal, tangent); if (found && !pick_transparent) { @@ -5007,8 +5006,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei F32 depth_conversion_factor_1 = (LLViewerCamera::getInstance()->getFar() + LLViewerCamera::getInstance()->getNear()) / (2.f * LLViewerCamera::getInstance()->getFar() * LLViewerCamera::getInstance()->getNear()); F32 depth_conversion_factor_2 = (LLViewerCamera::getInstance()->getFar() - LLViewerCamera::getInstance()->getNear()) / (2.f * LLViewerCamera::getInstance()->getFar() * LLViewerCamera::getInstance()->getNear()); - gObjectList.generatePickList(*LLViewerCamera::getInstance()); - // Subimages are in fact partial rendering of the final view. This happens when the final view is bigger than the screen. // In most common cases, scale_factor is 1 and there's no more than 1 iteration on x and y for (int subimage_y = 0; subimage_y < scale_factor; ++subimage_y) @@ -6060,7 +6057,7 @@ void LLPickInfo::fetchResults() } LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f, - NULL, -1, mPickTransparent, mPickRigged, &face_hit, + NULL, -1, mPickTransparent, mPickRigged, mPickUnselectable, &face_hit, &intersection, &uv, &normal, &tangent, &start, &end); mPickPt = mMousePt; @@ -6205,7 +6202,7 @@ void LLPickInfo::getSurfaceInfo() if (objectp) { if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f, - objectp, -1, mPickTransparent, mPickRigged, + objectp, -1, mPickTransparent, mPickRigged, mPickUnselectable, &mObjectFace, &intersection, &mSTCoords, -- cgit v1.2.3 From 03d85bfb33f53e658256d8bedcf0b4262226cf90 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 9 Jun 2022 19:43:21 -0500 Subject: SL-17573 Add "dynamic" checkbox, also followup on SL-17551 and do "Select Invisible Objects" checkbox instead of "Select Reflection Probes" --- indra/newview/llviewerwindow.cpp | 46 ++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 9 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6613c8ac01..1230a6d327 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4196,10 +4196,15 @@ void LLViewerWindow::pickAsync( S32 x, BOOL pick_unselectable) { // "Show Debug Alpha" means no object actually transparent + BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); if (LLDrawPoolAlpha::sShowDebugAlpha) { pick_transparent = TRUE; } + else if (in_build_mode && !gSavedSettings.getBOOL("SelectInvisibleObjects")) + { + pick_transparent = FALSE; + } LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, callback); schedulePick(pick_info); @@ -4260,7 +4265,7 @@ void LLViewerWindow::returnEmptyPicks() LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle, BOOL pick_unselectable) { BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); - if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) + if ((in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects")) || LLDrawPoolAlpha::sShowDebugAlpha) { // build mode allows interaction with all transparent objects // "Show Debug Alpha" means no object actually transparent @@ -5267,7 +5272,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ void display_cube_face(); -BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face, F32 near_clip) +BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face, F32 near_clip, bool dynamic_render) { // NOTE: implementation derived from LLFloater360Capture::capture360Images() and simpleSnapshot LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; @@ -5300,16 +5305,33 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + U32 dynamic_render_types[] = { + LLPipeline::RENDER_TYPE_AVATAR, + LLPipeline::RENDER_TYPE_CONTROL_AV, + LLPipeline::RENDER_TYPE_PARTICLES + }; + constexpr U32 dynamic_render_type_count = sizeof(dynamic_render_types) / sizeof(U32); + bool prev_dynamic_render_type[dynamic_render_type_count]; + + + if (!dynamic_render) + { + for (int i = 0; i < dynamic_render_type_count; ++i) + { + prev_dynamic_render_type[i] = gPipeline.hasRenderType(dynamic_render_types[i]); + if (prev_dynamic_render_type[i]) + { + gPipeline.toggleRenderType(dynamic_render_types[i]); + } + } + } + BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE; if (prev_draw_ui != false) { LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } - BOOL prev_draw_particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES); - if (prev_draw_particles) - { - gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES); - } + LLPipeline::sShowHUDAttachments = FALSE; LLRect window_rect = getWorldViewRectRaw(); @@ -5365,9 +5387,15 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea } } - if (prev_draw_particles) + if (!dynamic_render) { - gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES); + for (int i = 0; i < dynamic_render_type_count; ++i) + { + if (prev_dynamic_render_type[i]) + { + gPipeline.toggleRenderType(dynamic_render_types[i]); + } + } } LLPipeline::sShowHUDAttachments = TRUE; -- cgit v1.2.3 From 963566821d95d30856cd028983d929fab89f542a Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 8 Aug 2022 14:55:15 -0500 Subject: SL-17927 Keep people from shooting themselves in the foot by twiddling deprecated settings. --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e102c917ee..48ad02321b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1912,7 +1912,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) gSavedSettings.getBOOL("RenderVSyncEnable"), !gHeadlessClient, p.ignore_pixel_depth, - gSavedSettings.getBOOL("RenderDeferred") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled + 0); //don't use window level anti-aliasing if (NULL == mWindow) { -- cgit v1.2.3 From 0d217dc73c6530dcbceb306c4609e2d72da6d70b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 20 Aug 2022 01:04:42 +0300 Subject: SL-17653 Local gltf materials #2 --- indra/newview/llviewerwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 48ad02321b..aa8d58cc8a 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4667,8 +4667,8 @@ void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picke else pick_type = LLFilePicker::FFSAVE_ALL; - (new LLFilePickerReplyThread(boost::bind(&LLViewerWindow::onDirectorySelected, this, _1, formatted_image, success_cb, failure_cb), pick_type, proposed_name, - boost::bind(&LLViewerWindow::onSelectionFailure, this, failure_cb)))->getFile(); + LLFilePickerReplyThread::startPicker(boost::bind(&LLViewerWindow::onDirectorySelected, this, _1, formatted_image, success_cb, failure_cb), pick_type, proposed_name, + boost::bind(&LLViewerWindow::onSelectionFailure, this, failure_cb)); } else { -- cgit v1.2.3 From 8dc59e5ef37836b15d478fb0d04e3043a9f986de Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 16 Sep 2022 16:25:26 -0500 Subject: SL-18128 Clear out much OpenGL cruft and switch to core profile on AMD --- indra/newview/llviewerwindow.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e9815a7872..5474098d16 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -597,29 +597,6 @@ public: { LLTrace::Recording& last_frame_recording = LLTrace::get_frame_recording().getLastRecording(); - if (gGLManager.mHasATIMemInfo) - { - S32 meminfo[4]; - glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, meminfo); - - addText(xpos, ypos, llformat("%.2f MB Texture Memory Free", meminfo[0]/1024.f)); - ypos += y_inc; - - if (gGLManager.mHasVertexBufferObject) - { - glGetIntegerv(GL_VBO_FREE_MEMORY_ATI, meminfo); - addText(xpos, ypos, llformat("%.2f MB VBO Memory Free", meminfo[0]/1024.f)); - ypos += y_inc; - } - } - else if (gGLManager.mHasNVXMemInfo) - { - S32 free_memory; - glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &free_memory); - addText(xpos, ypos, llformat("%.2f MB Video Memory Free", free_memory/1024.f)); - ypos += y_inc; - } - //show streaming cost/triangle count of known prims in current region OR selection { F32 cost = 0.f; @@ -1979,11 +1956,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) LL_DEBUGS("Window") << "Loading feature tables." << LL_ENDL; // Initialize OpenGL Renderer - if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") || - !gGLManager.mHasVertexBufferObject) - { - gSavedSettings.setBOOL("RenderVBOEnable", FALSE); - } LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"), gSavedSettings.getBOOL("RenderVBOMappingDisable")); LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ; gGL.init() ; @@ -1997,11 +1969,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) gSavedSettings.setBOOL("ProbeHardwareOnStartup", FALSE); } - if (!gGLManager.mHasDepthClamp) - { - LL_INFOS("RenderInit") << "Missing feature GL_ARB_depth_clamp. Void water might disappear in rare cases." << LL_ENDL; - } - // If we crashed while initializng GL stuff last time, disable certain features if (gSavedSettings.getBOOL("RenderInitError")) { -- cgit v1.2.3 From 9448db5d4af7bba094e5bc51f85e5c2491d3f5a1 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 6 Oct 2022 18:40:01 -0500 Subject: SL-18190 Water shader WIP. Better parallax correction for sphere probes. Reduce probe memory footprint. Remove framebuffer copies and move to deprecate stencil buffer usage. --- indra/newview/llviewerwindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b2728b294e..8ef65b665d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4845,7 +4845,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei // PRE SNAPSHOT gDisplaySwapBuffers = FALSE; - glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT); setCursor(UI_CURSOR_WAIT); // Hide all the UI widgets first and draw a frame @@ -5144,7 +5144,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; gDisplaySwapBuffers = FALSE; - glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT); setCursor(UI_CURSOR_WAIT); BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE; @@ -5248,10 +5248,10 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea llassert(LLPipeline::sRenderDeferred); llassert(!gCubeSnapshot); //assert a snapshot isn't already in progress - U32 res = LLRenderTarget::sCurResX; + U32 res = gPipeline.mRT->deferredScreen.getWidth(); - llassert(res <= gPipeline.mRT->deferredScreen.getWidth()); - llassert(res <= gPipeline.mRT->deferredScreen.getHeight()); + //llassert(res <= gPipeline.mRT->deferredScreen.getWidth()); + //llassert(res <= gPipeline.mRT->deferredScreen.getHeight()); // save current view/camera settings so we can restore them afterwards S32 old_occlusion = LLPipeline::sUseOcclusion; @@ -5271,7 +5271,7 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea camera->setOrigin(origin); camera->setNear(near_clip); - glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT); U32 dynamic_render_types[] = { LLPipeline::RENDER_TYPE_AVATAR, -- cgit v1.2.3 From 598c953d540090caa8a9a12581a4ab8ae52615dd Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 12 Oct 2022 18:49:18 -0500 Subject: SL-18190 Fix for assert on 360 snapshot and ? fix for mac build ? --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8ef65b665d..5c5a5ba0d1 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5162,7 +5162,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ LLRenderTarget scratch_space; U32 color_fmt = GL_RGBA; const bool use_depth_buffer = true; - const bool use_stencil_buffer = true; + const bool use_stencil_buffer = false; if (scratch_space.allocate(image_width, image_height, color_fmt, use_depth_buffer, use_stencil_buffer)) { if (gPipeline.allocateScreenBuffer(image_width, image_height)) -- cgit v1.2.3 From b5db671f7c28eb2a9f9974df1c34cf8c025fb8cc Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 29 Nov 2022 09:15:02 -0600 Subject: SL-18682 WIP -- Add debug settings that aid in emulating low end hardware. --- indra/newview/llviewerwindow.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 88058d1137..5bbb18ed30 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1878,6 +1878,11 @@ LLViewerWindow::LLViewerWindow(const Params& p) U32 fsaa_samples) */ // create window + + U32 max_core_count = gSavedSettings.getU32("EmulateCoreCount"); + U32 max_vram = gSavedSettings.getU32("RenderMaxVRAMBudget"); + F32 max_gl_version = gSavedSettings.getF32("RenderMaxOpenGLVersion"); + mWindow = LLWindowManager::createWindow(this, p.title, p.name, p.x, p.y, p.width, p.height, 0, p.fullscreen, @@ -1885,7 +1890,10 @@ LLViewerWindow::LLViewerWindow(const Params& p) gSavedSettings.getBOOL("RenderVSyncEnable"), !gHeadlessClient, p.ignore_pixel_depth, - 0); //don't use window level anti-aliasing + 0, + max_core_count, + max_vram, + max_gl_version); //don't use window level anti-aliasing if (NULL == mWindow) { -- cgit v1.2.3 From 9add99b31aabf00af78cb4b999c3cbbff1a36847 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 6 Jan 2023 19:04:49 +0200 Subject: SL-18879 Fixed: Very transparent faces can no longer be selected --- indra/newview/llviewerwindow.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index aecfd40b25..bc4f00bd3f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4188,14 +4188,11 @@ void LLViewerWindow::pickAsync( S32 x, { // "Show Debug Alpha" means no object actually transparent BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); - if (LLDrawPoolAlpha::sShowDebugAlpha) + if (LLDrawPoolAlpha::sShowDebugAlpha + || (in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects"))) { pick_transparent = TRUE; } - else if (in_build_mode && !gSavedSettings.getBOOL("SelectInvisibleObjects")) - { - pick_transparent = FALSE; - } LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, callback); schedulePick(pick_info); -- cgit v1.2.3 From fdc0ea64f050ad09a84442f40396bb9e6497ce52 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 10 Jan 2023 17:36:05 -0600 Subject: SL-18869 Optimizations -- LLVertexBuffer overhaul and shuffle of shadow map rendering to a place where the main camera has taken a stab at object updates for this frame before shadow map rendering has at them. --- indra/newview/llviewerwindow.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index bc4f00bd3f..5848cbfd9d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -658,12 +658,6 @@ public: } - addText(xpos, ypos, llformat("%d MB Index Data (%d MB Pooled, %d KIndices)", LLVertexBuffer::sAllocatedIndexBytes/(1024*1024), LLVBOPool::sIndexBytesPooled/(1024*1024), LLVertexBuffer::sIndexCount/1024)); - ypos += y_inc; - - addText(xpos, ypos, llformat("%d MB Vertex Data (%d MB Pooled, %d KVerts)", LLVertexBuffer::sAllocatedBytes/(1024*1024), LLVBOPool::sBytesPooled/(1024*1024), LLVertexBuffer::sVertexCount/1024)); - ypos += y_inc; - addText(xpos, ypos, llformat("%d Vertex Buffers", LLVertexBuffer::sGLCount)); ypos += y_inc; @@ -1974,7 +1968,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) LL_DEBUGS("Window") << "Loading feature tables." << LL_ENDL; // Initialize OpenGL Renderer - LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"), gSavedSettings.getBOOL("RenderVBOMappingDisable")); + LLVertexBuffer::initClass(mWindow); LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ; gGL.init(true); -- cgit v1.2.3 From 7bd9d21e19b923096ba2b5ea3cbc8be3e13d7aa0 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 19 Jan 2023 09:13:45 -0600 Subject: Optimizations, decruft, and intel compatibility pass (#53) SL-18869, SL-18772 Overhaul VBO management, restore occlusion culling, intel compatibility pass, etc --- indra/newview/llviewerwindow.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5848cbfd9d..bccb2a5e77 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -658,18 +658,6 @@ public: } - addText(xpos, ypos, llformat("%d Vertex Buffers", LLVertexBuffer::sGLCount)); - ypos += y_inc; - - addText(xpos, ypos, llformat("%d Mapped Buffers", LLVertexBuffer::sMappedCount)); - ypos += y_inc; - - addText(xpos, ypos, llformat("%d Vertex Buffer Binds", LLVertexBuffer::sBindCount)); - ypos += y_inc; - - addText(xpos, ypos, llformat("%d Vertex Buffer Sets", LLVertexBuffer::sSetCount)); - ypos += y_inc; - addText(xpos, ypos, llformat("%d Texture Binds", LLImageGL::sBindCount)); ypos += y_inc; @@ -744,9 +732,7 @@ public: ypos += y_inc; } - LLVertexBuffer::sBindCount = LLImageGL::sBindCount = - LLVertexBuffer::sSetCount = LLImageGL::sUniqueCount = - gPipeline.mNumVisibleNodes = LLPipeline::sVisibleLightCount = 0; + gPipeline.mNumVisibleNodes = LLPipeline::sVisibleLightCount = 0; } if (gSavedSettings.getBOOL("DebugShowAvatarRenderInfo")) { @@ -2641,10 +2627,10 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) void LLViewerWindow::drawDebugText() { + gUIProgram.bind(); gGL.color4f(1,1,1,1); gGL.pushMatrix(); gGL.pushUIMatrix(); - gUIProgram.bind(); { // scale view by UI global scale factor and aspect ratio correction factor gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f); @@ -2701,6 +2687,7 @@ void LLViewerWindow::draw() // No translation needed, this view is glued to 0,0 gUIProgram.bind(); + gGL.color4f(1, 1, 1, 1); gGL.pushMatrix(); LLUI::pushMatrix(); @@ -5688,7 +5675,6 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) gSky.restoreGL(); gPipeline.restoreGL(); - LLDrawPoolWater::restoreGL(); LLManipTranslate::restoreGL(); gBumpImageList.restoreGL(); -- cgit v1.2.3 From 3ef31cb9b28f7b026e109eab69d383dddc922850 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Fri, 27 Jan 2023 17:24:22 -0600 Subject: SL-19203 et al -- Integrate SSR with reflection probes, tweak probe blending. (#63) * SL-19203 WIP -- Integrate SSR with reflection probes. Decruft LLRenderTarget. * SL-19203 WIP -- Re-integrate SSR. Incidental decruft. * SL-19203 WIP -- SSR frame delta correction (still broken for Z) * SL-19203 WIP -- SSR frame delta Z fix * SL-19203 WIP -- Make SSR toggleable again and disable SSR in cube snapshots. * SL-19203 WIP -- Soften sphere probe transitions and fix reflections on void water (make fallback probe a simple terrain+water+sky probe). Remove parallax correction for automatic probes to reduce artifacts. * SL-19203 Tune probe blending. * SL-19203 Cleanup. --- indra/newview/llviewerwindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index bccb2a5e77..20b5f7f394 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4898,7 +4898,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei (image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui) { U32 color_fmt = type == LLSnapshotModel::SNAPSHOT_TYPE_DEPTH ? GL_DEPTH_COMPONENT : GL_RGBA; - if (scratch_space.allocate(image_width, image_height, color_fmt, true, true)) + if (scratch_space.allocate(image_width, image_height, color_fmt, true)) { original_width = gPipeline.mRT->deferredScreen.getWidth(); original_height = gPipeline.mRT->deferredScreen.getHeight(); @@ -5162,9 +5162,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ LLRenderTarget scratch_space; U32 color_fmt = GL_RGBA; - const bool use_depth_buffer = true; - const bool use_stencil_buffer = false; - if (scratch_space.allocate(image_width, image_height, color_fmt, use_depth_buffer, use_stencil_buffer)) + if (scratch_space.allocate(image_width, image_height, color_fmt, true)) { if (gPipeline.allocateScreenBuffer(image_width, image_height)) { -- cgit v1.2.3 From 5a047bf3df34b6e1067df67bb19d8f9c2f846017 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 6 Mar 2023 10:14:18 -0500 Subject: Fix hiding huds (#108) --- indra/newview/llviewerwindow.cpp | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5c1467f28f..ad9e3da379 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5206,7 +5206,12 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } - LLPipeline::sShowHUDAttachments = FALSE; + BOOL hide_hud = LLPipeline::sShowHUDAttachments; + if (hide_hud) + { + LLPipeline::sShowHUDAttachments = FALSE; + } + LLRect window_rect = getWorldViewRectRaw(); S32 original_width = LLPipeline::sRenderDeferred ? gPipeline.mRT->deferredScreen.getWidth() : gViewerWindow->getWorldViewWidthRaw(); @@ -5276,7 +5281,10 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ } } - LLPipeline::sShowHUDAttachments = TRUE; + if (hide_hud) + { + LLPipeline::sShowHUDAttachments = TRUE; + } setCursor(UI_CURSOR_ARROW); @@ -5351,7 +5359,11 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } - LLPipeline::sShowHUDAttachments = FALSE; + BOOL hide_hud = LLPipeline::sShowHUDAttachments; + if (hide_hud) + { + LLPipeline::sShowHUDAttachments = FALSE; + } LLRect window_rect = getWorldViewRectRaw(); mWorldViewRectRaw.set(0, res, res, 0); @@ -5417,7 +5429,10 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea } } - LLPipeline::sShowHUDAttachments = TRUE; + if (hide_hud) + { + LLPipeline::sShowHUDAttachments = TRUE; + } gPipeline.resetDrawOrders(); mWorldViewRectRaw = window_rect; -- cgit v1.2.3 From d6d634d29ff351450306e211982a98a0050f1b42 Mon Sep 17 00:00:00 2001 From: cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> Date: Wed, 5 Apr 2023 09:55:33 -0700 Subject: SL-19331: Move media updates off-thread on select hardware (#153) * SL-19331: Have media updates on the LLImageGL thread even when texture updates are on the main thread. Add config. Off-thread media updates seem work best performance-wise when using glTexImage2D, not sub_image_lines. Otherwise, there are lots of main thread stalls. * SL-19331: Bump featuretable * SL-19331: Cleanup, annotate comment --- indra/newview/llviewerwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ad9e3da379..3fee3766a9 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1975,8 +1975,8 @@ LLViewerWindow::LLViewerWindow(const Params& p) } // Init the image list. Must happen after GL is initialized and before the images that - // LLViewerWindow needs are requested. - LLImageGL::initClass(mWindow, LLViewerTexture::MAX_GL_IMAGE_CATEGORY, false, gSavedSettings.getBOOL("RenderGLMultiThreaded")); + // LLViewerWindow needs are requested, as well as before LLViewerMedia starts updating images. + LLImageGL::initClass(mWindow, LLViewerTexture::MAX_GL_IMAGE_CATEGORY, false, gSavedSettings.getBOOL("RenderGLMultiThreadedTextures"), gSavedSettings.getBOOL("RenderGLMultiThreadedMedia")); gTextureList.init(); LLViewerTextureManager::init() ; gBumpImageList.init(); -- cgit v1.2.3 From a16cd7f91c45d351f26317a719a772a79329f2d4 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Mon, 22 May 2023 09:38:32 -0500 Subject: SL-19405 Fix for rotation gizmo not freely rotating --- indra/newview/llviewerwindow.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2fadaab43f..2aaaecfb38 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5442,6 +5442,7 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea *camera = saved_camera; set_current_modelview(saved_mod); set_current_projection(saved_proj); + setup3DViewport(); LLPipeline::sUseOcclusion = old_occlusion; // ==================================================== -- cgit v1.2.3 From 30311e5229bff107c2722de68aabb656d9b8f097 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 25 May 2023 16:16:20 -0500 Subject: SL-19713 Fix for broken avatar preview render in animation upload. Incidental decruft and camera FoV network spam reduction. --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2aaaecfb38..8516bbc7ec 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5326,7 +5326,7 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea // camera constants for the square, cube map capture image camera->setAspect(1.0); // must set aspect ratio first to avoid undesirable clamping of vertical FoV - camera->setView(F_PI_BY_TWO); + camera->setViewNoBroadcast(F_PI_BY_TWO); camera->yaw(0.0); camera->setOrigin(origin); camera->setNear(near_clip); -- cgit v1.2.3 From b67172aa12be4a37c83042437844747ff0e02e34 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Fri, 21 Jul 2023 15:46:12 -0500 Subject: SL-20010 Make reflection probes ignore touch actions. --- indra/newview/llviewerwindow.cpp | 68 +++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 32 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index c6ed6ffb7d..71fe893091 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3344,7 +3344,7 @@ void LLViewerWindow::updateUI() if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST)) { gDebugRaycastFaceHit = -1; - gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, + gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, FALSE, &gDebugRaycastFaceHit, &gDebugRaycastIntersection, &gDebugRaycastTexCoord, @@ -4229,7 +4229,7 @@ void LLViewerWindow::pickAsync( S32 x, pick_transparent = TRUE; } - LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, callback); + LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, TRUE, callback); schedulePick(pick_info); } @@ -4285,7 +4285,7 @@ void LLViewerWindow::returnEmptyPicks() } // Performs the GL object/land pick. -LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle, BOOL pick_unselectable) +LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle, BOOL pick_unselectable, BOOL pick_reflection_probe) { BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); if ((in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects")) || LLDrawPoolAlpha::sShowDebugAlpha) @@ -4297,7 +4297,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transp // shortcut queueing in mPicks and just update mLastPick in place MASK key_mask = gKeyboard->currentMask(TRUE); - mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, TRUE, FALSE, NULL); + mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, pick_reflection_probe, TRUE, FALSE, NULL); mLastPick.fetchResults(); return mLastPick; @@ -4335,6 +4335,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, + BOOL pick_reflection_probe, S32* face_hit, LLVector4a *intersection, LLVector2 *uv, @@ -4413,7 +4414,8 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de } else // is a world object { - if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, pick_rigged, pick_unselectable, + if ((pick_reflection_probe || !this_object->isReflectionProbe()) + && this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, pick_rigged, pick_unselectable, face_hit, intersection, uv, normal, tangent)) { found = this_object; @@ -4427,7 +4429,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de if (!found) // if not found in HUD, look in world: { - found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged, pick_unselectable, + found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged, pick_unselectable, pick_reflection_probe, face_hit, intersection, uv, normal, tangent); if (found && !pick_transparent) { @@ -6085,30 +6087,32 @@ LLPickInfo::LLPickInfo() { } -LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, - MASK keyboard_mask, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_particle, - BOOL pick_uv_coords, - BOOL pick_unselectable, - void (*pick_callback)(const LLPickInfo& pick_info)) - : mMousePt(mouse_pos), - mKeyMask(keyboard_mask), - mPickCallback(pick_callback), - mPickType(PICK_INVALID), - mWantSurfaceInfo(pick_uv_coords), - mObjectFace(-1), - mUVCoords(-1.f, -1.f), - mSTCoords(-1.f, -1.f), - mXYCoords(-1, -1), - mNormal(), - mTangent(), - mBinormal(), - mHUDIcon(NULL), - mPickTransparent(pick_transparent), - mPickRigged(pick_rigged), - mPickParticle(pick_particle), +LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, + MASK keyboard_mask, + BOOL pick_transparent, + BOOL pick_rigged, + BOOL pick_particle, + BOOL pick_reflection_probe, + BOOL pick_uv_coords, + BOOL pick_unselectable, + void (*pick_callback)(const LLPickInfo& pick_info)) + : mMousePt(mouse_pos), + mKeyMask(keyboard_mask), + mPickCallback(pick_callback), + mPickType(PICK_INVALID), + mWantSurfaceInfo(pick_uv_coords), + mObjectFace(-1), + mUVCoords(-1.f, -1.f), + mSTCoords(-1.f, -1.f), + mXYCoords(-1, -1), + mNormal(), + mTangent(), + mBinormal(), + mHUDIcon(NULL), + mPickTransparent(pick_transparent), + mPickRigged(pick_rigged), + mPickParticle(pick_particle), + mPickReflectionProbe(pick_reflection_probe), mPickUnselectable(pick_unselectable) { } @@ -6139,7 +6143,7 @@ void LLPickInfo::fetchResults() } LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f, - NULL, -1, mPickTransparent, mPickRigged, mPickUnselectable, &face_hit, + NULL, -1, mPickTransparent, mPickRigged, mPickUnselectable, mPickReflectionProbe, &face_hit, &intersection, &uv, &normal, &tangent, &start, &end); mPickPt = mMousePt; @@ -6284,7 +6288,7 @@ void LLPickInfo::getSurfaceInfo() if (objectp) { if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f, - objectp, -1, mPickTransparent, mPickRigged, mPickUnselectable, + objectp, -1, mPickTransparent, mPickRigged, mPickUnselectable, mPickReflectionProbe, &mObjectFace, &intersection, &mSTCoords, -- cgit v1.2.3 From ec1d1f43540bac02e6cd2e814ee14da0cd33a67c Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Fri, 28 Jul 2023 19:15:28 -0500 Subject: SL-20094 Add "Select Reflection Probes" checkbox --- indra/newview/llviewerwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 71fe893091..ba2b6e1c7c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4219,7 +4219,8 @@ void LLViewerWindow::pickAsync( S32 x, void (*callback)(const LLPickInfo& info), BOOL pick_transparent, BOOL pick_rigged, - BOOL pick_unselectable) + BOOL pick_unselectable, + BOOL pick_reflection_probes) { // "Show Debug Alpha" means no object actually transparent BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); @@ -4229,7 +4230,7 @@ void LLViewerWindow::pickAsync( S32 x, pick_transparent = TRUE; } - LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, TRUE, callback); + LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, pick_reflection_probes, pick_unselectable, TRUE, callback); schedulePick(pick_info); } -- cgit v1.2.3 From 70eda83fb08c5c4e8b0ea95868243d744c6e88e9 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 20 Nov 2023 21:25:06 +0100 Subject: SL-20563 Add 'No Post' option to Snapshot floater --- indra/newview/llviewerwindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ba2b6e1c7c..ed671fe849 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -229,6 +229,7 @@ extern BOOL gDisplaySwapBuffers; extern BOOL gDepthDirty; extern BOOL gResizeScreenTexture; extern BOOL gCubeSnapshot; +extern BOOL gSnapshotNoPost; LLViewerWindow *gViewerWindow = NULL; @@ -4875,16 +4876,16 @@ void LLViewerWindow::resetSnapshotLoc() const gSavedPerAccountSettings.setString("SnapshotBaseDir", std::string()); } -BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type) +BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, BOOL no_post, LLSnapshotModel::ESnapshotLayerType type) { - return rawSnapshot(raw, preview_width, preview_height, FALSE, FALSE, show_ui, show_hud, do_rebuild, type); + return rawSnapshot(raw, preview_width, preview_height, FALSE, FALSE, show_ui, show_hud, do_rebuild, no_post, type); } // Saves the image from the screen to a raw image // Since the required size might be bigger than the available screen, this method rerenders the scene in parts (called subimages) and copy // the results over to the final raw image. BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, - BOOL keep_window_aspect, BOOL is_texture, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type, S32 max_size) + BOOL keep_window_aspect, BOOL is_texture, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, BOOL no_post, LLSnapshotModel::ESnapshotLayerType type, S32 max_size) { if (!raw) { @@ -4901,6 +4902,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei } // PRE SNAPSHOT + gSnapshotNoPost = no_post; gDisplaySwapBuffers = FALSE; glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT); @@ -5131,6 +5133,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei } gDisplaySwapBuffers = FALSE; + gSnapshotNoPost = FALSE; gDepthDirty = TRUE; // POST SNAPSHOT -- cgit v1.2.3