summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.cpp
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2021-10-13 10:35:39 -0500
committerRunitai Linden <davep@lindenlab.com>2021-10-13 10:35:39 -0500
commita1e6cbe4a802f92182163171e6743e7f63d89ace (patch)
tree0e2bf172b1dec9ca0a8c88fd91cb763c68f3f197 /indra/llrender/llrender.cpp
parent74a2354353813db529ae123858bafba86cd12110 (diff)
SL-16166 Apply LLRenderPass::pushBatch optimizations to LLDrawPoolBump::pushBatch
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r--indra/llrender/llrender.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 34c5b77944..91d3c96fbe 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -472,6 +472,28 @@ void LLTexUnit::unbind(eTextureType type)
}
}
+void LLTexUnit::unbindFast(eTextureType type)
+{
+ activate();
+
+ // Disabled caching of binding state.
+ if (mCurrTexType == type)
+ {
+ mCurrTexture = 0;
+
+ // Always make sure our texture color space is reset to linear. SRGB sampling should be opt-in in the vast majority of cases. Also prevents color space "popping".
+ mTexColorSpace = TCS_LINEAR;
+ if (type == LLTexUnit::TT_TEXTURE)
+ {
+ glBindTexture(sGLTextureType[type], sWhiteTexture);
+ }
+ else
+ {
+ glBindTexture(sGLTextureType[type], 0);
+ }
+ }
+}
+
void LLTexUnit::setTextureAddressMode(eTextureAddressMode mode)
{
if (mIndex < 0 || mCurrTexture == 0) return;