From 4d956afb178cc3e7d81066250a0628b5801824bc Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Wed, 9 Mar 2022 10:11:40 -0800 Subject: Fix DRTVWR-550 TeamCity build. codesigning retry block had some leftover python2 syntax --- indra/newview/viewer_manifest.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index ae3ed56b3d..1809b707ef 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1313,9 +1313,8 @@ class DarwinManifest(ViewerManifest): ] for attempt in range(3): if attempt: # second or subsequent iteration - print >> sys.stderr, \ - ("codesign failed, waiting %d seconds before retrying" % - sign_retry_wait) + print("codesign failed, waiting {:d} seconds before retrying".format(sign_retry_wait), + file=sys.stderr) time.sleep(sign_retry_wait) sign_retry_wait*=2 -- cgit v1.2.3 From 2cbc3e530f3a34aaf75e0b4d6f4a16aeadeb90d8 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Wed, 9 Mar 2022 16:47:35 -0800 Subject: More DRTVWR-550 Teamcity build fix. another piece of python2 syntax leftover in an error handling block --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1809b707ef..c9aa82f7d4 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1344,7 +1344,7 @@ class DarwinManifest(ViewerManifest): # 'err' goes out of scope sign_failed = err else: - print >> sys.stderr, "Maximum codesign attempts exceeded; giving up" + print("Maximum codesign attempts exceeded; giving up", file=sys.stderr) raise sign_failed self.run_command(['spctl', '-a', '-texec', '-vvvv', app_in_dmg]) self.run_command([self.src_path_of("installers/darwin/apple-notarize.sh"), app_in_dmg]) -- cgit v1.2.3 From 8843ea1745cb09ec16acb1b1f0ca9125fd49d16c Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Mon, 28 Mar 2022 13:15:19 -0600 Subject: SL-17000 improve error message for physics mesh import --- indra/newview/skins/default/xui/en/floater_model_preview.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index ca3e40465c..1bfa459310 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -34,7 +34,7 @@ Missing required level of detail. LOD materials are not a subset of reference model. Some physical hulls exceed vertex limitations. - The physics mesh too dense remove the small thin triangles (see preview) + The physics mesh contains degenerate triangles. Use Analyze/Simplify to resolve. All Analyzing... Simplifying... -- cgit v1.2.3 From 283e86eda5d3fc412b95d8e518e13a9ecf3e3d33 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 28 Mar 2022 18:11:36 +0300 Subject: SL-16811 Shape preview images do not display all of the attachments #2 Merged previewAvatar and generateImpostor into a single function since they are nearly identical --- indra/newview/lltoolmorph.cpp | 10 ++- indra/newview/pipeline.cpp | 203 +++++++----------------------------------- indra/newview/pipeline.h | 3 +- 3 files changed, 41 insertions(+), 175 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index b5eb2880ae..d99c0ba2a6 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -239,7 +239,15 @@ BOOL LLVisualParamHint::render() LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE); - gPipeline.previewAvatar(gAgentAvatarp); + if (gAgentAvatarp->mDrawable.notNull()) + { + LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE); + gGL.flush(); + gGL.setSceneBlendType(LLRender::BT_REPLACE); + gPipeline.generateImpostor(gAgentAvatarp, true); + gGL.setSceneBlendType(LLRender::BT_ALPHA); + gGL.flush(); + } gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight); mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 34c4e2ddb9..ccf5b69ea0 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -10818,7 +10818,7 @@ void LLPipeline::renderRiggedGroups(LLRenderPass* pass, U32 type, U32 mask, bool static LLTrace::BlockTimerStatHandle FTM_GENERATE_IMPOSTOR("Generate Impostor"); -void LLPipeline::generateImpostor(LLVOAvatar* avatar) +void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar) { LL_RECORD_BLOCK_TIME(FTM_GENERATE_IMPOSTOR); LLGLState::checkStates(); @@ -10837,11 +10837,12 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) assertInitialized(); - bool visually_muted = avatar->isVisuallyMuted(); + // previews can't be muted or impostered + bool visually_muted = !preview_avatar && avatar->isVisuallyMuted(); LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is " << ( visually_muted ? "" : "not ") << "visually muted" << LL_ENDL; - bool too_complex = avatar->isTooComplex(); + bool too_complex = !preview_avatar && avatar->isTooComplex(); LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is " << ( too_complex ? "" : "not ") << "too complex" << LL_ENDL; @@ -10915,6 +10916,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) U32 resY = 0; U32 resX = 0; + if (!preview_avatar) { const LLVector4a* ext = avatar->mDrawable->getSpatialExtents(); LLVector3 pos(avatar->getRenderPosition()+avatar->getImpostorOffset()); @@ -11001,7 +11003,20 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLDrawPoolAvatar::sMinimumAlpha = 0.f; } - if (LLPipeline::sRenderDeferred) + if (preview_avatar) + { + // previews don't care about imposters + if (LLPipeline::sRenderDeferred) + { + renderGeomDeferred(camera); + renderGeomPostDeferred(camera); + } + else + { + renderGeom(camera); + } + } + else if (LLPipeline::sRenderDeferred) { avatar->mImpostor.clear(); renderGeomDeferred(camera); @@ -11089,7 +11104,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " MUTED set solid color " << muted_color << LL_ENDL; gGL.diffuseColor4fv( muted_color.mV ); } - else + else if (!preview_avatar) { //grey muted avatar LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " MUTED set grey" << LL_ENDL; gGL.diffuseColor4fv(LLColor4::pink.mV ); @@ -11110,9 +11125,11 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) gGL.popMatrix(); } - avatar->mImpostor.flush(); - - avatar->setImpostorDim(tdim); + if (!preview_avatar) + { + avatar->mImpostor.flush(); + avatar->setImpostorDim(tdim); + } sUseOcclusion = occlusion; sReflectionRender = false; @@ -11125,176 +11142,18 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.popMatrix(); - avatar->mNeedsImpostorUpdate = FALSE; - avatar->cacheImpostorValues(); - avatar->mLastImpostorUpdateFrameTime = gFrameTimeSeconds; + if (!preview_avatar) + { + avatar->mNeedsImpostorUpdate = FALSE; + avatar->cacheImpostorValues(); + avatar->mLastImpostorUpdateFrameTime = gFrameTimeSeconds; + } LLVertexBuffer::unbind(); LLGLState::checkStates(); LLGLState::checkTextureChannels(); } -static LLTrace::BlockTimerStatHandle FTM_PREVIEW_AVATAR("Preview Avatar"); - -void LLPipeline::previewAvatar(LLVOAvatar* avatar) -{ - LL_RECORD_BLOCK_TIME(FTM_PREVIEW_AVATAR); - - LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE); - gGL.flush(); - gGL.setSceneBlendType(LLRender::BT_REPLACE); - - LLGLState::checkStates(); - LLGLState::checkTextureChannels(); - - static LLCullResult result; - result.clear(); - grabReferences(result); - - if (!avatar || !avatar->mDrawable) - { - LL_WARNS_ONCE("AvatarRenderPipeline") << "Avatar is " << (avatar ? "not drawable" : "null") << LL_ENDL; - return; - } - LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is drawable" << LL_ENDL; - - assertInitialized(); - - pushRenderTypeMask(); - - { - //hide world geometry - clearRenderTypeMask( - RENDER_TYPE_SKY, - RENDER_TYPE_WL_SKY, - RENDER_TYPE_GROUND, - RENDER_TYPE_TERRAIN, - RENDER_TYPE_GRASS, - RENDER_TYPE_CONTROL_AV, // Animesh - RENDER_TYPE_TREE, - RENDER_TYPE_VOIDWATER, - RENDER_TYPE_WATER, - RENDER_TYPE_PASS_GRASS, - RENDER_TYPE_HUD, - RENDER_TYPE_PARTICLES, - RENDER_TYPE_CLOUDS, - RENDER_TYPE_HUD_PARTICLES, - END_RENDER_TYPES - ); - } - - S32 occlusion = sUseOcclusion; - sUseOcclusion = 0; - - sReflectionRender = !sRenderDeferred; - - sShadowRender = true; - sImpostorRender = true; // Likely not needed for previews - - LLViewerCamera* viewer_camera = LLViewerCamera::getInstance(); - - { - markVisible(avatar->mDrawable, *viewer_camera); - - LLVOAvatar::attachment_map_t::iterator iter; - for (iter = avatar->mAttachmentPoints.begin(); - iter != avatar->mAttachmentPoints.end(); - ++iter) - { - LLViewerJointAttachment *attachment = iter->second; - for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); - attachment_iter != attachment->mAttachedObjects.end(); - ++attachment_iter) - { - if (LLViewerObject* attached_object = attachment_iter->get()) - { - markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera); - } - } - } - } - - stateSort(*LLViewerCamera::getInstance(), result); - - LLCamera camera = *viewer_camera; - - F32 old_alpha = LLDrawPoolAvatar::sMinimumAlpha; - - if (LLPipeline::sRenderDeferred) - { - renderGeomDeferred(camera); - - renderGeomPostDeferred(camera); - } - else - { - renderGeom(camera); - } - - LLDrawPoolAvatar::sMinimumAlpha = old_alpha; - - { //create alpha mask based on depth buffer - if (LLPipeline::sRenderDeferred) - { - GLuint buff = GL_COLOR_ATTACHMENT0; - LL_PROFILER_GPU_ZONEC("gl.DrawBuffersARB", 0x8000FF); - glDrawBuffersARB(1, &buff); - } - - LLGLDisable blend(GL_BLEND); - - gGL.setColorMask(false, true); - - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - - LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER); - - gGL.flush(); - - gGL.pushMatrix(); - gGL.loadIdentity(); - gGL.matrixMode(LLRender::MM_PROJECTION); - gGL.pushMatrix(); - gGL.loadIdentity(); - - static const F32 clip_plane = 0.99999f; - - gDebugProgram.bind(); - - gGL.begin(LLRender::QUADS); - gGL.vertex3f(-1, -1, clip_plane); - gGL.vertex3f(1, -1, clip_plane); - gGL.vertex3f(1, 1, clip_plane); - gGL.vertex3f(-1, 1, clip_plane); - gGL.end(); - gGL.flush(); - - gDebugProgram.unbind(); - - gGL.popMatrix(); - gGL.matrixMode(LLRender::MM_MODELVIEW); - gGL.popMatrix(); - } - - sUseOcclusion = occlusion; - sReflectionRender = false; - sImpostorRender = false; - sShadowRender = false; - popRenderTypeMask(); - - gGL.matrixMode(LLRender::MM_PROJECTION); - gGL.popMatrix(); - gGL.matrixMode(LLRender::MM_MODELVIEW); - gGL.popMatrix(); - - LLVertexBuffer::unbind(); - LLGLState::checkStates(); - LLGLState::checkTextureChannels(); - - gGL.setSceneBlendType(LLRender::BT_ALPHA); - gGL.flush(); -} - bool LLPipeline::hasRenderBatches(const U32 type) const { return sCull->getRenderMapSize(type) > 0; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index df5c060417..62d3ae7a39 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -134,8 +134,7 @@ public: void allocatePhysicsBuffer(); void resetVertexBuffers(LLDrawable* drawable); - void generateImpostor(LLVOAvatar* avatar); - void previewAvatar(LLVOAvatar* avatar); + void generateImpostor(LLVOAvatar* avatar, bool preview_avatar = false); void bindScreenToTexture(); void renderFinalize(); -- cgit v1.2.3 From e76a3b12e6fd463856074632fbd1e7e5d3267f2d Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Tue, 29 Mar 2022 11:36:28 -0600 Subject: SL-17074 fix ALT-F4 handling without impacting alt-zoom --- indra/llwindow/llwindowwin32.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 9feccd7874..26e624c6ec 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2426,7 +2426,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_SYSKEYDOWN"); // allow system keys, such as ALT-F4 to be processed by Windows eat_keystroke = FALSE; - break; + // intentional fall-through here } case WM_KEYDOWN: { @@ -2451,10 +2451,12 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ gKeyboard->handleKeyDown(w_param, mask); } }); - return eat_keystroke; + if (eat_keystroke) return 0; // skip DefWindowProc() handling if we're consuming the keypress + break; } case WM_SYSKEYUP: eat_keystroke = FALSE; + // intentional fall-through here case WM_KEYUP: { LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_KEYUP"); @@ -2478,7 +2480,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ gKeyboard->handleKeyUp(w_param, mask); } }); - return eat_keystroke; + if (eat_keystroke) return 0; // skip DefWindowProc() handling if we're consuming the keypress + break; } case WM_IME_SETCONTEXT: { -- cgit v1.2.3