Fix poor batching with mac/ancient drivers. Also, some minor tweaks to sorting algorithm.

This commit is contained in:
Shyotl
2014-02-21 02:24:42 -06:00
parent 1c48aa8f97
commit bb0f17ae6f
2 changed files with 6 additions and 5 deletions

View File

@@ -679,6 +679,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("SHUseRMSEAutoMask")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("SHAutoMaskMaxRMSE")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("SHAltBatching")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
//See LL jira VWR-3258 comment section. Implemented by LL in 2.1 -Shyotl

View File

@@ -5402,15 +5402,15 @@ struct CompareBatchBreakerModified
{
return lhs->isState(LLFace::FULLBRIGHT) < rhs->isState(LLFace::FULLBRIGHT);
}
else if(batch_shiny && lte->getShiny() != rte->getShiny())
else if(batch_shiny && !lte->getShiny() != !rte->getShiny())
{
return lte->getShiny() < rte->getShiny();
return !lte->getShiny() < !rte->getShiny();
}
else if(lhs->getPoolType() == LLDrawPool::POOL_MATERIALS)
else if(lhs->getPoolType() == LLDrawPool::POOL_MATERIALS && lte->getMaterialParams().get() != rte->getMaterialParams().get())
{
return lte->getMaterialParams().get() < rte->getMaterialParams().get();
}
else if(lhs->getPoolType() == LLDrawPool::POOL_BUMP)
else if(lhs->getPoolType() == LLDrawPool::POOL_BUMP && lte->getBumpmap() != rte->getBumpmap())
{
return lte->getBumpmap() < rte->getBumpmap();
}
@@ -5634,7 +5634,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
{
facep->setTextureIndex(0);
if(can_batch_texture(facep) && texture_index_channels > 1)
if(can_batch_texture(facep))
{
static const U8 MAX_TEXTURE_COUNT = 32;
static LLViewerTexture* texture_list[MAX_TEXTURE_COUNT];