summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-12-23 01:48:44 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-12-23 01:48:44 -0800
commit57153cf0f1fffe669b9d8871c33f9c4aaba67a2f (patch)
tree42e58fd10165bcd4bb7e65f5fbab7a16b518ddc3 /indra/newview
parent4351160958efa1c352e8af1ab3f48c1486ba9c5c (diff)
SH-655 - Project mesh viewer crashes on exit.
A copy constructor was implemented which did a memcpy, which included the vtable pointer which was to another object of another class (same child though). This resulted in the wrong destructor being called. The reason for the memcpy was for alignment purposes. The solution was to move to LLVector4a, which is intrinsicly aligned. Also, did some performance optimizations based on the LLVector4a optimizations. The solution was to re-implement the
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/pipeline.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 1f1c8d46f5..9685028639 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8114,7 +8114,8 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
const LLPlane& cp = camera.getAgentPlane(j);
const LLVector3& v1 = pp[bs[i*2+0]];
const LLVector3& v2 = pp[bs[i*2+1]];
- const LLVector3 n(cp.mV);
+ LLVector3 n;
+ cp.getVector3(n);
LLVector3 line = v1-v2;
@@ -8128,8 +8129,8 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
LLVector3 intersect = v2+line*t;
pp.push_back(intersect);
}
- }
}
+ }
//camera frustum line segments
const U32 fs[] =
@@ -8160,7 +8161,8 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
const LLVector3& v1 = pp[fs[i*2+0]+8];
const LLVector3& v2 = pp[fs[i*2+1]+8];
const LLPlane& cp = bp[j];
- const LLVector3 n(cp.mV);
+ LLVector3 n;
+ cp.getVector3(n);
LLVector3 line = v1-v2;
@@ -8175,7 +8177,7 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
pp.push_back(intersect);
}
}
- }
+ }
LLVector3 ext[] = { min-LLVector3(0.05f,0.05f,0.05f),
max+LLVector3(0.05f,0.05f,0.05f) };