Decouple vbo validation from LLDrawInfo. Such required vbo's to be initialized before drawinfo creation/modification, which is no longer the case with llvovolume. ('RenderDelayVBUpdate'[although removed in Singu] also fails the same assumption.)
This commit is contained in:
@@ -4462,7 +4462,7 @@ LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset,
|
||||
mAlphaMaskCutoff(0.5f),
|
||||
mDiffuseAlphaMode(0)
|
||||
{
|
||||
mVertexBuffer->validateRange(mStart, mEnd, mCount, mOffset);
|
||||
//mVertexBuffer->validateRange(mStart, mEnd, mCount, mOffset);
|
||||
|
||||
mDebugColor = (rand() << 16) + rand();
|
||||
}
|
||||
|
||||
@@ -777,6 +777,11 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
|
||||
}
|
||||
}
|
||||
|
||||
if(vertex_count > 0)
|
||||
{
|
||||
buffer->validateRange(0, vertex_count - 1, index_count, 0);
|
||||
}
|
||||
|
||||
buffer->flush();
|
||||
mFaceList.clear();
|
||||
}
|
||||
|
||||
@@ -988,6 +988,11 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
|
||||
//for alpha sorting
|
||||
facep->setDrawInfo(info);
|
||||
}
|
||||
|
||||
if(facep->getGeomCount() > 0)
|
||||
{
|
||||
buffer->validateRange(facep->getGeomIndex(), facep->getGeomCount() - 1, facep->getIndicesCount(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
mFaceList.clear();
|
||||
|
||||
@@ -4288,7 +4288,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
|
||||
draw_vec[idx]->mTextureList.resize(index+1);
|
||||
draw_vec[idx]->mTextureList[index] = tex;
|
||||
}
|
||||
draw_vec[idx]->validate();
|
||||
//draw_vec[idx]->validate();
|
||||
update_min_max(draw_vec[idx]->mExtents[0], draw_vec[idx]->mExtents[1], facep->mExtents[0]);
|
||||
update_min_max(draw_vec[idx]->mExtents[0], draw_vec[idx]->mExtents[1], facep->mExtents[1]);
|
||||
}
|
||||
@@ -4372,7 +4372,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
|
||||
draw_info->mTextureList[index] = tex;
|
||||
}
|
||||
|
||||
draw_info->validate();
|
||||
//draw_info->validate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6352,6 +6352,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
|
||||
++face_iter;
|
||||
}
|
||||
|
||||
if(index_offset > 0)
|
||||
{
|
||||
buffer->validateRange(0, index_offset - 1, indices_index, 0);
|
||||
}
|
||||
|
||||
buffer->flush();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user