summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-08-19 12:56:04 -0700
committerGraham Linden <graham@lindenlab.com>2013-08-19 12:56:04 -0700
commit62011c2871bdb09b92c56d2959eed64ba6ec3e1f (patch)
tree800b0c726c361a05a8e7b3025c7a14cca26f89c9 /indra/newview
parent3f186aab7737d611e1b8a62e66a79828e3b5ef5b (diff)
Fix merge issues from genBBoxes optimizations fighting with genBBoxes optimizations and missing statics
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llface.cpp98
-rwxr-xr-xindra/newview/llface.h3
-rwxr-xr-xindra/newview/llvovolume.cpp2
-rwxr-xr-xindra/newview/pipeline.cpp2
-rwxr-xr-xindra/newview/pipeline.h4
5 files changed, 41 insertions, 68 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 700b31f8d3..53e5b55b89 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -768,7 +768,7 @@ bool less_than_max_mag(const LLVector4a& vec)
}
BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
- const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume)
+ const LLMatrix4& mat_vert_in, BOOL global_volume)
{
//get bounding box
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED))
@@ -777,10 +777,6 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
LLMatrix4a mat_vert;
mat_vert.loadu(mat_vert_in);
- LLMatrix4a mat_normal;
- mat_normal.loadu(mat_normal_in);
-
- //VECTORIZE THIS
LLVector4a min,max;
if (f >= volume.getNumVolumeFaces())
@@ -797,95 +793,69 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
llassert(less_than_max_mag(max));
//min, max are in volume space, convert to drawable render space
- LLVector4a center;
- LLVector4a t;
- t.setAdd(min, max);
- t.mul(0.5f);
- mat_vert.affineTransform(t, center);
- LLVector4a size;
- size.setSub(max, min);
- size.mul(0.5f);
- llassert(less_than_max_mag(min));
- llassert(less_than_max_mag(max));
+ //get 8 corners of bounding box
+ LLVector4Logical mask[6];
- if (!global_volume)
+ for (U32 i = 0; i < 6; ++i)
{
- //VECTORIZE THIS
- LLVector4a scale;
- scale.load3(mDrawablep->getVObj()->getScale().mV);
- size.mul(scale);
+ mask[i].clear();
}
- mat_normal.mMatrix[0].normalize3fast();
- mat_normal.mMatrix[1].normalize3fast();
- mat_normal.mMatrix[2].normalize3fast();
+ mask[0].setElement<2>(); //001
+ mask[1].setElement<1>(); //010
+ mask[2].setElement<1>(); //011
+ mask[2].setElement<2>();
+ mask[3].setElement<0>(); //100
+ mask[4].setElement<0>(); //101
+ mask[4].setElement<2>();
+ mask[5].setElement<0>(); //110
+ mask[5].setElement<1>();
- LLVector4a v[4];
+ LLVector4a v[8];
- //get 4 corners of bounding box
- mat_normal.rotate(size,v[0]);
+ v[6] = min;
+ v[7] = max;
- //VECTORIZE THIS
- LLVector4a scale;
-
- scale.set(-1.f, -1.f, 1.f);
- scale.mul(size);
- mat_normal.rotate(scale, v[1]);
+ for (U32 i = 0; i < 6; ++i)
+ {
+ v[i].setSelectWithMask(mask[i], min, max);
+ }
- scale.set(1.f, -1.f, -1.f);
- scale.mul(size);
- mat_normal.rotate(scale, v[2]);
+ LLVector4a tv[8];
- scale.set(-1.f, 1.f, -1.f);
- scale.mul(size);
- mat_normal.rotate(scale, v[3]);
+ //transform bounding box into drawable space
+ for (U32 i = 0; i < 8; ++i)
+ {
+ mat_vert.affineTransform(v[i], tv[i]);
+ }
+ //find bounding box
LLVector4a& newMin = mExtents[0];
LLVector4a& newMax = mExtents[1];
- newMin = newMax = center;
-
- llassert(less_than_max_mag(center));
+ newMin = newMax = tv[0];
- for (U32 i = 0; i < 4; i++)
+ for (U32 i = 1; i < 8; ++i)
{
- LLVector4a delta;
- delta.setAbs(v[i]);
- LLVector4a min;
- min.setSub(center, delta);
- LLVector4a max;
- max.setAdd(center, delta);
-
- newMin.setMin(newMin,min);
- newMax.setMax(newMax,max);
-
- llassert(less_than_max_mag(newMin));
- llassert(less_than_max_mag(newMax));
+ newMin.setMin(newMin, tv[i]);
+ newMax.setMax(newMax, tv[i]);
}
if (!mDrawablep->isActive())
- {
+ { // Shift position for region
LLVector4a offset;
offset.load3(mDrawablep->getRegion()->getOriginAgent().mV);
newMin.add(offset);
newMax.add(offset);
-
- llassert(less_than_max_mag(newMin));
- llassert(less_than_max_mag(newMax));
}
+ LLVector4a t;
t.setAdd(newMin, newMax);
t.mul(0.5f);
- llassert(less_than_max_mag(t));
-
- //VECTORIZE THIS
mCenterLocal.set(t.getF32ptr());
- llassert(less_than_max_mag(newMin));
- llassert(less_than_max_mag(newMax));
-
t.setSub(newMax,newMin);
mBoundingSphereRadius = t.getLength3().getF32()*0.5f;
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 763634a3ab..66b5f13740 100755
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -194,8 +194,7 @@ public:
void setSize(S32 numVertices, S32 num_indices = 0, bool align = false);
- BOOL genVolumeBBoxes(const LLVolume &volume, S32 f,
- const LLMatrix4& mat, BOOL global_volume = FALSE);
+ BOOL genVolumeBBoxes(const LLVolume &volume, S32 f,const LLMatrix4& mat, BOOL global_volume = FALSE);
void init(LLDrawable* drawablep, LLViewerObject* objp);
void destroy();
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 113bdd2ce3..33b26494de 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1458,7 +1458,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)
continue;
}
res &= face->genVolumeBBoxes(*volume, i,
- mRelativeXform, mRelativeXformInvTrans,
+ mRelativeXform, /*mRelativeXformInvTrans,*/
(mVolumeImpl && mVolumeImpl->isVolumeGlobal()) || force_global);
if (rebuild)
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index c4286e73eb..8be7b2ab53 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -169,6 +169,7 @@ S32 LLPipeline::RenderGlowIterations;
F32 LLPipeline::RenderGlowWidth;
F32 LLPipeline::RenderGlowStrength;
BOOL LLPipeline::RenderDepthOfField;
+BOOL LLPipeline::RenderDepthOfFieldInEditMode;
F32 LLPipeline::CameraFocusTransitionTime;
F32 LLPipeline::CameraFNumber;
F32 LLPipeline::CameraFocalLength;
@@ -379,6 +380,7 @@ BOOL LLPipeline::sWaterReflections = FALSE;
BOOL LLPipeline::sRenderGlow = FALSE;
BOOL LLPipeline::sReflectionRender = FALSE;
BOOL LLPipeline::sImpostorRender = FALSE;
+BOOL LLPipeline::sImpostorRenderAlphaDepthPass = FALSE;
BOOL LLPipeline::sUnderWaterRender = FALSE;
BOOL LLPipeline::sTextureBindTest = FALSE;
BOOL LLPipeline::sRenderFrameTest = FALSE;
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index f0bebbe20d..fbbcf8f06d 100755
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -295,7 +295,8 @@ public:
void unbindDeferredShader(LLGLSLShader& shader);
void renderDeferredLighting();
-
+ void renderDeferredLightingToRT(LLRenderTarget* target);
+
void generateWaterReflection(LLCamera& camera);
void generateSunShadow(LLCamera& camera);
void generateHighlight(LLCamera& camera);
@@ -594,6 +595,7 @@ public:
static BOOL sPickAvatar;
static BOOL sReflectionRender;
static BOOL sImpostorRender;
+ static BOOL sImpostorRenderAlphaDepthPass;
static BOOL sUnderWaterRender;
static BOOL sRenderGlow;
static BOOL sTextureBindTest;