Suppress mapBuffer warnings. (#2584)

master
Dave Parks 2024-09-17 12:43:47 -05:00 committed by GitHub
parent f378d2f95a
commit 870ffbd55b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 10 additions and 75 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -729,7 +729,6 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
}
}
buffer->unmapBuffer();
mFaceList.clear();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -3731,6 +3731,7 @@ void LLPipeline::postSort(LLCamera &camera)
}
}
LLVertexBuffer::flushBuffers();
// LLSpatialGroup::sNoDelete = false;
LL_PUSH_CALLSTACKS();
}