FIRE-11745: Add particles performance fix for testing (re-add changes that got lost in one of LL's merges) default tip

Fri, 09 Jan 2015 00:47:52 +0100

author
Ansariel
date
Fri, 09 Jan 2015 00:47:52 +0100
changeset 43114
319c7155cdec
parent 43113
914e99317e51

FIRE-11745: Add particles performance fix for testing (re-add changes that got lost in one of LL's merges)

indra/newview/lldrawpoolalpha.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/lldrawpoolalpha.cpp	Thu Jan 08 22:58:19 2015 +0100
     1.2 +++ b/indra/newview/lldrawpoolalpha.cpp	Fri Jan 09 00:47:52 2015 +0100
     1.3 @@ -370,6 +370,8 @@
     1.4  
     1.5  static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_GROUP_LOOP("Alpha Group");
     1.6  static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_PUSH("Alpha Push Verts");
     1.7 +// <FS:Ansariel> LL materials support merge error
     1.8 +static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_GLOW("Alpha Glow");
     1.9  
    1.10  void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
    1.11  {
    1.12 @@ -613,13 +615,19 @@
    1.13  					(!params.mParticle || params.mHasGlow))
    1.14  					// </FS:Ansariel>
    1.15  				{
    1.16 +					// <FS:Ansariel> LL materials support merge error
    1.17 +					LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_GLOW);
    1.18 +
    1.19  					// install glow-accumulating blend mode
    1.20  					gGL.blendFunc(LLRender::BF_ZERO, LLRender::BF_ONE, // don't touch color
    1.21  						      LLRender::BF_ONE, LLRender::BF_ONE); // add to alpha (glow)
    1.22  
    1.23 -					emissive_shader->bind();
    1.24 -					
    1.25 -					params.mVertexBuffer->setBuffer((mask & ~LLVertexBuffer::MAP_COLOR) | LLVertexBuffer::MAP_EMISSIVE);
    1.26 +					// <FS:Ansariel> LL materials support merge error
    1.27 +					//emissive_shader->bind();
    1.28 +					//
    1.29 +					//params.mVertexBuffer->setBuffer((mask & ~LLVertexBuffer::MAP_COLOR) | LLVertexBuffer::MAP_EMISSIVE);
    1.30 +					params.mVertexBuffer->setBuffer(mask | LLVertexBuffer::MAP_EMISSIVE);
    1.31 +					// </FS:Ansariel>
    1.32  					
    1.33  					// do the actual drawing, again
    1.34  					params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
    1.35 @@ -628,7 +636,8 @@
    1.36  					// restore our alpha blend mode
    1.37  					gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor);
    1.38  
    1.39 -					current_shader->bind();
    1.40 +					// <FS:Ansariel> LL materials support merge error
    1.41 +					//current_shader->bind();
    1.42  				}
    1.43  			
    1.44  				if (tex_setup)

mercurial