summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-02-17 22:52:23 +0000
committerDave Parks <davep@lindenlab.com>2022-02-17 22:52:23 +0000
commit0d6aa3c0fe184ae00899304cb3f71315f5c73314 (patch)
tree88196dfd88c70728132cd05b5b7d5d4e630dd50a /indra/llrender/llgl.cpp
parent892f7d98d5da2c329472a7075a88e010277b86b0 (diff)
SL-16815 Remove frame stalls from occlusion queries, bumpmap updates, and querying for available video memory.
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r--indra/llrender/llgl.cpp90
1 files changed, 1 insertions, 89 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 50a5972d28..639d1fba32 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -2150,95 +2150,6 @@ LLGLUserClipPlane::~LLGLUserClipPlane()
disable();
}
-LLGLNamePool::LLGLNamePool()
-{
-}
-
-LLGLNamePool::~LLGLNamePool()
-{
-}
-
-void LLGLNamePool::upkeep()
-{
- std::sort(mNameList.begin(), mNameList.end(), CompareUsed());
-}
-
-void LLGLNamePool::cleanup()
-{
- for (name_list_t::iterator iter = mNameList.begin(); iter != mNameList.end(); ++iter)
- {
- releaseName(iter->name);
- }
-
- mNameList.clear();
-}
-
-GLuint LLGLNamePool::allocate()
-{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
-#if LL_GL_NAME_POOLING
- for (name_list_t::iterator iter = mNameList.begin(); iter != mNameList.end(); ++iter)
- {
- if (!iter->used)
- {
- iter->used = TRUE;
- return iter->name;
- }
- }
-
- NameEntry entry;
- entry.name = allocateName();
- entry.used = TRUE;
- mNameList.push_back(entry);
-
- return entry.name;
-#else
- return allocateName();
-#endif
-}
-
-void LLGLNamePool::release(GLuint name)
-{
-#if LL_GL_NAME_POOLING
- for (name_list_t::iterator iter = mNameList.begin(); iter != mNameList.end(); ++iter)
- {
- if (iter->name == name)
- {
- if (iter->used)
- {
- iter->used = FALSE;
- return;
- }
- else
- {
- LL_ERRS() << "Attempted to release a pooled name that is not in use!" << LL_ENDL;
- }
- }
- }
- LL_ERRS() << "Attempted to release a non pooled name!" << LL_ENDL;
-#else
- releaseName(name);
-#endif
-}
-
-//static
-void LLGLNamePool::upkeepPools()
-{
- for (auto& pool : instance_snapshot())
- {
- pool.upkeep();
- }
-}
-
-//static
-void LLGLNamePool::cleanupPools()
-{
- for (auto& pool : instance_snapshot())
- {
- pool.cleanup();
- }
-}
-
LLGLDepthTest::LLGLDepthTest(GLboolean depth_enabled, GLboolean write_enabled, GLenum depth_func)
: mPrevDepthEnabled(sDepthEnabled), mPrevDepthFunc(sDepthFunc), mPrevWriteEnabled(sWriteEnabled)
{
@@ -2460,3 +2371,4 @@ extern "C"
}
#endif
+