No longer include llerrorlegacy.h. Updated llstl to include deletion utilites.
This commit is contained in:
@@ -486,7 +486,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "Bad client state! " << array[i] << " disabled." << llendl;
|
||||
LL_ERRS() << "Bad client state! " << array[i] << " disabled." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -505,7 +505,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "Bad client state! " << array[i] << " enabled." << llendl;
|
||||
LL_ERRS() << "Bad client state! " << array[i] << " enabled." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -571,13 +571,13 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, con
|
||||
|
||||
if( count == 0 )
|
||||
{
|
||||
llwarns << "Called drawArrays with 0 vertices" << llendl;
|
||||
LL_WARNS() << "Called drawArrays with 0 vertices" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
if( norm.size() < pos.size() )
|
||||
{
|
||||
llwarns << "Called drawArrays with #" << norm.size() << " normals and #" << pos.size() << " vertices" << llendl;
|
||||
LL_WARNS() << "Called drawArrays with #" << norm.size() << " normals and #" << pos.size() << " vertices" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -643,7 +643,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
|
||||
if (start >= (U32) mNumVerts ||
|
||||
end >= (U32) mNumVerts)
|
||||
{
|
||||
llerrs << "Bad vertex buffer draw range: [" << start << ", " << end << "] vs " << mNumVerts << llendl;
|
||||
LL_ERRS() << "Bad vertex buffer draw range: [" << start << ", " << end << "] vs " << mNumVerts << LL_ENDL;
|
||||
}
|
||||
|
||||
llassert(mNumIndices >= 0);
|
||||
@@ -651,7 +651,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
|
||||
if (indices_offset >= (U32) mNumIndices ||
|
||||
indices_offset + count > (U32) mNumIndices)
|
||||
{
|
||||
llerrs << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl;
|
||||
LL_ERRS() << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset + count << "]" << LL_ENDL;
|
||||
}
|
||||
|
||||
if (gDebugGL && !useVBOs())
|
||||
@@ -661,7 +661,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
|
||||
{
|
||||
if (idx[i] < start || idx[i] > end)
|
||||
{
|
||||
llerrs << "Index out of range: " << idx[i] << " not in [" << start << ", " << end << "]" << llendl;
|
||||
LL_ERRS() << "Index out of range: " << idx[i] << " not in [" << start << ", " << end << "]" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -679,7 +679,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
|
||||
S32 idx = (S32) (v[i][3]+0.25f);
|
||||
if (idx < 0 || idx >= shader->mFeatures.mIndexedTextureChannels)
|
||||
{
|
||||
llerrs << "Bad texture index found in vertex data stream." << llendl;
|
||||
LL_ERRS() << "Bad texture index found in vertex data stream." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -699,19 +699,19 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
|
||||
{
|
||||
if (mGLArray != sGLRenderArray)
|
||||
{
|
||||
llerrs << "Wrong vertex array bound." << llendl;
|
||||
LL_ERRS() << "Wrong vertex array bound." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mGLIndices != sGLRenderIndices)
|
||||
{
|
||||
llerrs << "Wrong index buffer bound." << llendl;
|
||||
LL_ERRS() << "Wrong index buffer bound." << LL_ENDL;
|
||||
}
|
||||
|
||||
if (mGLBuffer != sGLRenderBuffer)
|
||||
{
|
||||
llerrs << "Wrong vertex buffer bound." << llendl;
|
||||
LL_ERRS() << "Wrong vertex buffer bound." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,13 +722,13 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
|
||||
|
||||
if (elem != mGLIndices)
|
||||
{
|
||||
llerrs << "Wrong index buffer bound!" << llendl;
|
||||
LL_ERRS() << "Wrong index buffer bound!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
if (mode >= LLRender::NUM_MODES)
|
||||
{
|
||||
llerrs << "Invalid draw mode: " << mode << llendl;
|
||||
LL_ERRS() << "Invalid draw mode: " << mode << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -751,32 +751,32 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
|
||||
if (indices_offset >= (U32) mNumIndices ||
|
||||
indices_offset + count > (U32) mNumIndices)
|
||||
{
|
||||
llerrs << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl;
|
||||
LL_ERRS() << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset + count << "]" << LL_ENDL;
|
||||
}
|
||||
|
||||
if (mGLArray)
|
||||
{
|
||||
if (mGLArray != sGLRenderArray)
|
||||
{
|
||||
llerrs << "Wrong vertex array bound." << llendl;
|
||||
LL_ERRS() << "Wrong vertex array bound." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mGLIndices != sGLRenderIndices)
|
||||
{
|
||||
llerrs << "Wrong index buffer bound." << llendl;
|
||||
LL_ERRS() << "Wrong index buffer bound." << LL_ENDL;
|
||||
}
|
||||
|
||||
if (mGLBuffer != sGLRenderBuffer)
|
||||
{
|
||||
llerrs << "Wrong vertex buffer bound." << llendl;
|
||||
LL_ERRS() << "Wrong vertex buffer bound." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
if (mode >= LLRender::NUM_MODES)
|
||||
{
|
||||
llerrs << "Invalid draw mode: " << mode << llendl;
|
||||
LL_ERRS() << "Invalid draw mode: " << mode << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -798,27 +798,27 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
|
||||
if (first >= (U32) mNumVerts ||
|
||||
first + count > (U32) mNumVerts)
|
||||
{
|
||||
llerrs << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << llendl;
|
||||
LL_ERRS() << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << LL_ENDL;
|
||||
}
|
||||
|
||||
if (mGLArray)
|
||||
{
|
||||
if (mGLArray != sGLRenderArray)
|
||||
{
|
||||
llerrs << "Wrong vertex array bound." << llendl;
|
||||
LL_ERRS() << "Wrong vertex array bound." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mGLBuffer != sGLRenderBuffer || useVBOs() != sVBOActive)
|
||||
{
|
||||
llerrs << "Wrong vertex buffer bound." << llendl;
|
||||
LL_ERRS() << "Wrong vertex buffer bound." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
if (mode >= LLRender::NUM_MODES)
|
||||
{
|
||||
llerrs << "Invalid draw mode: " << mode << llendl;
|
||||
LL_ERRS() << "Invalid draw mode: " << mode << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1241,7 +1241,7 @@ void LLVertexBuffer::updateNumVerts(S32 nverts)
|
||||
|
||||
if (nverts > 65536)
|
||||
{
|
||||
llwarns << "Vertex buffer overflow!" << llendl;
|
||||
LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL;
|
||||
nverts = 65536;
|
||||
}
|
||||
|
||||
@@ -1280,7 +1280,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
|
||||
if (nverts < 0 || nindices < 0 ||
|
||||
nverts > 65536)
|
||||
{
|
||||
llwarns << "Bad vertex buffer allocation: " << nverts << " : " << nindices << llendl;
|
||||
LL_WARNS() << "Bad vertex buffer allocation: " << nverts << " : " << nindices << LL_ENDL;
|
||||
}
|
||||
|
||||
updateNumVerts(nverts);
|
||||
@@ -1474,11 +1474,11 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
|
||||
bindGLBuffer(true);
|
||||
if (mFinal)
|
||||
{
|
||||
llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl;
|
||||
LL_ERRS() << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << LL_ENDL;
|
||||
}
|
||||
if (!useVBOs() && !mMappedData && !mMappedIndexData)
|
||||
{
|
||||
llerrs << "LLVertexBuffer::mapVertexBuffer() called on unallocated buffer." << llendl;
|
||||
LL_ERRS() << "LLVertexBuffer::mapVertexBuffer() called on unallocated buffer." << LL_ENDL;
|
||||
}
|
||||
|
||||
if (useVBOs())
|
||||
@@ -1515,7 +1515,7 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
|
||||
|
||||
if (mVertexLocked && map_range)
|
||||
{
|
||||
llerrs << "Attempted to map a specific range of a buffer that was already mapped." << llendl;
|
||||
LL_ERRS() << "Attempted to map a specific range of a buffer that was already mapped." << LL_ENDL;
|
||||
}
|
||||
|
||||
if (!mVertexLocked)
|
||||
@@ -1557,7 +1557,7 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
|
||||
|
||||
if (size < mSize)
|
||||
{
|
||||
llerrs << "Invalid buffer size." << llendl;
|
||||
LL_ERRS() << "Invalid buffer size." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1606,25 +1606,25 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
|
||||
{
|
||||
//--------------------
|
||||
//print out more debug info before crash
|
||||
llinfos << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << llendl;
|
||||
LL_INFOS() << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << LL_ENDL;
|
||||
GLint size;
|
||||
glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size);
|
||||
llinfos << "GL_ARRAY_BUFFER_ARB size is " << size << llendl;
|
||||
LL_INFOS() << "GL_ARRAY_BUFFER_ARB size is " << size << LL_ENDL;
|
||||
//--------------------
|
||||
|
||||
GLint buff;
|
||||
glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff);
|
||||
if ((GLuint)buff != mGLBuffer)
|
||||
{
|
||||
llerrs << "Invalid GL vertex buffer bound: " << buff << llendl;
|
||||
LL_ERRS() << "Invalid GL vertex buffer bound: " << buff << LL_ENDL;
|
||||
}
|
||||
|
||||
|
||||
llerrs << "glMapBuffer returned NULL (no vertex data)" << llendl;
|
||||
LL_ERRS() << "glMapBuffer returned NULL (no vertex data)" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "memory allocation for vertex data failed." << llendl;
|
||||
LL_ERRS() << "memory allocation for vertex data failed." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1653,11 +1653,11 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
|
||||
bindGLIndices(true);
|
||||
if (mFinal)
|
||||
{
|
||||
llerrs << "LLVertexBuffer::mapIndexBuffer() called on a finalized buffer." << llendl;
|
||||
LL_ERRS() << "LLVertexBuffer::mapIndexBuffer() called on a finalized buffer." << LL_ENDL;
|
||||
}
|
||||
if (!useVBOs() && !mMappedData && !mMappedIndexData)
|
||||
{
|
||||
llerrs << "LLVertexBuffer::mapIndexBuffer() called on unallocated buffer." << llendl;
|
||||
LL_ERRS() << "LLVertexBuffer::mapIndexBuffer() called on unallocated buffer." << LL_ENDL;
|
||||
}
|
||||
|
||||
if (useVBOs())
|
||||
@@ -1691,7 +1691,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
|
||||
|
||||
if (mIndexLocked && map_range)
|
||||
{
|
||||
llerrs << "Attempted to map a specific range of a buffer that was already mapped." << llendl;
|
||||
LL_ERRS() << "Attempted to map a specific range of a buffer that was already mapped." << LL_ENDL;
|
||||
}
|
||||
|
||||
if (!mIndexLocked)
|
||||
@@ -1707,7 +1707,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
|
||||
|
||||
if (elem != mGLIndices)
|
||||
{
|
||||
llerrs << "Wrong index buffer bound!" << llendl;
|
||||
LL_ERRS() << "Wrong index buffer bound!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1783,14 +1783,14 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
|
||||
glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff);
|
||||
if ((GLuint)buff != mGLIndices)
|
||||
{
|
||||
llerrs << "Invalid GL index buffer bound: " << buff << llendl;
|
||||
LL_ERRS() << "Invalid GL index buffer bound: " << buff << LL_ENDL;
|
||||
}
|
||||
|
||||
llerrs << "glMapBuffer returned NULL (no index data)" << llendl;
|
||||
LL_ERRS() << "glMapBuffer returned NULL (no index data)" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "memory allocation for Index data failed. " << llendl;
|
||||
LL_ERRS() << "memory allocation for Index data failed. " << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1984,7 +1984,7 @@ template <class T,S32 type> struct VertexBufferStrider
|
||||
|
||||
if (ptr == NULL)
|
||||
{
|
||||
llwarns << "mapIndexBuffer failed!" << llendl;
|
||||
LL_WARNS() << "mapIndexBuffer failed!" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2000,7 +2000,7 @@ template <class T,S32 type> struct VertexBufferStrider
|
||||
|
||||
if (ptr == NULL)
|
||||
{
|
||||
llwarns << "mapVertexBuffer failed!" << llendl;
|
||||
LL_WARNS() << "mapVertexBuffer failed!" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2010,7 +2010,7 @@ template <class T,S32 type> struct VertexBufferStrider
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "VertexBufferStrider could not find valid vertex data." << llendl;
|
||||
LL_WARNS() << "VertexBufferStrider could not find valid vertex data." << LL_ENDL;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2117,7 +2117,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind)
|
||||
//LLFastTimer t(FTM_BIND_GL_BUFFER);
|
||||
/*if (sMapped)
|
||||
{
|
||||
llerrs << "VBO bound while another VBO mapped!" << llendl;
|
||||
LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL;
|
||||
}*/
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, mGLBuffer);
|
||||
sGLRenderBuffer = mGLBuffer;
|
||||
@@ -2148,7 +2148,7 @@ bool LLVertexBuffer::bindGLIndices(bool force_bind)
|
||||
LLFastTimer t(FTM_BIND_GL_INDICES);
|
||||
/*if (sMapped)
|
||||
{
|
||||
llerrs << "VBO bound while another VBO mapped!" << llendl;
|
||||
LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL;
|
||||
}*/
|
||||
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, mGLIndices);
|
||||
sGLRenderIndices = mGLIndices;
|
||||
@@ -2200,7 +2200,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
||||
U32 required = 1 << i;
|
||||
if ((data_mask & required) == 0)
|
||||
{
|
||||
llwarns << "Missing attribute: " << LLShaderMgr::instance()->mReservedAttribs[i] << llendl;
|
||||
LL_WARNS() << "Missing attribute: " << LLShaderMgr::instance()->mReservedAttribs[i] << LL_ENDL;
|
||||
}
|
||||
|
||||
required_mask |= required;
|
||||
@@ -2209,7 +2209,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
||||
|
||||
if ((data_mask & required_mask) != required_mask)
|
||||
{
|
||||
llerrs << "Shader consumption mismatches data provision." << llendl;
|
||||
LL_ERRS() << "Shader consumption mismatches data provision." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2241,7 +2241,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "Invalid GL vertex buffer bound: " << buff << llendl;
|
||||
LL_ERRS() << "Invalid GL vertex buffer bound: " << buff << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2256,7 +2256,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "Invalid GL index buffer bound: " << buff << llendl;
|
||||
LL_ERRS() << "Invalid GL index buffer bound: " << buff << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2332,10 +2332,10 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
|
||||
U32 mask = 1 << i;
|
||||
if (mask & data_mask && !(mask & mTypeMask))
|
||||
{ //bit set in data_mask, but not set in mTypeMask
|
||||
llwarns << "Missing required component " << vb_type_name[i] << llendl;
|
||||
LL_WARNS() << "Missing required component " << vb_type_name[i] << LL_ENDL;
|
||||
}
|
||||
}
|
||||
llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << llendl;
|
||||
LL_ERRS() << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << LL_ENDL;
|
||||
}
|
||||
|
||||
if (LLGLSLShader::sNoFixedFunction)
|
||||
|
||||
Reference in New Issue
Block a user