diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 044765ba0..9e9f785c7 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2404,6 +2404,14 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL 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)) + { + drawablep->clearState(LLDrawable::FORCE_INVISIBLE|LLDrawable::CLEAR_INVISIBLE); + } mGeometryChanges++; } return update_complete;