From a766e26db46c7c054bae1021470dbe365f2a3cb3 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Mon, 10 Sep 2012 10:37:02 -0700 Subject: Backing out the changes contributing to DRTVWR-167 and DRTVWR-179 from the repository. --- indra/newview/llface.cpp | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 8d0664770b..373b1930f5 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -163,10 +163,16 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) mGeomCount = 0; mGeomIndex = 0; mIndicesCount = 0; - - //special value to indicate uninitialized position - mIndicesIndex = 0xFFFFFFFF; - + if (drawablep->getRenderType() == LLPipeline::RENDER_TYPE_PARTICLES || + drawablep->getRenderType() == LLPipeline::RENDER_TYPE_HUD_PARTICLES) + { //indicate to LLParticlePartition that this particle is uninitialized + mIndicesIndex = 0xFFFFFFFF; + } + else + { + mIndicesIndex = 0; + } + mIndexInTex = 0; mTexture = NULL; mTEOffset = -1; mTextureIndex = 255; @@ -201,10 +207,13 @@ void LLFace::destroy() mTexture->removeFace(this) ; } - if (isState(LLFace::PARTICLE)) + if (mDrawablep.notNull() && + (mDrawablep->getRenderType() == LLPipeline::RENDER_TYPE_PARTICLES || + mDrawablep->getRenderType() == LLPipeline::RENDER_TYPE_HUD_PARTICLES) && + mIndicesIndex != 0xFFFFFFFF) { LLVOPartGroup::freeVBSlot(getGeomIndex()/4); - clearState(LLFace::PARTICLE); + mIndicesIndex = 0xFFFFFFFF; } if (mDrawPoolp) @@ -1198,25 +1207,19 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (num_indices + (S32) mIndicesIndex > mVertexBuffer->getNumIndices()) { - if (gDebugGL) - { - llwarns << "Index buffer overflow!" << llendl; - llwarns << "Indices Count: " << mIndicesCount - << " VF Num Indices: " << num_indices - << " Indices Index: " << mIndicesIndex - << " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl; - llwarns << " Face Index: " << f - << " Pool Type: " << mPoolType << llendl; - } + llwarns << "Index buffer overflow!" << llendl; + llwarns << "Indices Count: " << mIndicesCount + << " VF Num Indices: " << num_indices + << " Indices Index: " << mIndicesIndex + << " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl; + llwarns << " Face Index: " << f + << " Pool Type: " << mPoolType << llendl; return FALSE; } if (num_vertices + mGeomIndex > mVertexBuffer->getNumVerts()) { - if (gDebugGL) - { - llwarns << "Vertex buffer overflow!" << llendl; - } + llwarns << "Vertex buffer overflow!" << llendl; return FALSE; } } @@ -1648,8 +1651,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (!do_xform) { LLFastTimer t(FTM_FACE_TEX_QUICK_NO_XFORM); - S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF; - LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, tc_size); + LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, num_vertices*2*sizeof(F32)); } else { -- cgit v1.2.3 From d52c1c1c68c7cdcb791c6fb947fade96e4ef0048 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 12 Sep 2012 16:37:13 -0400 Subject: Fixing merge conflicts related to restoring DRTVWR-167 changes --- indra/newview/llface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 indra/newview/llface.cpp (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp old mode 100644 new mode 100755 index 373b1930f5..02a8d1244f --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1651,7 +1651,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (!do_xform) { LLFastTimer t(FTM_FACE_TEX_QUICK_NO_XFORM); - LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, num_vertices*2*sizeof(F32)); + S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF; + LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, tc_size); } else { -- cgit v1.2.3 From cf98064700a736f73a6c21ce899b186919cbeb64 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 20 Sep 2012 09:48:55 -0400 Subject: reapply 52b6c9168974: MAINT-646 Factor std::set out of lloctree --- indra/newview/llface.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 02a8d1244f..eea5161538 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -163,15 +163,10 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) mGeomCount = 0; mGeomIndex = 0; mIndicesCount = 0; - if (drawablep->getRenderType() == LLPipeline::RENDER_TYPE_PARTICLES || - drawablep->getRenderType() == LLPipeline::RENDER_TYPE_HUD_PARTICLES) - { //indicate to LLParticlePartition that this particle is uninitialized - mIndicesIndex = 0xFFFFFFFF; - } - else - { - mIndicesIndex = 0; - } + + //special value to indicate uninitialized position + mIndicesIndex = 0xFFFFFFFF; + mIndexInTex = 0; mTexture = NULL; mTEOffset = -1; -- cgit v1.2.3 From b5e71964e5f2b6cfa792cc30f7f694ee7096c828 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 20 Sep 2012 10:00:56 -0400 Subject: reapply c77cea5c6e41: MAINT-646 Cleanup some warnings from previous changes. --- indra/newview/llface.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index eea5161538..2074cb6514 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1202,19 +1202,25 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (num_indices + (S32) mIndicesIndex > mVertexBuffer->getNumIndices()) { - llwarns << "Index buffer overflow!" << llendl; - llwarns << "Indices Count: " << mIndicesCount - << " VF Num Indices: " << num_indices - << " Indices Index: " << mIndicesIndex - << " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl; - llwarns << " Face Index: " << f - << " Pool Type: " << mPoolType << llendl; + if (gDebugGL) + { + llwarns << "Index buffer overflow!" << llendl; + llwarns << "Indices Count: " << mIndicesCount + << " VF Num Indices: " << num_indices + << " Indices Index: " << mIndicesIndex + << " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl; + llwarns << " Face Index: " << f + << " Pool Type: " << mPoolType << llendl; + } return FALSE; } if (num_vertices + mGeomIndex > mVertexBuffer->getNumVerts()) { - llwarns << "Vertex buffer overflow!" << llendl; + if (gDebugGL) + { + llwarns << "Vertex buffer overflow!" << llendl; + } return FALSE; } } -- cgit v1.2.3 From 7fc702dc4930445b87dc2cd1d52c0cc64295f26c Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 20 Sep 2012 10:00:58 -0400 Subject: reapply 04fdf7945708: MAINT-775 Fix for particle index pool corruption on teleport. --- indra/newview/llface.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 2074cb6514..582f06eeb0 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -202,13 +202,10 @@ void LLFace::destroy() mTexture->removeFace(this) ; } - if (mDrawablep.notNull() && - (mDrawablep->getRenderType() == LLPipeline::RENDER_TYPE_PARTICLES || - mDrawablep->getRenderType() == LLPipeline::RENDER_TYPE_HUD_PARTICLES) && - mIndicesIndex != 0xFFFFFFFF) + if (isState(LLFace::PARTICLE)) { LLVOPartGroup::freeVBSlot(getGeomIndex()/4); - mIndicesIndex = 0xFFFFFFFF; + clearState(LLFace::PARTICLE); } if (mDrawPoolp) -- cgit v1.2.3