summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llglslshader.cpp6
-rw-r--r--indra/llrender/llvertexbuffer.cpp6
-rw-r--r--indra/llrender/llvertexbuffer.h2
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/lldrawable.cpp7
-rw-r--r--indra/newview/lldrawpool.cpp2
-rw-r--r--indra/newview/lldrawpoolalpha.cpp132
-rw-r--r--indra/newview/lldrawpoolbump.cpp4
-rw-r--r--indra/newview/llface.cpp4
-rw-r--r--indra/newview/llspatialpartition.cpp36
-rw-r--r--indra/newview/llspatialpartition.h7
-rw-r--r--indra/newview/llviewercontrol.cpp1
-rw-r--r--indra/newview/llvovolume.cpp6
-rw-r--r--indra/newview/pipeline.cpp21
14 files changed, 160 insertions, 85 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index ca92cb6580..2b3179116d 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -343,8 +343,11 @@ BOOL LLGLSLShader::link(BOOL suppress_errors)
return LLShaderMgr::instance()->linkProgramObject(mProgramObject, suppress_errors);
}
+static LLFastTimer::DeclareTimer FTM_BIND_SHADER("Bind Shader");
+
void LLGLSLShader::bind()
{
+ LLFastTimer ftm(FTM_BIND_SHADER);
if (gGLManager.mHasShaderObjects)
{
glUseProgramObjectARB(mProgramObject);
@@ -357,8 +360,11 @@ void LLGLSLShader::bind()
}
}
+static LLFastTimer::DeclareTimer FTM_UNBIND_SHADER("Unbind Shader");
+
void LLGLSLShader::unbind()
{
+ LLFastTimer ftm(FTM_UNBIND_SHADER);
if (gGLManager.mHasShaderObjects)
{
stop_glerror();
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index bf5eda21eb..ae43915a9d 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -61,6 +61,7 @@ BOOL LLVertexBuffer::sVBOActive = FALSE;
BOOL LLVertexBuffer::sIBOActive = FALSE;
U32 LLVertexBuffer::sAllocatedBytes = 0;
BOOL LLVertexBuffer::sMapped = FALSE;
+BOOL LLVertexBuffer::sUseStreamDraw = TRUE;
std::vector<U32> LLVertexBuffer::sDeleteList;
@@ -381,6 +382,11 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
{
mUsage = 0 ;
}
+
+ if (mUsage == GL_STREAM_DRAW_ARB && !sUseStreamDraw)
+ {
+ mUsage = 0;
+ }
S32 stride = calcStride(typemask, mOffsets);
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index b785a22976..e2fecdffef 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -83,6 +83,8 @@ public:
static LLVBOPool sDynamicVBOPool;
static LLVBOPool sStreamIBOPool;
static LLVBOPool sDynamicIBOPool;
+
+ static BOOL sUseStreamDraw;
static void initClass(bool use_vbo);
static void cleanupClass();
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 6bfa42785f..1dc90280a2 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7542,6 +7542,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>RenderUseStreamVBO</key>
+ <map>
+ <key>Comment</key>
+ <string>Use VBO's for stream buffers</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>RenderVolumeLODFactor</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 38eda5bd2e..013577261c 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -673,8 +673,11 @@ BOOL LLDrawable::updateMoveDamped()
return done_moving;
}
+static LLFastTimer::DeclareTimer FTM_UPDATE_DISTANCE("Update Distance");
+
void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
{
+ LLFastTimer t(FTM_UPDATE_DISTANCE);
if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
{
llerrs << "WTF?" << llendl;
@@ -1307,8 +1310,12 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
}
}
+static LLFastTimer::DeclareTimer FTM_BRIDGE_DISTANCE_UPDATE("Bridge Distance");
+
void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
{
+ LLFastTimer t(FTM_BRIDGE_DISTANCE_UPDATE);
+
if (mDrawable == NULL)
{
markDead();
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index ef946ac49e..ae30af3647 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -442,7 +442,6 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture)
{
- llpushcallstacks ;
for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
{
LLDrawInfo* pparams = *i;
@@ -475,6 +474,7 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
{
if (params.mTexture.notNull())
{
+ params.mTexture->addTextureStats(params.mVSize);
gGL.getTexUnit(0)->bind(params.mTexture, TRUE) ;
if (params.mTextureMatrix)
{
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 875c9ac6a9..75973cfa54 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -294,96 +294,98 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
LLRenderPass::applyModelMatrix(params);
- if (params.mFullbright)
{
- // Turn off lighting if it hasn't already been so.
- if (light_enabled || !initialized_lighting)
+ if (params.mFullbright)
+ {
+ // Turn off lighting if it hasn't already been so.
+ if (light_enabled || !initialized_lighting)
+ {
+ initialized_lighting = TRUE;
+ if (use_shaders)
+ {
+ target_shader = fullbright_shader;
+ }
+ else
+ {
+ gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
+ }
+ light_enabled = FALSE;
+ }
+ }
+ // Turn on lighting if it isn't already.
+ else if (!light_enabled || !initialized_lighting)
{
initialized_lighting = TRUE;
if (use_shaders)
{
- target_shader = fullbright_shader;
+ target_shader = simple_shader;
}
else
{
- gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
+ gPipeline.enableLightsDynamic();
}
- light_enabled = FALSE;
+ light_enabled = TRUE;
}
- }
- // Turn on lighting if it isn't already.
- else if (!light_enabled || !initialized_lighting)
- {
- initialized_lighting = TRUE;
- if (use_shaders)
- {
- target_shader = simple_shader;
- }
- else
- {
- gPipeline.enableLightsDynamic();
- }
- light_enabled = TRUE;
- }
- // If we need shaders, and we're not ALREADY using the proper shader, then bind it
- // (this way we won't rebind shaders unnecessarily).
- if(use_shaders && (current_shader != target_shader))
- {
- llassert(target_shader != NULL);
- if (deferred_render && current_shader != NULL)
- {
- gPipeline.unbindDeferredShader(*current_shader);
- diffuse_channel = 0;
- }
- current_shader = target_shader;
- if (deferred_render)
- {
- gPipeline.bindDeferredShader(*current_shader);
- diffuse_channel = current_shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- }
- else
+ // If we need shaders, and we're not ALREADY using the proper shader, then bind it
+ // (this way we won't rebind shaders unnecessarily).
+ if(use_shaders && (current_shader != target_shader))
{
- current_shader->bind();
+ llassert(target_shader != NULL);
+ if (deferred_render && current_shader != NULL)
+ {
+ gPipeline.unbindDeferredShader(*current_shader);
+ diffuse_channel = 0;
+ }
+ current_shader = target_shader;
+ if (deferred_render)
+ {
+ gPipeline.bindDeferredShader(*current_shader);
+ diffuse_channel = current_shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
+ }
+ else
+ {
+ current_shader->bind();
+ }
}
- }
- else if (!use_shaders && current_shader != NULL)
- {
- if (deferred_render)
+ else if (!use_shaders && current_shader != NULL)
{
- gPipeline.unbindDeferredShader(*current_shader);
- diffuse_channel = 0;
+ if (deferred_render)
+ {
+ gPipeline.unbindDeferredShader(*current_shader);
+ diffuse_channel = 0;
+ }
+ LLGLSLShader::bindNoShader();
+ current_shader = NULL;
}
- LLGLSLShader::bindNoShader();
- current_shader = NULL;
- }
-
- if (params.mGroup)
- {
- params.mGroup->rebuildMesh();
- }
-
- if (params.mTexture.notNull())
- {
- gGL.getTexUnit(diffuse_channel)->bind(params.mTexture.get());
- if(params.mTexture.notNull())
+ if (params.mGroup)
{
- params.mTexture->addTextureStats(params.mVSize);
+ params.mGroup->rebuildMesh();
}
- if (params.mTextureMatrix)
+
+
+ if (params.mTexture.notNull())
{
- gGL.getTexUnit(0)->activate();
- glMatrixMode(GL_TEXTURE);
- glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
- gPipeline.mTextureMatrixOps++;
+ gGL.getTexUnit(diffuse_channel)->bind(params.mTexture.get());
+ if(params.mTexture.notNull())
+ {
+ params.mTexture->addTextureStats(params.mVSize);
+ }
+ if (params.mTextureMatrix)
+ {
+ gGL.getTexUnit(0)->activate();
+ glMatrixMode(GL_TEXTURE);
+ glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
+ gPipeline.mTextureMatrixOps++;
+ }
}
}
params.mVertexBuffer->setBuffer(mask);
params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
-
+
if (params.mTextureMatrix && params.mTexture.notNull())
{
gGL.getTexUnit(0)->activate();
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index a4a8dc80b5..8f3e775976 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -837,7 +837,6 @@ void LLBumpImageList::addTextureStats(U8 bump, const LLUUID& base_image_id, F32
void LLBumpImageList::updateImages()
{
- llpushcallstacks ;
for (bump_image_map_t::iterator iter = mBrightnessEntries.begin(); iter != mBrightnessEntries.end(); )
{
bump_image_map_t::iterator curiter = iter++;
@@ -864,7 +863,7 @@ void LLBumpImageList::updateImages()
}
}
}
- llpushcallstacks ;
+
for (bump_image_map_t::iterator iter = mDarknessEntries.begin(); iter != mDarknessEntries.end(); )
{
bump_image_map_t::iterator curiter = iter++;
@@ -891,7 +890,6 @@ void LLBumpImageList::updateImages()
}
}
}
- llpushcallstacks ;
}
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 9de69a8173..8d86070bdf 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -862,12 +862,14 @@ void LLFace::updateRebuildFlags()
}
}
+static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom");
+
BOOL LLFace::getGeometryVolume(const LLVolume& volume,
const S32 &f,
const LLMatrix4& mat_vert, const LLMatrix3& mat_normal,
const U16 &index_offset)
{
- llpushcallstacks ;
+ LLFastTimer t(FTM_FACE_GET_GEOM);
const LLVolumeFace &vf = volume.getVolumeFace(f);
S32 num_vertices = (S32)vf.mVertices.size();
S32 num_indices = LLPipeline::sUseTriStrips ? (S32)vf.mTriStrip.size() : (S32) vf.mIndices.size();
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index d6e9256fee..cf1e3bf186 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1513,6 +1513,7 @@ void LLSpatialGroup::checkOcclusion()
{
if (LLPipeline::sUseOcclusion > 1)
{
+ LLFastTimer t(FTM_OCCLUSION_READBACK);
LLSpatialGroup* parent = getParent();
if (parent && parent->isOcclusionState(LLSpatialGroup::OCCLUDED))
{ //if the parent has been marked as occluded, the child is implicitly occluded
@@ -1520,7 +1521,6 @@ void LLSpatialGroup::checkOcclusion()
}
else if (isOcclusionState(QUERY_PENDING))
{ //otherwise, if a query is pending, read it back
- LLFastTimer t(FTM_OCCLUSION_READBACK);
GLuint res = 1;
if (!isOcclusionState(DISCARD_QUERY) && mOcclusionQuery[LLViewerCamera::sCurCameraID])
{
@@ -3423,11 +3423,23 @@ LLCullResult::LLCullResult()
void LLCullResult::clear()
{
mVisibleGroupsSize = 0;
+ mVisibleGroupsEnd = mVisibleGroups.begin();
+
mAlphaGroupsSize = 0;
+ mAlphaGroupsEnd = mAlphaGroups.begin();
+
mOcclusionGroupsSize = 0;
+ mOcclusionGroupsEnd = mOcclusionGroups.begin();
+
mDrawableGroupsSize = 0;
+ mDrawableGroupsEnd = mDrawableGroups.begin();
+
mVisibleListSize = 0;
+ mVisibleListEnd = mVisibleList.begin();
+
mVisibleBridgeSize = 0;
+ mVisibleBridgeEnd = mVisibleBridge.begin();
+
for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++)
{
@@ -3436,6 +3448,7 @@ void LLCullResult::clear()
mRenderMap[i][j] = 0;
}
mRenderMapSize[i] = 0;
+ mRenderMapEnd[i] = mRenderMap[i].begin();
}
}
@@ -3446,7 +3459,7 @@ LLCullResult::sg_list_t::iterator LLCullResult::beginVisibleGroups()
LLCullResult::sg_list_t::iterator LLCullResult::endVisibleGroups()
{
- return mVisibleGroups.begin() + mVisibleGroupsSize;
+ return mVisibleGroupsEnd;
}
LLCullResult::sg_list_t::iterator LLCullResult::beginAlphaGroups()
@@ -3456,7 +3469,7 @@ LLCullResult::sg_list_t::iterator LLCullResult::beginAlphaGroups()
LLCullResult::sg_list_t::iterator LLCullResult::endAlphaGroups()
{
- return mAlphaGroups.begin() + mAlphaGroupsSize;
+ return mAlphaGroupsEnd;
}
LLCullResult::sg_list_t::iterator LLCullResult::beginOcclusionGroups()
@@ -3466,7 +3479,7 @@ LLCullResult::sg_list_t::iterator LLCullResult::beginOcclusionGroups()
LLCullResult::sg_list_t::iterator LLCullResult::endOcclusionGroups()
{
- return mOcclusionGroups.begin() + mOcclusionGroupsSize;
+ return mOcclusionGroupsEnd;
}
LLCullResult::sg_list_t::iterator LLCullResult::beginDrawableGroups()
@@ -3476,7 +3489,7 @@ LLCullResult::sg_list_t::iterator LLCullResult::beginDrawableGroups()
LLCullResult::sg_list_t::iterator LLCullResult::endDrawableGroups()
{
- return mDrawableGroups.begin() + mDrawableGroupsSize;
+ return mDrawableGroupsEnd;
}
LLCullResult::drawable_list_t::iterator LLCullResult::beginVisibleList()
@@ -3486,7 +3499,7 @@ LLCullResult::drawable_list_t::iterator LLCullResult::beginVisibleList()
LLCullResult::drawable_list_t::iterator LLCullResult::endVisibleList()
{
- return mVisibleList.begin() + mVisibleListSize;
+ return mVisibleListEnd;
}
LLCullResult::bridge_list_t::iterator LLCullResult::beginVisibleBridge()
@@ -3496,7 +3509,7 @@ LLCullResult::bridge_list_t::iterator LLCullResult::beginVisibleBridge()
LLCullResult::bridge_list_t::iterator LLCullResult::endVisibleBridge()
{
- return mVisibleBridge.begin() + mVisibleBridgeSize;
+ return mVisibleBridgeEnd;
}
LLCullResult::drawinfo_list_t::iterator LLCullResult::beginRenderMap(U32 type)
@@ -3506,7 +3519,7 @@ LLCullResult::drawinfo_list_t::iterator LLCullResult::beginRenderMap(U32 type)
LLCullResult::drawinfo_list_t::iterator LLCullResult::endRenderMap(U32 type)
{
- return mRenderMap[type].begin() + mRenderMapSize[type];
+ return mRenderMapEnd[type];
}
void LLCullResult::pushVisibleGroup(LLSpatialGroup* group)
@@ -3520,6 +3533,7 @@ void LLCullResult::pushVisibleGroup(LLSpatialGroup* group)
mVisibleGroups.push_back(group);
}
++mVisibleGroupsSize;
+ mVisibleGroupsEnd = mVisibleGroups.begin()+mVisibleGroupsSize;
}
void LLCullResult::pushAlphaGroup(LLSpatialGroup* group)
@@ -3533,6 +3547,7 @@ void LLCullResult::pushAlphaGroup(LLSpatialGroup* group)
mAlphaGroups.push_back(group);
}
++mAlphaGroupsSize;
+ mAlphaGroupsEnd = mAlphaGroups.begin()+mAlphaGroupsSize;
}
void LLCullResult::pushOcclusionGroup(LLSpatialGroup* group)
@@ -3546,6 +3561,7 @@ void LLCullResult::pushOcclusionGroup(LLSpatialGroup* group)
mOcclusionGroups.push_back(group);
}
++mOcclusionGroupsSize;
+ mOcclusionGroupsEnd = mOcclusionGroups.begin()+mOcclusionGroupsSize;
}
void LLCullResult::pushDrawableGroup(LLSpatialGroup* group)
@@ -3559,6 +3575,7 @@ void LLCullResult::pushDrawableGroup(LLSpatialGroup* group)
mDrawableGroups.push_back(group);
}
++mDrawableGroupsSize;
+ mDrawableGroupsEnd = mDrawableGroups.begin()+mDrawableGroupsSize;
}
void LLCullResult::pushDrawable(LLDrawable* drawable)
@@ -3572,6 +3589,7 @@ void LLCullResult::pushDrawable(LLDrawable* drawable)
mVisibleList.push_back(drawable);
}
++mVisibleListSize;
+ mVisibleListEnd = mVisibleList.begin()+mVisibleListSize;
}
void LLCullResult::pushBridge(LLSpatialBridge* bridge)
@@ -3585,6 +3603,7 @@ void LLCullResult::pushBridge(LLSpatialBridge* bridge)
mVisibleBridge.push_back(bridge);
}
++mVisibleBridgeSize;
+ mVisibleBridgeEnd = mVisibleBridge.begin()+mVisibleBridgeSize;
}
void LLCullResult::pushDrawInfo(U32 type, LLDrawInfo* draw_info)
@@ -3598,6 +3617,7 @@ void LLCullResult::pushDrawInfo(U32 type, LLDrawInfo* draw_info)
mRenderMap[type].push_back(draw_info);
}
++mRenderMapSize[type];
+ mRenderMapEnd[type] = mRenderMap[type].begin() + mRenderMapSize[type];
}
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 7896488379..de3745a1a3 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -534,12 +534,19 @@ private:
U32 mRenderMapSize[LLRenderPass::NUM_RENDER_TYPES];
sg_list_t mVisibleGroups;
+ sg_list_t::iterator mVisibleGroupsEnd;
sg_list_t mAlphaGroups;
+ sg_list_t::iterator mAlphaGroupsEnd;
sg_list_t mOcclusionGroups;
+ sg_list_t::iterator mOcclusionGroupsEnd;
sg_list_t mDrawableGroups;
+ sg_list_t::iterator mDrawableGroupsEnd;
drawable_list_t mVisibleList;
+ drawable_list_t::iterator mVisibleListEnd;
bridge_list_t mVisibleBridge;
+ bridge_list_t::iterator mVisibleBridgeEnd;
drawinfo_list_t mRenderMap[LLRenderPass::NUM_RENDER_TYPES];
+ drawinfo_list_t::iterator mRenderMapEnd[LLRenderPass::NUM_RENDER_TYPES];
};
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 6f037177fa..51a1ae901e 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -576,6 +576,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("MuteAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
gSavedSettings.getControl("MuteUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
gSavedSettings.getControl("RenderVBOEnable")->getSignal()->connect(boost::bind(&handleRenderUseVBOChanged, _2));
+ gSavedSettings.getControl("RenderUseStreamVBO")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("WLSkyDetail")->getSignal()->connect(boost::bind(&handleWLSkyDetailChanged, _2));
gSavedSettings.getControl("RenderLightingDetail")->getSignal()->connect(boost::bind(&handleRenderLightingDetailChanged, _2));
gSavedSettings.getControl("NumpadControl")->getSignal()->connect(boost::bind(&handleNumpadControlChanged, _2));
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 8a77461369..073d7c2b91 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3304,7 +3304,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt");
void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{
- llpushcallstacks ;
if (group->changeLOD())
{
group->mLastUpdateDistance = group->mDistance;
@@ -3533,9 +3532,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
static LLFastTimer::DeclareTimer FTM_VOLUME_GEOM("Volume Geometry");
+static LLFastTimer::DeclareTimer FTM_VOLUME_GEOM_PARTIAL("Terse Rebuild");
+
void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
{
- llpushcallstacks ;
llassert(group);
if (group && group->isState(LLSpatialGroup::MESH_DIRTY) && !group->isState(LLSpatialGroup::GEOM_DIRTY))
{
@@ -3546,6 +3546,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
for (LLSpatialGroup::element_iter drawable_iter = group->getData().begin(); drawable_iter != group->getData().end(); ++drawable_iter)
{
+ LLFastTimer t(FTM_VOLUME_GEOM_PARTIAL);
LLDrawable* drawablep = *drawable_iter;
if (drawablep->isDead() || drawablep->isState(LLDrawable::FORCE_INVISIBLE) )
@@ -3627,7 +3628,6 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort)
{
- llpushcallstacks ;
//calculate maximum number of vertices to store in a single buffer
U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
max_vertices = llmin(max_vertices, (U32) 65535);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3d700abd01..1ae8bc5481 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -361,6 +361,7 @@ void LLPipeline::init()
sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD");
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
+ LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO");
sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");
sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
@@ -1725,8 +1726,12 @@ void LLPipeline::markOccluder(LLSpatialGroup* group)
}
}
+static LLFastTimer::DeclareTimer FTM_DO_OCCLUSION("Do Occlusion");
+
void LLPipeline::doOcclusion(LLCamera& camera)
{
+ LLFastTimer t(FTM_DO_OCCLUSION);
+
LLVertexBuffer::unbind();
if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCCLUSION))
@@ -1799,7 +1804,6 @@ void LLPipeline::rebuildPriorityGroups()
void LLPipeline::rebuildGroups()
{
- llpushcallstacks ;
// Iterate through some drawables on the non-priority build queue
S32 size = (S32) mGroupQ2.size();
S32 min_count = llclamp((S32) ((F32) (size * size)/4096*0.25f), 1, size);
@@ -1944,9 +1948,13 @@ void LLPipeline::updateGeom(F32 max_dtime)
updateMovedList(mMovedBridge);
}
+static LLFastTimer::DeclareTimer FTM_MARK_VISIBLE("Mark Visible");
+
void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
{
LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_VISIBLE);
+ LLFastTimer t(FTM_MARK_VISIBLE);
+
if(!drawablep || drawablep->isDead())
{
return;
@@ -4630,8 +4638,12 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
mLightMask = 0;
}
+static LLFastTimer::DeclareTimer FTM_ENABLE_LIGHTS("Enable Lights");
+
void LLPipeline::enableLights(U32 mask)
{
+ LLFastTimer ftm(FTM_ENABLE_LIGHTS);
+
assertInitialized();
if (mLightingDetail == 0)
@@ -4737,16 +4749,16 @@ void LLPipeline::enableLightsFullbright(const LLColor4& color)
enableLights(mask);
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,color.mV);
- if (mLightingDetail >= 2)
+ /*if (mLightingDetail >= 2)
{
glColor4f(0.f, 0.f, 0.f, 1.f); // no local lighting by default
- }
+ }*/
}
void LLPipeline::disableLights()
{
enableLights(0); // no lighting (full bright)
- glColor4f(1.f, 1.f, 1.f, 1.f); // lighting color = white by default
+ //glColor4f(1.f, 1.f, 1.f, 1.f); // lighting color = white by default
}
//============================================================================
@@ -5349,6 +5361,7 @@ void LLPipeline::resetVertexBuffers()
{
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
+ LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO");
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)