Merge viewer-lynx

Sat, 18 Nov 2017 15:19:02 +0100

author
Ansariel
date
Sat, 18 Nov 2017 15:19:02 +0100
changeset 53498
d697a07980d0
parent 53494
279ff88e6fbc
parent 53497
40ca7118765b
child 53499
17ce34875da6

Merge viewer-lynx

indra/llrender/llvertexbuffer.cpp file | annotate | diff | revisions
indra/newview/lldrawpoolavatar.cpp file | annotate | diff | revisions
indra/newview/llvoavatar.cpp file | annotate | diff | revisions
indra/newview/llvotree.cpp file | annotate | diff | revisions
     1.1 --- a/indra/llrender/llvertexbuffer.cpp	Sun Nov 12 14:02:25 2017 +0100
     1.2 +++ b/indra/llrender/llvertexbuffer.cpp	Sat Nov 18 15:19:02 2017 +0100
     1.3 @@ -1512,10 +1512,10 @@
     1.4  	sucsess &= updateNumVerts(nverts);
     1.5  	sucsess &= updateNumIndices(nindices);
     1.6  	
     1.7 -	if (sucsess && create && (nverts || nindices))
     1.8 +	if (create && (nverts || nindices))
     1.9  	{
    1.10  		//actually allocate space for the vertex buffer if using VBO mapping
    1.11 -		flush();
    1.12 +		flush(); //unmap
    1.13  
    1.14  		if (gGLManager.mHasVertexArrayObject && useVBOs() && sUseVAO)
    1.15  		{
    1.16 @@ -1659,9 +1659,9 @@
    1.17  	sucsess &= updateNumVerts(newnverts);		
    1.18  	sucsess &= updateNumIndices(newnindices);
    1.19  	
    1.20 -	if (sucsess && useVBOs())
    1.21 +	if (useVBOs())
    1.22  	{
    1.23 -		flush();
    1.24 +		flush(); //unmap
    1.25  
    1.26  		if (mGLArray)
    1.27  		{ //if size changed, offsets changed
     2.1 --- a/indra/newview/lldrawpoolavatar.cpp	Sun Nov 12 14:02:25 2017 +0100
     2.2 +++ b/indra/newview/lldrawpoolavatar.cpp	Sat Nov 18 15:19:02 2017 +0100
     2.3 @@ -1642,7 +1642,7 @@
     2.4  			// allocate dummy triangle
     2.5  			buffer->allocateBuffer(1, 3, true);
     2.6  			memset((U8*)buffer->getMappedData(), 0, buffer->getSize());
     2.7 -			memset((U8*)buffer->getIndicesPointer(), 0, buffer->getIndicesSize());
     2.8 +			memset((U8*)buffer->getMappedIndices(), 0, buffer->getIndicesSize());
     2.9  		}
    2.10  	}
    2.11  	else
    2.12 @@ -1656,7 +1656,7 @@
    2.13  			// allocate dummy triangle
    2.14  			buffer->resizeBuffer(1, 3);
    2.15  			memset((U8*)buffer->getMappedData(), 0, buffer->getSize());
    2.16 -			memset((U8*)buffer->getIndicesPointer(), 0, buffer->getIndicesSize());
    2.17 +			memset((U8*)buffer->getMappedIndices(), 0, buffer->getIndicesSize());
    2.18  		}
    2.19  	}
    2.20  
    2.21 @@ -1772,6 +1772,14 @@
    2.22  		}
    2.23  	}
    2.24  
    2.25 +	if (buffer.isNull() ||
    2.26 +		buffer->getNumVerts() != vol_face.mNumVertices ||
    2.27 +		buffer->getNumIndices() != vol_face.mNumIndices)
    2.28 +	{
    2.29 +		// Allocation failed
    2.30 +		return;
    2.31 +	}
    2.32 +
    2.33  	if (sShaderLevel <= 0 && face->mLastSkinTime < avatar->getLastSkinTime())
    2.34  	{
    2.35  		//perform software vertex skinning for this face
     3.1 --- a/indra/newview/llvoavatar.cpp	Sun Nov 12 14:02:25 2017 +0100
     3.2 +++ b/indra/newview/llvoavatar.cpp	Sat Nov 18 15:19:02 2017 +0100
     3.3 @@ -2191,7 +2191,7 @@
     3.4  					facep->setSize(1, 3);
     3.5  					buff->allocateBuffer(1, 3, true);
     3.6  					memset((U8*) buff->getMappedData(), 0, buff->getSize());
     3.7 -					memset((U8*) buff->getIndicesPointer(), 0, buff->getIndicesSize());
     3.8 +					memset((U8*) buff->getMappedIndices(), 0, buff->getIndicesSize());
     3.9  				}
    3.10  				facep->setVertexBuffer(buff);
    3.11  			}
    3.12 @@ -2211,7 +2211,7 @@
    3.13  						facep->setSize(1, 3);
    3.14  						buff->resizeBuffer(1, 3);
    3.15  						memset((U8*) buff->getMappedData(), 0, buff->getSize());
    3.16 -						memset((U8*) buff->getIndicesPointer(), 0, buff->getIndicesSize());
    3.17 +						memset((U8*) buff->getMappedIndices(), 0, buff->getIndicesSize());
    3.18  					}
    3.19  				}
    3.20  			}
     4.1 --- a/indra/newview/llvotree.cpp	Sun Nov 12 14:02:25 2017 +0100
     4.2 +++ b/indra/newview/llvotree.cpp	Sat Nov 18 15:19:02 2017 +0100
     4.3 @@ -908,7 +908,7 @@
     4.4  			<< index_count << " indices" << LL_ENDL;
     4.5  		buff->allocateBuffer(1, 3, true);
     4.6  		memset((U8*)buff->getMappedData(), 0, buff->getSize());
     4.7 -		memset((U8*)buff->getIndicesPointer(), 0, buff->getIndicesSize());
     4.8 +		memset((U8*)buff->getMappedIndices(), 0, buff->getIndicesSize());
     4.9  		facep->setSize(1, 3);
    4.10  		facep->setVertexBuffer(buff);
    4.11  		mReferenceBuffer->flush();

mercurial