summaryrefslogtreecommitdiff
path: root/indra/newview/llspatialpartition.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-10-10 18:00:11 -0500
committerDave Parks <davep@lindenlab.com>2013-10-10 18:00:11 -0500
commite43058e7640bbdb8507e153bf63a5e6adb016101 (patch)
tree2b0cfde66d85573f22ab0f85f02f011b07bdbc61 /indra/newview/llspatialpartition.cpp
parent275a9606e8658592cc08bcb69ae6a867c008e7ed (diff)
MAINT-2968 Fix for crash on AMD hardware running current drivers.
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rwxr-xr-xindra/newview/llspatialpartition.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 605ed541ba..10dbfa26ff 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);
}
};
@@ -4133,6 +4121,11 @@ void renderAvatarCollisionVolumes(LLVOAvatar* avatar)
avatar->renderCollisionVolumes();
}
+void renderAvatarJoints(LLVOAvatar* avatar)
+{
+ avatar->renderJoints();
+}
+
void renderAgentTarget(LLVOAvatar* avatar)
{
// render these for self only (why, i don't know)
@@ -4290,6 +4283,11 @@ public:
renderAvatarCollisionVolumes(avatar);
}
+ if (avatar && gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_AVATAR_JOINTS))
+ {
+ renderAvatarJoints(avatar);
+ }
+
if (avatar && gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_AGENT_TARGET))
{
renderAgentTarget(avatar);
@@ -4573,6 +4571,7 @@ void LLSpatialPartition::renderDebug()
LLPipeline::RENDER_DEBUG_TEXTURE_ANIM |
LLPipeline::RENDER_DEBUG_RAYCAST |
LLPipeline::RENDER_DEBUG_AVATAR_VOLUME |
+ LLPipeline::RENDER_DEBUG_AVATAR_JOINTS |
LLPipeline::RENDER_DEBUG_AGENT_TARGET |
//LLPipeline::RENDER_DEBUG_BUILD_QUEUE |
LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA |