diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2013-10-17 18:26:04 -0400 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2013-10-17 18:26:04 -0400 |
commit | ac1d3a22f2034a5e3aba757bde72825643fa799c (patch) | |
tree | 420b1e27469931f3017bcbe2e7c6f12f2dbd644b /indra/newview/llspatialpartition.cpp | |
parent | 6d405e2d018e6722288e1cfbf477d985b8384a54 (diff) | |
parent | c7057c141c38492bfdc2bfe9d82de97a7364f01b (diff) |
Merge. Pull in viewer-release after 3.6.8 fixes for AMD graphics.
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rwxr-xr-x | indra/newview/llspatialpartition.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index d7ae897604..00eb0c1ab1 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -89,28 +89,17 @@ class LLOcclusionQueryPool : public LLGLNamePool public: LLOcclusionQueryPool() { - mCurQuery = 1; + } protected: - std::list<GLuint> mAvailableName; - GLuint mCurQuery; - virtual GLuint allocateName() { GLuint ret = 0; - if (!mAvailableName.empty()) - { - ret = mAvailableName.front(); - mAvailableName.pop_front(); - } - else - { - ret = mCurQuery++; - } - + glGenQueriesARB(1, &ret); + return ret; } @@ -119,8 +108,7 @@ protected: #if LL_TRACK_PENDING_OCCLUSION_QUERIES LLSpatialGroup::sPendingQueries.erase(name); #endif - llassert(std::find(mAvailableName.begin(), mAvailableName.end(), name) == mAvailableName.end()); - mAvailableName.push_back(name); + glDeleteQueriesARB(1, &name); } }; |