diff options
author | Dave Houlton <euclid@lindenlab.com> | 2021-11-30 12:53:17 -0700 |
---|---|---|
committer | Dave Houlton <euclid@lindenlab.com> | 2021-11-30 17:04:35 -0700 |
commit | 8b92652806ddc239e8d2627151ce2dab6faf138f (patch) | |
tree | 2f06e3ac91721088202a09402dbc3291be2cf4db /indra | |
parent | 4d6963bd812b45c713ab83d5e90367e04d3ab5b1 (diff) |
SL-16386 replace gutted LLRender::setAlphaRejectSettings() with explicit flush()
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llrender.cpp | 7 | ||||
-rw-r--r-- | indra/llrender/llrender.h | 2 | ||||
-rw-r--r-- | indra/newview/lldrawpool.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lldrawpoolsimple.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lldrawpooltree.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llface.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llnetmap.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lltoolmorph.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llworldmapview.cpp | 9 |
11 files changed, 20 insertions, 32 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 14abd9b83e..c426c769f3 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -926,7 +926,7 @@ void LLRender::refreshState(void) setColorMask(mCurrColorMask[0], mCurrColorMask[1], mCurrColorMask[2], mCurrColorMask[3]); - setAlphaRejectSettings(mCurrAlphaFunc, mCurrAlphaFuncVal); + flush(); mDirty = false; } @@ -1429,11 +1429,6 @@ void LLRender::setSceneBlendType(eBlendType type) } } -void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value) -{ - flush(); -} - void LLRender::blendFunc(eBlendFactor sfactor, eBlendFactor dfactor) { llassert(sfactor < BF_UNDEF); diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index d594c455d6..cdf4075244 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -431,8 +431,6 @@ public: void setColorMask(bool writeColorR, bool writeColorG, bool writeColorB, bool writeAlpha); void setSceneBlendType(eBlendType type); - void setAlphaRejectSettings(eCompareFunc func, F32 value = 0.01f); - // applies blend func to both color and alpha void blendFunc(eBlendFactor sfactor, eBlendFactor dfactor); // applies separate blend functions to color and alpha diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 92a9bed504..bad0c66fb1 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -493,7 +493,7 @@ void LLRenderPass::pushRiggedMaskBatches(U32 type, U32 mask, BOOL texture, BOOL } else { - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, pparams->mAlphaMaskCutoff); + gGL.flush(); } if (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash) diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index ca4e20ae9b..a1d769bc83 100644 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -591,7 +591,7 @@ void LLDrawPoolGrass::beginRenderPass(S32 pass) } else { - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); + gGL.flush(); LLGLSLShader::bindNoShader(); } } @@ -607,7 +607,7 @@ void LLDrawPoolGrass::endRenderPass(S32 pass) } else { - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.flush(); } } diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index e93852864e..c84178c6cd 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -77,7 +77,7 @@ void LLDrawPoolTree::beginRenderPass(S32 pass) else { gPipeline.enableLightsDynamic(); - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); + gGL.flush(); } } @@ -134,7 +134,7 @@ void LLDrawPoolTree::endRenderPass(S32 pass) if (mShaderLevel <= 0) { - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.flush(); } } diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 39ca7961d8..54a043482b 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -653,7 +653,7 @@ void LLFace::renderOneWireframe(const LLColor4 &color, F32 fogCfx, bool wirefram glFogf(GL_FOG_END, d*(1 + (LLViewerCamera::getInstance()->getView() / LLViewerCamera::getInstance()->getDefaultFOV()))); glFogfv(GL_FOG_COLOR, fogCol.mV); - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.flush(); { gGL.diffuseColor4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], 0.4f); renderFace(mDrawablep, this); diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 111b45612e..937f36b6fc 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -259,7 +259,7 @@ void LLNetMap::draw() gGL.end(); // Draw water - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, ABOVE_WATERLINE_ALPHA / 255.f); + gGL.flush(); { if (regionp->getLand().getWaterTexture()) { @@ -276,7 +276,7 @@ void LLNetMap::draw() gGL.end(); } } - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.flush(); } // Redraw object layer periodically diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 6f136e50e0..b3d3e9e0da 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5894,8 +5894,6 @@ void LLSelectMgr::updateSilhouettes() LLViewerObject* objectp = *iter; objectp->clearChanged(LLXform::MOVED | LLXform::SILHOUETTE); } - - //gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } void LLSelectMgr::updateSelectionSilhouette(LLObjectSelectionHandle object_handle, S32& num_sils_genned, std::vector<LLViewerObject*>& changed_objects) @@ -6620,7 +6618,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) glFogfv(GL_FOG_COLOR, fogCol.mV); LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL); - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.flush(); gGL.begin(LLRender::LINES); { gGL.color4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], 0.4f); diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index 9f0198029a..b2e8348ffd 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -244,11 +244,11 @@ BOOL LLVisualParamHint::render() { LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)gAgentAvatarp->mDrawable->getFace(0)->getPool(); LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE); - gGL.setAlphaRejectSettings(LLRender::CF_ALWAYS); + gGL.flush(); gGL.setSceneBlendType(LLRender::BT_REPLACE); avatarPoolp->renderAvatars(gAgentAvatarp); // renders only one avatar gGL.setSceneBlendType(LLRender::BT_ALPHA); - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.flush(); } gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight); mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index da856beb6e..8e4e008738 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5114,21 +5114,21 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) U32 num_indices = 0; if( isWearingWearableType( LLWearableType::WT_SKIRT ) && (isUIAvatar() || isTextureVisible(TEX_SKIRT_BAKED)) ) { - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.25f); + gGL.flush(); LLViewerJoint* skirt_mesh = getViewerJoint(MESH_ID_SKIRT); if (skirt_mesh) { num_indices += skirt_mesh->render(mAdjustedPixelArea, FALSE); } first_pass = FALSE; - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.flush(); } if (!isSelf() || gAgent.needsRenderHead() || LLPipeline::sShadowRender) { if (LLPipeline::sImpostorRender) { - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); + gGL.flush(); } if (isTextureVisible(TEX_HEAD_BAKED)) @@ -5151,7 +5151,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) } if (LLPipeline::sImpostorRender) { - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.flush(); } } @@ -5247,7 +5247,7 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel) } { LLGLEnable test(GL_ALPHA_TEST); - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f); + gGL.flush(); gGL.color4ubv(color.mV); gGL.getTexUnit(diffuse_channel)->bind(&mImpostor); diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index a6df079223..59ac4554d7 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -321,22 +321,19 @@ void LLWorldMapView::draw() // Clear the background alpha to 0 gGL.flush(); gGL.setColorMask(false, true); - gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.f); + gGL.flush(); gGL.setSceneBlendType(LLRender::BT_REPLACE); gGL.color4f(0.0f, 0.0f, 0.0f, 0.0f); gl_rect_2d(0, height, width, 0); } gGL.flush(); - - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); gGL.setColorMask(true, true); // Draw the image tiles drawMipmap(width, height); gGL.flush(); - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); gGL.setColorMask(true, true); // Draw per sim overlayed information (names, mature, offline...) @@ -480,13 +477,13 @@ void LLWorldMapView::draw() LLGLSUIDefault gls_ui; { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.f); + gGL.flush(); gGL.blendFunc(LLRender::BF_ONE_MINUS_DEST_ALPHA, LLRender::BF_DEST_ALPHA); gGL.color4fv( mBackgroundColor.mV ); gl_rect_2d(0, height, width, 0); } - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.flush(); gGL.setSceneBlendType(LLRender::BT_ALPHA); // Draw item infos if we're not zoomed out too much and there's something to draw |