From 0e116741a050ca1525a4faa2696b5c318d31bc06 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 10 Oct 2013 18:00:11 -0500 Subject: MAINT-2968 Fix for crash on AMD hardware running current drivers. --- indra/newview/llspatialpartition.cpp | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'indra/newview/llspatialpartition.cpp') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index d7ae897604..768c9d069f 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 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 | -- cgit v1.2.3 From 929311869b028bcb34ad94a84f1c844fcd108f40 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 11 Oct 2013 17:10:26 -0500 Subject: MAINT-2968 Transplant cleanup. --- indra/newview/llspatialpartition.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'indra/newview/llspatialpartition.cpp') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 768c9d069f..00eb0c1ab1 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -4121,11 +4121,6 @@ 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) @@ -4283,11 +4278,6 @@ 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); @@ -4571,7 +4561,6 @@ 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 | -- cgit v1.2.3