MAINT-7228 Vertex buffer allocation failure handling 5.0.9-release

Thu, 16 Nov 2017 17:11:48 +0200

author
andreykproductengine <andreykproductengine@lindenlab.com>
date
Thu, 16 Nov 2017 17:11:48 +0200
changeset 53497
40ca7118765b
parent 53496
47704c90fb0d
child 53498
d697a07980d0
child 53500
752a75d40282

MAINT-7228 Vertex buffer allocation failure handling

indra/llrender/llvertexbuffer.cpp file | annotate | diff | revisions
     1.1 --- a/indra/llrender/llvertexbuffer.cpp	Tue Nov 14 19:50:17 2017 +0200
     1.2 +++ b/indra/llrender/llvertexbuffer.cpp	Thu Nov 16 17:11:48 2017 +0200
     1.3 @@ -1356,10 +1356,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 @@ -1502,9 +1502,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

mercurial