summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldynamictexture.cpp4
-rw-r--r--indra/newview/llvoavatar.cpp18
-rw-r--r--indra/newview/llvoavatar.h2
-rw-r--r--indra/newview/llvograss.cpp1
-rw-r--r--indra/newview/llvopartgroup.cpp58
-rw-r--r--indra/newview/llvosurfacepatch.cpp1
-rw-r--r--indra/newview/pipeline.cpp1
7 files changed, 10 insertions, 75 deletions
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 0b9f76e7f6..33325e352f 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -200,8 +200,8 @@ bool LLViewerDynamicTexture::updateAllInstances()
}
llassert(preview_target.getWidth() >= LLPipeline::MAX_PREVIEW_WIDTH);
llassert(preview_target.getHeight() >= LLPipeline::MAX_PREVIEW_WIDTH);
- llassert(bake_target.getWidth() >= LLAvatarAppearanceDefines::SCRATCH_TEX_WIDTH);
- llassert(bake_target.getHeight() >= LLAvatarAppearanceDefines::SCRATCH_TEX_HEIGHT);
+ llassert(bake_target.getWidth() >= (U32) LLAvatarAppearanceDefines::SCRATCH_TEX_WIDTH);
+ llassert(bake_target.getHeight() >= (U32) LLAvatarAppearanceDefines::SCRATCH_TEX_HEIGHT);
preview_target.bindTarget();
preview_target.clear();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index ef0bb3b926..b6a2dac1e9 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2406,8 +2406,6 @@ void LLVOAvatar::updateMeshData()
{
if (mDrawable.notNull())
{
- stop_glerror();
-
S32 f_num = 0 ;
const U32 VERTEX_NUMBER_THRESHOLD = 128 ;//small number of this means each part of an avatar has its own vertex buffer.
const auto num_parts = mMeshLOD.size();
@@ -2534,7 +2532,6 @@ void LLVOAvatar::updateMeshData()
}
}
- stop_glerror();
buff->unmapBuffer();
if(!f_num)
@@ -10754,9 +10751,8 @@ void LLVOAvatar::updateRiggingInfo()
getAssociatedVolumes(volumes);
{
- LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("update rig info - get key")
- HBXXH128 hash;
-
+ LL_PROFILE_ZONE_NAMED_CATEGORY_AVATAR("update rig info - get key");
+ size_t hash = 0;
// Get current rigging info key
for (LLVOVolume* vol : volumes)
{
@@ -10765,22 +10761,20 @@ void LLVOAvatar::updateRiggingInfo()
const LLUUID& mesh_id = vol->getVolume()->getParams().getSculptID();
S32 max_lod = llmax(vol->getLOD(), vol->mLastRiggingInfoLOD);
- hash.update(mesh_id.mData, sizeof(mesh_id.mData));
- hash.update(&max_lod, sizeof(max_lod));
+ boost::hash_combine(hash, mesh_id);
+ boost::hash_combine(hash, max_lod);
}
}
- LLUUID curr_rigging_info_key = hash.digest();
-
// Check for key change, which indicates some change in volume composition or LOD.
- if (curr_rigging_info_key == mLastRiggingInfoKey)
+ if (hash == mLastRiggingInfoKey)
{
return;
}
// Something changed. Update.
- mLastRiggingInfoKey = curr_rigging_info_key;
+ mLastRiggingInfoKey = hash;
}
mJointRiggingInfoTab.clear();
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index ff1cbc34fc..dd1725c322 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -226,7 +226,7 @@ public:
// virtual
void updateRiggingInfo();
// This encodes mesh id and LOD, so we can see whether display is up-to-date.
- LLUUID mLastRiggingInfoKey;
+ size_t mLastRiggingInfoKey;
std::set<LLUUID> mActiveOverrideMeshes;
virtual void onActiveOverrideMeshesChanged();
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 67adcbb244..fdd39a0e30 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -729,7 +729,6 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
}
}
- buffer->unmapBuffer();
mFaceList.clear();
}
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 8f792c1042..ec32a79829 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -54,63 +54,6 @@ void LLVOPartGroup::initClass()
void LLVOPartGroup::restoreGL()
{
- //TODO: optimize out binormal mask here. Specular and normal coords as well.
-#if 0
- sVB = new LLVertexBuffer(VERTEX_DATA_MASK | LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2);
- U32 count = LL_MAX_PARTICLE_COUNT;
- if (!sVB->allocateBuffer(count*4, count*6))
- {
- LL_WARNS() << "Failed to allocate Vertex Buffer to "
- << count*4 << " vertices and "
- << count * 6 << " indices" << LL_ENDL;
- // we are likelly to crash at following getTexCoord0Strider(), so unref and return
- sVB = NULL;
- return;
- }
-
- //indices and texcoords are always the same, set once
- LLStrider<U16> indicesp;
-
- LLStrider<LLVector4a> verticesp;
-
- sVB->getIndexStrider(indicesp);
- sVB->getVertexStrider(verticesp);
-
- LLVector4a v;
- v.set(0,0,0,0);
-
-
- U16 vert_offset = 0;
-
- for (U32 i = 0; i < LL_MAX_PARTICLE_COUNT; i++)
- {
- *indicesp++ = vert_offset + 0;
- *indicesp++ = vert_offset + 1;
- *indicesp++ = vert_offset + 2;
-
- *indicesp++ = vert_offset + 1;
- *indicesp++ = vert_offset + 3;
- *indicesp++ = vert_offset + 2;
-
- *verticesp++ = v;
-
- vert_offset += 4;
- }
-
- LLStrider<LLVector2> texcoordsp;
- sVB->getTexCoord0Strider(texcoordsp);
-
- for (U32 i = 0; i < LL_MAX_PARTICLE_COUNT; i++)
- {
- *texcoordsp++ = LLVector2(0.f, 1.f);
- *texcoordsp++ = LLVector2(0.f, 0.f);
- *texcoordsp++ = LLVector2(1.f, 1.f);
- *texcoordsp++ = LLVector2(1.f, 0.f);
- }
-
- sVB->unmapBuffer();
-#endif
-
}
//static
@@ -955,7 +898,6 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
}
}
- buffer->unmapBuffer();
mFaceList.clear();
}
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index fdccf34e6a..294d36b0a9 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -1078,7 +1078,6 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
gen_terrain_tangents(index_offset, indices_index, vertices, normals, tangents, indices, region_width);
}
- buffer->unmapBuffer();
mFaceList.clear();
}
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 13dfd48643..33683416a2 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3731,6 +3731,7 @@ void LLPipeline::postSort(LLCamera &camera)
}
}
+ LLVertexBuffer::flushBuffers();
// LLSpatialGroup::sNoDelete = false;
LL_PUSH_CALLSTACKS();
}