summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp50
1 files changed, 36 insertions, 14 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index da16c8209f..9ec3418132 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3714,7 +3714,7 @@ void LLPipeline::touchTexture(LLViewerTexture* tex, F32 vsize)
if (tex)
{
LLImageGL* gl_tex = tex->getGLTexture();
- if (gl_tex && gl_tex->updateBindStats(gl_tex->mTextureMemory))
+ if (gl_tex && gl_tex->updateBindStats())
{
tex->setActive();
tex->addTextureStats(vsize);
@@ -3778,25 +3778,47 @@ void LLPipeline::postSort(LLCamera& camera)
group->rebuildGeom();
}
- for (LLSpatialGroup::draw_map_t::iterator j = group->mDrawMap.begin(); j != group->mDrawMap.end(); ++j)
- {
- LLSpatialGroup::drawmap_elem_t& src_vec = j->second;
- if (!hasRenderType(j->first))
- {
- continue;
- }
-
- for (LLSpatialGroup::drawmap_elem_t::iterator k = src_vec.begin(); k != src_vec.end(); ++k)
- {
+ for (LLSpatialGroup::draw_map_t::iterator j = group->mDrawMap.begin(); j != group->mDrawMap.end(); ++j)
+ {
+ LLSpatialGroup::drawmap_elem_t& src_vec = j->second;
+ if (!hasRenderType(j->first))
+ {
+ continue;
+ }
+
+ // DEBUG -- force a texture virtual size update every frame
+ /*if (group->getSpatialPartition()->mDrawableType == LLPipeline::RENDER_TYPE_VOLUME)
+ {
+ LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("plps - update vsize");
+ auto& entries = group->getData();
+ for (auto& entry : entries)
+ {
+ if (entry)
+ {
+ auto* data = entry->getDrawable();
+ if (data)
+ {
+ LLVOVolume* volume = ((LLDrawable*)data)->getVOVolume();
+ if (volume)
+ {
+ volume->updateTextureVirtualSize(true);
+ }
+ }
+ }
+ }
+ }*/
+
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = src_vec.begin(); k != src_vec.end(); ++k)
+ {
LLDrawInfo* info = *k;
-
- sCull->pushDrawInfo(j->first, info);
+
+ sCull->pushDrawInfo(j->first, info);
if (!sShadowRender && !sReflectionRender)
{
touchTextures(info);
addTrianglesDrawn(info->mCount, info->mDrawMode);
}
- }
+ }
}
if (hasRenderType(LLPipeline::RENDER_TYPE_PASS_ALPHA))