From 2121e78b4553627e125c6382353d50ba1cb582e5 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Sat, 20 Apr 2013 01:00:24 -0500 Subject: [PATCH 1/2] Lessen occurrence of missing prims. Also added 'ctrl-shift-v' to rebuild vbos. --- indra/newview/llviewermenu.cpp | 8 ++++++++ indra/newview/llviewertexturelist.cpp | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index abbcce641..238077dea 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -622,6 +622,12 @@ void region_change(); void parse_simulator_features(); void custom_selected(void* user_data); +void reset_vertex_buffers(void *user_data) +{ + gPipeline.clearRebuildGroups(); + gPipeline.resetVertexBuffers(); +} + class LLMenuParcelObserver : public LLParcelObserver { public: @@ -1591,6 +1597,8 @@ void init_debug_rendering_menu(LLMenuGL* menu) item = new LLMenuItemCheckGL("Aggressive Alpha Masking", menu_toggle_control, NULL, menu_check_control, (void*)"SHUseRMSEAutoMask"); menu->addChild(item); + menu->addChild(new LLMenuItemCallGL("Rebuild Vertex Buffers", reset_vertex_buffers, NULL, NULL, 'V', MASK_CONTROL | MASK_SHIFT)); + item = new LLMenuItemCheckGL("Animate Textures", menu_toggle_control, NULL, menu_check_control, (void*)"AnimateTextures"); menu->addChild(item); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 7a7b70f9b..d7a772f22 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -663,13 +663,15 @@ static LLFastTimer::DeclareTimer FTM_IMAGE_MEDIA("Media"); void LLViewerTextureList::updateImages(F32 max_time) { static BOOL cleared = FALSE; - static const LLCachedControl hide_tp_screen("AscentDisableTeleportScreens",false); + //Singu note: Don't clear vbos on local tp until some serious geom rebuild bugs are stomped out. + //Currently it causes prims to fail to rebuild when they should be popping back into visiblity. + //static const LLCachedControl hide_tp_screen("AscentDisableTeleportScreens",false); //Can't check gTeleportDisplay due to a process_teleport_local(), which sets it to true for local teleports... so: // Do this case if IS teleporting but NOT local teleporting, AND either the TP screen is set to appear OR we just entered the sim (TELEPORT_START_ARRIVAL) LLAgent::ETeleportState state = gAgent.getTeleportState(); if(state != LLAgent::TELEPORT_NONE && state != LLAgent::TELEPORT_LOCAL && state != LLAgent::TELEPORT_PENDING && - (!hide_tp_screen || state == LLAgent::TELEPORT_START_ARRIVAL || state == LLAgent::TELEPORT_ARRIVING)) + (/*!hide_tp_screen ||*/ state == LLAgent::TELEPORT_START_ARRIVAL || state == LLAgent::TELEPORT_ARRIVING)) { if(!cleared) { From c9f93a82ced498bc3d1085ed68a7b86c11ed6f99 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Sat, 20 Apr 2013 01:02:40 -0500 Subject: [PATCH 2/2] Improved the logic in LLPipeline::updateDrawableGeom a bit. --- indra/newview/pipeline.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 9e9f785c7..711406ea8 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2403,15 +2403,18 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority) BOOL update_complete = drawablep->updateGeometry(priority); if (update_complete && assertInitialized()) { - drawablep->setState(LLDrawable::BUILT); //Workaround for 'missing prims' until it's fixed upstream by LL. //Sometimes clearing CLEAR_INVISIBLE and FORCE_INVISIBLE in LLPipeline::stateSort was too late. Do it here instead, before //the rebuild state is picked up on and LLVolumeGeometryManager::rebuildGeom is called. //If the FORCE_INVISIBLE isn't cleared before the rebuildGeom call, the geometry will NOT BE REBUILT! if(drawablep->isState(LLDrawable::CLEAR_INVISIBLE)) { + // clear invisible flag here to avoid single frame glitch drawablep->clearState(LLDrawable::FORCE_INVISIBLE|LLDrawable::CLEAR_INVISIBLE); + return false; //Defer to next mBuildQ1 iteration } + + drawablep->setState(LLDrawable::BUILT); mGeometryChanges++; } return update_complete;