# Conflicts:
#	indra/newview/llpanelface.cpp
#	indra/newview/llperfstats.cpp
#	indra/newview/llperfstats.h
#	indra/newview/llviewerdisplay.cpp
master
Ansariel 2023-05-17 18:02:50 +02:00
commit 4d0ebf6143
42 changed files with 125 additions and 586 deletions

View File

@ -392,7 +392,6 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget*
// clear buffer area to ensure we don't pick up UI elements
{
gGL.flush();
LLGLDisable no_alpha(GL_ALPHA_TEST);
gAlphaMaskProgram.setMinimumAlpha(0.0f);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f( 0.f, 0.f, 0.f, 1.f );
@ -426,7 +425,6 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget*
gGL.flush();
gGL.setSceneBlendType(LLRender::BT_REPLACE);
LLGLDisable no_alpha(GL_ALPHA_TEST);
gAlphaMaskProgram.setMinimumAlpha(0.f);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@ -517,7 +515,6 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
{
// Set the alpha channel to one (clean up after previous blending)
gGL.flush();
LLGLDisable no_alpha(GL_ALPHA_TEST);
gAlphaMaskProgram.setMinimumAlpha(0.f);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f( 0.f, 0.f, 0.f, 1.f );
@ -1066,7 +1063,6 @@ void LLTexLayer::calculateTexLayerColor(const param_color_list_t &param_list, LL
BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
{
LLGLEnable color_mat(GL_COLOR_MATERIAL);
// *TODO: Is this correct?
//gPipeline.disableLights();
stop_glerror();
@ -1153,7 +1149,6 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
if( tex )
{
bool no_alpha_test = getInfo()->mWriteAllChannels;
LLGLDisable alpha_test(no_alpha_test ? GL_ALPHA_TEST : 0);
if (no_alpha_test)
{
gAlphaMaskProgram.setMinimumAlpha(0.f);
@ -1203,7 +1198,6 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
getInfo()->mStaticImageFileName.empty() &&
color_specified )
{
LLGLDisable no_alpha(GL_ALPHA_TEST);
gAlphaMaskProgram.setMinimumAlpha(0.000f);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@ -1302,7 +1296,6 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture( getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask );
if( tex )
{
LLGLSNoAlphaTest gls_no_alpha_test;
gAlphaMaskProgram.setMinimumAlpha(0.f);
gGL.getTexUnit(0)->bind(tex, TRUE);
gl_rect_2d_simple_tex( width, height );
@ -1321,7 +1314,6 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
LLGLTexture* tex = mLocalTextureObject->getImage();
if (tex)
{
LLGLSNoAlphaTest gls_no_alpha_test;
gAlphaMaskProgram.setMinimumAlpha(0.f);
gGL.getTexUnit(0)->bind(tex);
gl_rect_2d_simple_tex( width, height );
@ -1358,7 +1350,6 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
// Note: if the first param is a mulitply, multiply against the current buffer's alpha
if( !first_param || !first_param->getMultiplyBlend() )
{
LLGLDisable no_alpha(GL_ALPHA_TEST);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
// Clear the alpha
@ -1370,7 +1361,6 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
}
// Accumulate alphas
LLGLSNoAlphaTest gls_no_alpha_test;
gGL.color4f( 1.f, 1.f, 1.f, 1.f );
for (param_alpha_list_t::iterator iter = mParamAlphaList.begin(); iter != mParamAlphaList.end(); iter++)
{
@ -1393,7 +1383,6 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
LLGLTexture* tex = mLocalTextureObject->getImage();
if( tex && (tex->getComponents() == 4) )
{
LLGLSNoAlphaTest gls_no_alpha_test;
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
gGL.getTexUnit(0)->bind(tex, TRUE);
@ -1413,7 +1402,6 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
if( (tex->getComponents() == 4) || (tex->getComponents() == 1) )
{
LLGLSNoAlphaTest gls_no_alpha_test;
gGL.getTexUnit(0)->bind(tex, TRUE);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@ -1430,7 +1418,6 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
// Note: we're still using gGL.blendFunc( GL_DST_ALPHA, GL_ZERO );
if ( !is_approx_equal(layer_color.mV[VW], 1.f) )
{
LLGLDisable no_alpha(GL_ALPHA_TEST);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4fv(layer_color.mV);
gl_rect_2d_simple( width, height );

View File

@ -364,7 +364,6 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
mCachedProcessedTexture->setAddressMode(LLTexUnit::TAM_CLAMP);
}
LLGLSNoAlphaTest gls_no_alpha_test;
gGL.getTexUnit(0)->bind(mCachedProcessedTexture);
gl_rect_2d_simple_tex(width, height);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@ -381,7 +380,6 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
}
else
{
LLGLDisable no_alpha(GL_ALPHA_TEST);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f(0.f, 0.f, 0.f, effective_weight);
gl_rect_2d_simple(width, height);

View File

@ -18,7 +18,6 @@ set(llrender_SOURCE_FILES
llfontgl.cpp
llfontregistry.cpp
llgl.cpp
llgldbg.cpp
llglslshader.cpp
llgltexture.cpp
llimagegl.cpp
@ -46,7 +45,6 @@ set(llrender_HEADER_FILES
llfontbitmapcache.h
llfontregistry.h
llgl.h
llgldbg.h
llglheaders.h
llglslshader.h
llglstates.h

View File

@ -2469,32 +2469,11 @@ LLGLState::LLGLState(LLGLenum state, S32 enabled) :
mState(state), mWasEnabled(FALSE), mIsEnabled(FALSE)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
switch (state)
{
case GL_ALPHA_TEST:
case GL_NORMALIZE:
case GL_TEXTURE_GEN_R:
case GL_TEXTURE_GEN_S:
case GL_TEXTURE_GEN_T:
case GL_TEXTURE_GEN_Q:
case GL_LIGHTING:
case GL_COLOR_MATERIAL:
case GL_FOG:
case GL_LINE_STIPPLE:
case GL_POLYGON_STIPPLE:
mState = 0;
break;
}
stop_glerror();
if (mState)
{
mWasEnabled = sStateMap[state];
// we can't actually assert on this as queued changes to state are not reflected by glIsEnabled
//llassert(mWasEnabled == glIsEnabled(state));
setEnabled(enabled);
stop_glerror();
}
}
@ -2526,7 +2505,6 @@ void LLGLState::setEnabled(S32 enabled)
LLGLState::~LLGLState()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
stop_glerror();
if (mState)
{
if (gDebugGL)
@ -2559,7 +2537,6 @@ LLGLState::~LLGLState()
}
}
}
stop_glerror();
}
////////////////////////////////////////////////////////////////////////////////
@ -2936,8 +2913,7 @@ void LLGLSyncFence::wait()
}
LLGLSPipelineSkyBox::LLGLSPipelineSkyBox()
: mAlphaTest(GL_ALPHA_TEST)
, mCullFace(GL_CULL_FACE)
: mCullFace(GL_CULL_FACE)
, mSquashClip()
{
}

View File

@ -202,13 +202,13 @@ void clear_glerror();
//disable lighting for rendering hud objects
//INCORRECT USAGE
LLGLEnable lighting(GL_LIGHTING);
LLGLEnable blend(GL_BLEND);
renderHUD();
LLGLDisable lighting(GL_LIGHTING);
LLGLDisable blend(GL_BLEND);
//CORRECT USAGE
{
LLGLEnable lighting(GL_LIGHTING);
LLGLEnable blend(GL_BLEND);
renderHUD();
}
@ -216,7 +216,7 @@ void clear_glerror();
is useful:
{
LLGLEnable lighting(light_hud ? GL_LIGHTING : 0);
LLGLEnable blend(blend_hud ? GL_GL_BLEND: 0);
renderHUD();
}

View File

@ -1,223 +0,0 @@
/**
* @file llgldbg.cpp
* @brief Definitions for OpenGL debugging support
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
// This file sets some global GL parameters, and implements some
// useful functions for GL operations.
#include "linden_common.h"
#include "llgldbg.h"
#include "llgl.h"
#include "llglheaders.h"
//------------------------------------------------------------------------
// cmstr()
//------------------------------------------------------------------------
const char *cmstr(int i)
{
switch( i )
{
case GL_EMISSION: return "GL_EMISSION";
case GL_AMBIENT: return "GL_AMBIENT";
case GL_DIFFUSE: return "GL_DIFFUSE";
case GL_SPECULAR: return "GL_SPECULAR";
case GL_AMBIENT_AND_DIFFUSE: return "GL_AMBIENT_AND_DIFFUSE";
}
return "UNKNOWN";
}
//------------------------------------------------------------------------
// facestr()
//------------------------------------------------------------------------
const char *facestr(int i)
{
switch( i )
{
case GL_FRONT: return "GL_FRONT";
case GL_BACK: return "GL_BACK";
case GL_FRONT_AND_BACK: return "GL_FRONT_AND_BACK";
}
return "UNKNOWN";
}
//------------------------------------------------------------------------
// boolstr()
//------------------------------------------------------------------------
const char *boolstr(int b)
{
return b ? "GL_TRUE" : "GL_FALSE";
}
//------------------------------------------------------------------------
// fv4()
//------------------------------------------------------------------------
const char *fv4(F32 *f)
{
static char str[128];
sprintf(str, "%8.3f %8.3f %8.3f %8.3f", f[0], f[1], f[2], f[3]);
return str;
}
//------------------------------------------------------------------------
// fv3()
//------------------------------------------------------------------------
const char *fv3(F32 *f)
{
static char str[128]; /* Flawfinder: ignore */
snprintf(str, sizeof(str), "%8.3f, %8.3f, %8.3f", f[0], f[1], f[2]); /* Flawfinder: ignore */
return str;
}
//------------------------------------------------------------------------
// fv1()
//------------------------------------------------------------------------
const char *fv1(F32 *f)
{
static char str[128]; /* Flawfinder: ignore */
snprintf(str, sizeof(str), "%8.3f", f[0]); /* Flawfinder: ignore */
return str;
}
//------------------------------------------------------------------------
// llgl_dump()
//------------------------------------------------------------------------
void llgl_dump()
{
int i;
F32 fv[16];
GLboolean b;
LL_INFOS() << "==========================" << LL_ENDL;
LL_INFOS() << "OpenGL State" << LL_ENDL;
LL_INFOS() << "==========================" << LL_ENDL;
LL_INFOS() << "-----------------------------------" << LL_ENDL;
LL_INFOS() << "Current Values" << LL_ENDL;
LL_INFOS() << "-----------------------------------" << LL_ENDL;
glGetFloatv(GL_CURRENT_COLOR, fv);
LL_INFOS() << "GL_CURRENT_COLOR : " << fv4(fv) << LL_ENDL;
glGetFloatv(GL_CURRENT_NORMAL, fv);
LL_INFOS() << "GL_CURRENT_NORMAL : " << fv3(fv) << LL_ENDL;
LL_INFOS() << "-----------------------------------" << LL_ENDL;
LL_INFOS() << "Lighting" << LL_ENDL;
LL_INFOS() << "-----------------------------------" << LL_ENDL;
LL_INFOS() << "GL_LIGHTING : " << boolstr(glIsEnabled(GL_LIGHTING)) << LL_ENDL;
LL_INFOS() << "GL_COLOR_MATERIAL : " << boolstr(glIsEnabled(GL_COLOR_MATERIAL)) << LL_ENDL;
glGetIntegerv(GL_COLOR_MATERIAL_PARAMETER, (GLint*)&i);
LL_INFOS() << "GL_COLOR_MATERIAL_PARAMETER: " << cmstr(i) << LL_ENDL;
glGetIntegerv(GL_COLOR_MATERIAL_FACE, (GLint*)&i);
LL_INFOS() << "GL_COLOR_MATERIAL_FACE : " << facestr(i) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetMaterialfv(GL_FRONT, GL_AMBIENT, fv);
LL_INFOS() << "GL_AMBIENT material : " << fv4(fv) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetMaterialfv(GL_FRONT, GL_DIFFUSE, fv);
LL_INFOS() << "GL_DIFFUSE material : " << fv4(fv) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetMaterialfv(GL_FRONT, GL_SPECULAR, fv);
LL_INFOS() << "GL_SPECULAR material : " << fv4(fv) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetMaterialfv(GL_FRONT, GL_EMISSION, fv);
LL_INFOS() << "GL_EMISSION material : " << fv4(fv) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetMaterialfv(GL_FRONT, GL_SHININESS, fv);
LL_INFOS() << "GL_SHININESS material : " << fv1(fv) << LL_ENDL;
fv[0] = fv[1] = fv[2] = fv[3] = 12345.6789f;
glGetFloatv(GL_LIGHT_MODEL_AMBIENT, fv);
LL_INFOS() << "GL_LIGHT_MODEL_AMBIENT : " << fv4(fv) << LL_ENDL;
glGetBooleanv(GL_LIGHT_MODEL_LOCAL_VIEWER, &b);
LL_INFOS() << "GL_LIGHT_MODEL_LOCAL_VIEWER: " << boolstr(b) << LL_ENDL;
glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE, &b);
LL_INFOS() << "GL_LIGHT_MODEL_TWO_SIDE : " << boolstr(b) << LL_ENDL;
for (int l=0; l<8; l++)
{
b = glIsEnabled(GL_LIGHT0+l);
LL_INFOS() << "GL_LIGHT" << l << " : " << boolstr(b) << LL_ENDL;
if (!b)
continue;
glGetLightfv(GL_LIGHT0+l, GL_AMBIENT, fv);
LL_INFOS() << " GL_AMBIENT light : " << fv4(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_DIFFUSE, fv);
LL_INFOS() << " GL_DIFFUSE light : " << fv4(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_SPECULAR, fv);
LL_INFOS() << " GL_SPECULAR light : " << fv4(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_POSITION, fv);
LL_INFOS() << " GL_POSITION light : " << fv4(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_CONSTANT_ATTENUATION, fv);
LL_INFOS() << " GL_CONSTANT_ATTENUATION : " << fv1(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_QUADRATIC_ATTENUATION, fv);
LL_INFOS() << " GL_QUADRATIC_ATTENUATION : " << fv1(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_SPOT_DIRECTION, fv);
LL_INFOS() << " GL_SPOT_DIRECTION : " << fv4(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_SPOT_EXPONENT, fv);
LL_INFOS() << " GL_SPOT_EXPONENT : " << fv1(fv) << LL_ENDL;
glGetLightfv(GL_LIGHT0+l, GL_SPOT_CUTOFF, fv);
LL_INFOS() << " GL_SPOT_CUTOFF : " << fv1(fv) << LL_ENDL;
}
LL_INFOS() << "-----------------------------------" << LL_ENDL;
LL_INFOS() << "Pixel Operations" << LL_ENDL;
LL_INFOS() << "-----------------------------------" << LL_ENDL;
LL_INFOS() << "GL_ALPHA_TEST : " << boolstr(glIsEnabled(GL_ALPHA_TEST)) << LL_ENDL;
LL_INFOS() << "GL_DEPTH_TEST : " << boolstr(glIsEnabled(GL_DEPTH_TEST)) << LL_ENDL;
glGetBooleanv(GL_DEPTH_WRITEMASK, &b);
LL_INFOS() << "GL_DEPTH_WRITEMASK : " << boolstr(b) << LL_ENDL;
LL_INFOS() << "GL_BLEND : " << boolstr(glIsEnabled(GL_BLEND)) << LL_ENDL;
LL_INFOS() << "GL_DITHER : " << boolstr(glIsEnabled(GL_DITHER)) << LL_ENDL;
}
// End

View File

@ -1,34 +0,0 @@
/**
* @file llgldbg.h
* @brief Definitions for OpenGL debugging support
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_LLGLDBG_H
#define LL_LLGLDBG_H
// Dumps the current OpenGL state to the console.
void llgl_dump();
#endif // LL_LLGLDBG_H

View File

@ -89,7 +89,6 @@ LLShaderFeatures::LLShaderFeatures()
, isAlphaLighting(false)
, isSpecular(false)
, hasWaterFog(false)
, hasTransport(false)
, hasSkinning(false)
, hasObjectSkinning(false)
, hasAtmospherics(false)

View File

@ -56,77 +56,44 @@ private:
class LLGLSDefault
{
protected:
LLGLEnable mColorMaterial;
LLGLDisable mAlphaTest, mBlend, mCullFace, mDither,
mLineSmooth, mLineStipple, mNormalize, mPolygonSmooth,
mGLMultisample;
LLGLDisable mBlend, mCullFace;
public:
LLGLSDefault()
:
// Enable
mColorMaterial(GL_COLOR_MATERIAL),
// Disable
mAlphaTest(GL_ALPHA_TEST),
mBlend(GL_BLEND),
mCullFace(GL_CULL_FACE),
mDither(GL_DITHER),
mLineSmooth(GL_LINE_SMOOTH),
mLineStipple(GL_LINE_STIPPLE),
mNormalize(GL_NORMALIZE),
mPolygonSmooth(GL_POLYGON_SMOOTH),
mGLMultisample(GL_MULTISAMPLE)
mCullFace(GL_CULL_FACE)
{ }
};
class LLGLSObjectSelect
{
protected:
LLGLDisable mBlend, mAlphaTest;
LLGLDisable mBlend;
LLGLEnable mCullFace;
public:
LLGLSObjectSelect()
: mBlend(GL_BLEND),
mAlphaTest(GL_ALPHA_TEST),
mCullFace(GL_CULL_FACE)
{ }
};
class LLGLSObjectSelectAlpha
{
protected:
LLGLEnable mAlphaTest;
public:
LLGLSObjectSelectAlpha()
: mAlphaTest(GL_ALPHA_TEST)
{}
};
//----------------------------------------------------------------------------
class LLGLSUIDefault
{
protected:
LLGLEnable mBlend, mAlphaTest;
LLGLEnable mBlend;
LLGLDisable mCullFace;
LLGLDepthTest mDepthTest;
public:
LLGLSUIDefault()
: mBlend(GL_BLEND), mAlphaTest(GL_ALPHA_TEST),
: mBlend(GL_BLEND),
mCullFace(GL_CULL_FACE),
mDepthTest(GL_FALSE, GL_TRUE, GL_LEQUAL)
{}
};
class LLGLSNoAlphaTest // : public LLGLSUIDefault
{
protected:
LLGLDisable mAlphaTest;
public:
LLGLSNoAlphaTest()
: mAlphaTest(GL_ALPHA_TEST)
{}
};
//----------------------------------------------------------------------------
class LLGLSPipeline
@ -144,11 +111,10 @@ public:
class LLGLSPipelineAlpha // : public LLGLSPipeline
{
protected:
LLGLEnable mBlend, mAlphaTest;
LLGLEnable mBlend;
public:
LLGLSPipelineAlpha()
: mBlend(GL_BLEND),
mAlphaTest(GL_ALPHA_TEST)
: mBlend(GL_BLEND)
{ }
};
@ -162,20 +128,9 @@ public:
{}
};
class LLGLSPipelineAvatar
{
protected:
LLGLEnable mNormalize;
public:
LLGLSPipelineAvatar()
: mNormalize(GL_NORMALIZE)
{}
};
class LLGLSPipelineSkyBox
{
protected:
LLGLDisable mAlphaTest;
LLGLDisable mCullFace;
LLGLSquashToFarClip mSquashClip;
public:
@ -201,13 +156,11 @@ public:
class LLGLSTracker
{
protected:
LLGLEnable mCullFace, mBlend, mAlphaTest;
LLGLEnable mCullFace, mBlend;
public:
LLGLSTracker() :
mCullFace(GL_CULL_FACE),
mBlend(GL_BLEND),
mAlphaTest(GL_ALPHA_TEST)
mBlend(GL_BLEND)
{ }
};

View File

@ -899,11 +899,8 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
}
}
void gl_stippled_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& color, F32 phase )
void gl_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& color)
{
// Stippled line
LLGLEnable stipple(GL_LINE_STIPPLE);
gGL.color4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], color.mV[VALPHA]);
gGL.flush();

View File

@ -79,7 +79,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLTexture* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), bool scale_inner = true);
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), const LLRectf& scale_rect = LLRectf(0.f, 1.f, 1.f, 0.f), bool scale_inner = true);
void gl_stippled_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& color, F32 phase = 0.f );
void gl_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& color);
void gl_rect_2d_simple_tex( S32 width, S32 height );

View File

@ -276,7 +276,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
}
}
if (features->hasAtmospherics || features->isDeferred || features->hasTransport)
if (features->hasAtmospherics || features->isDeferred)
{
if (!shader->attachFragmentObject("windlight/atmosphericsFuncs.glsl")) {
return FALSE;
@ -288,14 +288,6 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
}
}
if (features->hasTransport)
{
if (!shader->attachFragmentObject("windlight/transportF.glsl"))
{
return FALSE;
}
}
// NOTE order of shader object attaching is VERY IMPORTANT!!!
if (features->hasWaterFog)
{

View File

@ -715,6 +715,16 @@ bool LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
}
}
LLVector4a* v = (LLVector4a*)mMappedData;
for (U32 i = start; i <= end; ++i)
{
if (!v->isFinite3())
{
LL_ERRS() << "Non-finite vertex position data detected." << LL_ENDL;
}
}
LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
if (shader && shader->mFeatures.mIndexedTextureChannels > 1)

View File

@ -29,8 +29,6 @@
out vec4 frag_color;
vec3 fullbrightAtmosTransport(vec3 light);
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;

View File

@ -45,7 +45,8 @@ vec3 srgb_to_linear(vec3 cs);
vec3 legacy_adjust_fullbright(vec3 c);
vec3 legacy_adjust(vec3 c);
vec3 linear_to_srgb(vec3 cl);
vec3 fullbrightAtmosTransport(vec3 light);
vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten);
void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao);
#ifdef HAS_ALPHA_MASK
uniform float minimum_alpha;
@ -79,8 +80,18 @@ void main()
color.rgb *= vertex_color.rgb;
#ifdef WATER_FOG
vec3 pos = vary_position;
#ifndef IS_HUD
vec3 sunlit;
vec3 amblit;
vec3 additive;
vec3 atten;
calcAtmosphericVars(pos.xyz, vec3(0), 1.0, sunlit, amblit, additive, atten, false);
#endif
#ifdef WATER_FOG
vec4 fogged = applyWaterFogView(pos, vec4(color.rgb, final_alpha));
color.rgb = fogged.rgb;
color.a = fogged.a;
@ -92,7 +103,7 @@ void main()
color.rgb = legacy_adjust(color.rgb);
color.rgb = srgb_to_linear(color.rgb);
color.rgb = legacy_adjust_fullbright(color.rgb);
color.rgb = fullbrightAtmosTransport(color.rgb);
color.rgb = atmosFragLighting(color.rgb, additive, atten);
#endif
frag_color = max(color, vec4(0));

View File

@ -23,8 +23,6 @@
* $/LicenseInfo$
*/
/*[EXTRA_CODE_HERE]*/
out vec4 frag_color;
void main()

View File

@ -125,6 +125,6 @@ vec3 legacy_adjust(vec3 c)
vec3 legacy_adjust_fullbright(vec3 c)
{
float exp_scale = texture(exposureMap, vec2(0.5, 0.5)).r;
return c / exp_scale * 1.34;
return c / exp_scale * 1.34; //magic 1.34 arrived at by binary search for a value that reproduces midpoint grey consistenty
}

View File

@ -1,60 +0,0 @@
/**
* @file class2\wl\transportF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2007, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
//////////////////////////////////////////////////////////
// The fragment shader for the terrain atmospherics
//////////////////////////////////////////////////////////
vec3 getAdditiveColor();
vec3 getAtmosAttenuation();
vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten);
// the below implementations are deprecated but remain here as adapters for shaders that haven't been refactored yet
vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
return atmosFragLighting(light, additive, atten);
}
vec3 atmosTransport(vec3 light)
{
return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
}
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
return atmosTransportFrag(light, additive, atten);
}
vec3 fullbrightAtmosTransport(vec3 light)
{
return atmosTransport(light);
}
vec3 fullbrightShinyAtmosTransport(vec3 light)
{
return atmosTransport(light);
}

View File

@ -43,8 +43,9 @@ VARYING vec3 vary_position;
uniform samplerCube environmentMap;
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten);
vec3 legacy_adjust_fullbright(vec3 c);
vec3 legacy_adjust(vec3 c);
void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao);
vec3 linear_to_srgb(vec3 c);
@ -84,10 +85,13 @@ void main()
vec3 norm = normalize(vary_texcoord1.xyz);
vec4 spec = vec4(0,0,0,0);
sampleReflectionProbesLegacy(ambenv, glossenv, legacyenv, vec2(0), pos.xyz, norm.xyz, spec.a, env_intensity);
applyLegacyEnv(color.rgb, legacyenv, spec, pos, norm, env_intensity);
color.rgb = legacy_adjust(color.rgb);
color.rgb = srgb_to_linear(color.rgb);
color.rgb = fullbrightAtmosTransportFrag(color.rgb, additive, atten);
color.rgb = legacy_adjust_fullbright(color.rgb);
applyLegacyEnv(color.rgb, legacyenv, spec, pos, norm, env_intensity);
color.rgb = atmosFragLighting(color.rgb, additive, atten);
#endif
color.a = 1.0;

View File

@ -2575,6 +2575,10 @@ bool LLAppViewer::initThreads()
LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(),
enable_threads && true,
app_metrics_qa_mode);
// general task background thread (LLPerfStats, etc)
LLAppViewer::instance()->initGeneralThread();
LLAppViewer::sPurgeDiskCacheThread = new LLPurgeDiskCacheThread();
if (LLTrace::BlockTimer::sLog || LLTrace::BlockTimer::sMetricLog)
@ -6524,6 +6528,8 @@ void LLAppViewer::pauseMainloopTimeout()
void LLAppViewer::pingMainloopTimeout( char const* state, F32 secs)
// </FS:ND>
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;
if(mMainloopTimeout)
{
if(secs < 0.0f)

View File

@ -139,12 +139,6 @@ static void prepare_alpha_shader(LLGLSLShader* shader, bool textureGamma, bool d
shader->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f);
}
S32 channel = shader->enableTexture(LLShaderMgr::EXPOSURE_MAP);
if (channel > -1)
{
gGL.getTexUnit(channel)->bind(&gPipeline.mExposureMap);
}
//also prepare rigged variant
if (shader->mRiggedVariant && shader->mRiggedVariant != shader)
{
@ -782,7 +776,6 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
target_shader = fullbright_shader;
}
if (params.mAvatar != nullptr)
{
target_shader = target_shader->mRiggedVariant;
@ -792,6 +785,15 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
{// If we need shaders, and we're not ALREADY using the proper shader, then bind it
// (this way we won't rebind shaders unnecessarily).
gPipeline.bindDeferredShaderFast(*target_shader);
if (params.mFullbright)
{ // make sure the bind the exposure map for fullbright shaders so they can cancel out exposure
S32 channel = target_shader->enableTexture(LLShaderMgr::EXPOSURE_MAP);
if (channel > -1)
{
gGL.getTexUnit(channel)->bind(&gPipeline.mExposureMap);
}
}
}
LLVector4 spec_color(1, 1, 1, 1);

View File

@ -302,13 +302,20 @@ void LLDrawPoolBump::beginFullbrightShiny()
{
shader = &gHUDFullbrightShinyProgram;
}
if (mRigged)
{
llassert(shader->mRiggedVariant);
shader = shader->mRiggedVariant;
}
// bind exposure map so fullbright shader can cancel out exposure
S32 channel = shader->enableTexture(LLShaderMgr::EXPOSURE_MAP);
if (channel > -1)
{
gGL.getTexUnit(channel)->bind(&gPipeline.mExposureMap);
}
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
if (cube_map && !LLPipeline::sReflectionProbesEnabled)

View File

@ -79,7 +79,6 @@ void LLDrawPoolGlow::renderPostDeferred(S32 pass)
LLGLSLShader* shader = &gDeferredEmissiveProgram;
LLGLEnable blend(GL_BLEND);
LLGLDisable test(GL_ALPHA_TEST);
gGL.flush();
/// Get rid of z-fighting with non-glow pass.
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
@ -132,7 +131,6 @@ void LLDrawPoolSimple::renderDeferred(S32 pass)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE_DEFERRED);
LLGLDisable blend(GL_BLEND);
LLGLDisable alpha_test(GL_ALPHA_TEST);
//render static
setup_simple_shader(&gDeferredDiffuseProgram);

View File

@ -71,7 +71,6 @@ void LLDrawPoolTree::renderDeferred(S32 pass)
return;
}
LLGLState test(GL_ALPHA_TEST, 0);
// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
if( (LLPipeline::sRenderTextures) )

View File

@ -388,7 +388,6 @@ void LLFloaterImagePreview::draw()
if (selected <= 0)
{
gl_rect_2d_checkerboard(mPreviewRect);
LLGLDisable gls_alpha(GL_ALPHA_TEST);
if(mImagep.notNull())
{

View File

@ -258,7 +258,6 @@ void LLHUDNameTag::renderText(BOOL for_select)
}
LLGLState gls_blend(GL_BLEND, for_select ? FALSE : TRUE);
LLGLState gls_alpha(GL_ALPHA_TEST, for_select ? FALSE : TRUE);
LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f);
F32 alpha_factor = 1.f;

View File

@ -124,7 +124,6 @@ void LLHUDText::renderText()
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
LLGLState gls_blend(GL_BLEND, TRUE);
LLGLState gls_alpha(GL_ALPHA_TEST, TRUE);
LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f);
F32 alpha_factor = 1.f;
@ -616,7 +615,6 @@ void LLHUDText::renderAllHUD()
LLGLState::checkStates();
{
LLGLEnable color_mat(GL_COLOR_MATERIAL);
LLGLDepthTest depth(GL_FALSE, GL_FALSE);
VisibleTextObjectIterator text_it;

View File

@ -118,7 +118,6 @@ void LLManipRotate::render()
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep);
LLGLDepthTest gls_depth(GL_TRUE);
LLGLEnable gl_blend(GL_BLEND);
LLGLEnable gls_alpha_test(GL_ALPHA_TEST);
// You can rotate if you can move
LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(TRUE);

View File

@ -224,7 +224,6 @@ void LLManipScale::render()
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDepthTest gls_depth(GL_TRUE);
LLGLEnable gl_blend(GL_BLEND);
LLGLEnable gls_alpha_test(GL_ALPHA_TEST);
LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection();
if( canAffectSelection() )
@ -1357,11 +1356,11 @@ void LLManipScale::renderGuidelinesPart( const LLBBox& bbox )
{
LLGLDepthTest gls_depth(GL_TRUE);
gl_stippled_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.5f) );
gl_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.5f) );
}
{
LLGLDepthTest gls_depth(GL_FALSE);
gl_stippled_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.25f) );
gl_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.25f) );
}
}

View File

@ -1564,7 +1564,6 @@ void LLManipTranslate::renderSnapGuides()
}
{
LLGLDisable alpha_test(GL_ALPHA_TEST);
//draw black overlay
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
renderGrid(u,v,tiles,0.0f, 0.0f, 0.0f,a*0.16f);
@ -1585,7 +1584,6 @@ void LLManipTranslate::renderSnapGuides()
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GREATER);
LLGLEnable stipple(GL_LINE_STIPPLE);
gGL.flush();
switch (mManipPart)
@ -2211,7 +2209,6 @@ void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLEnable gls_blend(GL_BLEND);
LLGLEnable gls_color_material(GL_COLOR_MATERIAL);
for (S32 pass = 1; pass <= 2; pass++)
{

View File

@ -4145,7 +4145,7 @@ BOOL LLModelPreview::render()
S32 width = getWidth();
S32 height = getHeight();
LLGLSUIDefault def; // GL_BLEND, GL_ALPHA_TEST, GL_CULL_FACE, depth test
LLGLSUIDefault def;
LLGLDisable no_blend(GL_BLEND);
LLGLEnable cull(GL_CULL_FACE);
LLGLDepthTest depth(GL_FALSE); // SL-12781 disable z-buffer to render background color
@ -4379,8 +4379,6 @@ BOOL LLModelPreview::render()
gGL.pushMatrix();
gGL.color4fv(edge_col().mV); // <FS:Beq/> restore changes removed by the lab
LLGLEnable normalize(GL_NORMALIZE);
if (!mBaseModel.empty() && mVertexBuffer[5].empty())
{
genBuffers(-1, skin_weight);

View File

@ -1677,6 +1677,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
check_fullbright->setValue((S32)(fullbright_flag != 0));
check_fullbright->setEnabled(editable && !has_pbr_material);
check_fullbright->setTentative(!identical_fullbright);
getChild<LLComboBox>("combobox matmedia")->setEnabledByValue("Materials", !has_pbr_material);
}
// Repeats per meter

View File

@ -156,7 +156,7 @@ namespace LLPerfStats
resetChanges();
}
StatsRecorder::StatsRecorder():q(1024*16)
StatsRecorder::StatsRecorder()
{
// create a queue
tunables.initialiseFromSettings();
@ -304,27 +304,6 @@ namespace LLPerfStats
sTotalAvatarTime = LLVOAvatar::getTotalGPURenderTime();
sAverageAvatarTime = LLVOAvatar::getAverageGPURenderTime();
sMaxAvatarTime = LLVOAvatar::getMaxGPURenderTime();
auto general = LL::WorkQueue::getInstance("General");
if (general)
{
general->post([] { StatsRecorder::update(); });
}
}
// called once per main loop iteration on General thread
void StatsRecorder::update()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
StatsRecord upd;
auto& instance{ StatsRecorder::getInstance() };
//while (enabled() && !LLApp::isQuitting() && instance.q.tryPop(upd))
while (enabled() && !LLApp::isQuitting() && instance.q.try_dequeue(upd))
{
instance.processUpdate(upd);
}
}
//static

View File

@ -184,15 +184,7 @@ namespace LLPerfStats
extern Tunables tunables;
class StatsRecorder{
// <FS:Beq> we don't want to be using lock based queues
// using Queue = LLThreadSafeQueue<StatsRecord>;
using Queue = moodycamel::BlockingConcurrentQueue<StatsRecord>;
// </FS:Beq>
public:
// called once per main loop iteration on General thread
static void update();
static inline StatsRecorder& getInstance()
{
static StatsRecorder instance;
@ -201,14 +193,25 @@ namespace LLPerfStats
static inline void setFocusAv(const LLUUID& avID){focusAv = avID;};
static inline const LLUUID& getFocusAv(){return focusAv;};
static inline void setAutotuneInit(){autotuneInit = true;};
// <FS:Beq> We do not want to use lock based queues
// static inline void send(StatsRecord && upd){StatsRecorder::getInstance().q.pushFront(std::move(upd));};
// static void endFrame(){StatsRecorder::getInstance().q.pushFront(StatsRecord{StatType_t::RENDER_DONE, ObjType_t::OT_GENERAL, LLUUID::null, LLUUID::null, 0});};
// static void clearStats(){StatsRecorder::getInstance().q.pushFront(StatsRecord{StatType_t::RENDER_DONE, ObjType_t::OT_GENERAL, LLUUID::null, LLUUID::null, 1});};
static inline void send(StatsRecord && upd){StatsRecorder::getInstance().q.enqueue(std::move(upd));};
static void endFrame(){StatsRecorder::getInstance().q.enqueue(StatsRecord{StatType_t::RENDER_DONE, ObjType_t::OT_GENERAL, LLUUID::null, LLUUID::null, 0});};
static void clearStats(){StatsRecorder::getInstance().q.enqueue(StatsRecord{StatType_t::RENDER_DONE, ObjType_t::OT_GENERAL, LLUUID::null, LLUUID::null, 1});};
// </FS:Beq>
static inline void send(StatsRecord && upd)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
StatsRecorder::getInstance().processUpdate(upd);
}
static void endFrame()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
StatsRecorder::getInstance().processUpdate(StatsRecord{StatType_t::RENDER_DONE, ObjType_t::OT_GENERAL, LLUUID::null, LLUUID::null, 0});
}
static void clearStats()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
StatsRecorder::getInstance().processUpdate(StatsRecord{StatType_t::RENDER_DONE, ObjType_t::OT_GENERAL, LLUUID::null, LLUUID::null, 1});
}
static inline void setEnabled(bool on_or_off){collectionEnabled=on_or_off;};
static inline void enable() { collectionEnabled=true; };
static inline void disable() { collectionEnabled=false; };
@ -320,8 +323,6 @@ namespace LLPerfStats
static void toggleBuffer();
static void clearStatsBuffers();
Queue q;
~StatsRecorder() = default;
StatsRecorder(const StatsRecorder&) = delete;
StatsRecorder& operator=(const StatsRecorder&) = delete;
@ -344,8 +345,7 @@ namespace LLPerfStats
stat{type, ObjTypeDiscriminator, std::move(av), std::move(id), 0, isRiggedAtt, isHUDAtt}
{
// <FS:Beq> extra profiling coverage tracking
// LL_PROFILE_ZONE_COLOR(tracy::Color::Orange);
LL_PROFILE_ZONE_COLOR(tracy::Color::Orange);
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
#ifdef USAGE_TRACKING
if(stat.objType == LLPerfStats::ObjType_t::OT_ATTACHMENT)
{
@ -396,8 +396,6 @@ namespace LLPerfStats
return;
}
//LL_PROFILE_ZONE_COLOR(tracy::Color::Red);
// <FS:Beq> extra profiling coverage tracking
#ifdef USAGE_TRACKING
--LLPerfStats::inUse;

View File

@ -6493,9 +6493,6 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
auto renderMeshSelection_f = [fogCfx, wireframe_selection](LLSelectNode* node, LLViewerObject* objectp, LLColor4 hlColor)
{
//Need to because crash on ATI 3800 (and similar cards) MAINT-5018
LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
if (shader)

View File

@ -2272,9 +2272,6 @@ bool idle_startup()
gAgentCamera.resetCamera();
display_startup();
// start up the ThreadPool we'll use for textures et al.
LLAppViewer::instance()->initGeneralThread();
// Initialize global class data needed for surfaces (i.e. textures)
LL_DEBUGS("AppInit") << "Initializing sky..." << LL_ENDL;
// Initialize all of the viewer object classes for the first time (doing things like texture fetches.

View File

@ -625,7 +625,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
LLVector3 pos_agent = gAgent.getPosAgentFromGlobal(pos_global);
LLVector3d pos_agent_3d = gAgent.getPositionGlobal(); // <FS:CR> FIRE-8234
LLGLSTracker gls_tracker; // default+ CULL_FACE + LIGHTING + GL_BLEND + GL_ALPHA_TEST
LLGLSTracker gls_tracker;
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDisable cull_face(GL_CULL_FACE);
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);

View File

@ -271,9 +271,10 @@ void display_stats()
// Paint the display!
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLPerfStats::RecordSceneTime T (LLPerfStats::StatType_t::RENDER_DISPLAY); // render time capture - This is the main stat for overall rendering.
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("Render");
LLPerfStats::RecordSceneTime T (LLPerfStats::StatType_t::RENDER_DISPLAY); // render time capture - This is the main stat for overall rendering.
LLViewerCamera& camera = LLViewerCamera::instance(); // <FS:Ansariel> Factor out calls to getInstance
if (gWindowResized)

View File

@ -39,7 +39,6 @@
#include "lldrawpoolbump.h"
#include "lldynamictexture.h"
#include "llface.h"
#include "llgldbg.h"
#include "llglheaders.h"
#include "llviewertexlayer.h"
#include "llviewercamera.h"

View File

@ -738,7 +738,6 @@ std::string LLViewerShaderMgr::loadBasicShaders()
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/gammaF.glsl", mShaderLevel[SHADER_WINDLIGHT]) );
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsFuncs.glsl", mShaderLevel[SHADER_WINDLIGHT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsF.glsl", mShaderLevel[SHADER_WINDLIGHT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/transportF.glsl", mShaderLevel[SHADER_WINDLIGHT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "environment/waterFogF.glsl", mShaderLevel[SHADER_WATER] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "environment/encodeNormF.glsl", mShaderLevel[SHADER_ENVIRONMENT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "environment/srgbF.glsl", mShaderLevel[SHADER_ENVIRONMENT] ) );
@ -794,8 +793,7 @@ BOOL LLViewerShaderMgr::loadShadersWater()
gWaterProgram.mFeatures.hasAtmospherics = true;
gWaterProgram.mFeatures.hasWaterFog = true;
gWaterProgram.mFeatures.hasGamma = true;
gWaterProgram.mFeatures.hasTransport = true;
gWaterProgram.mFeatures.hasSrgb = true;
gWaterProgram.mFeatures.hasSrgb = true;
gWaterProgram.mFeatures.hasReflectionProbes = true;
gWaterProgram.mFeatures.hasShadows = use_sun_shadow;
gWaterProgram.mShaderFiles.clear();
@ -826,8 +824,7 @@ BOOL LLViewerShaderMgr::loadShadersWater()
gWaterEdgeProgram.mFeatures.hasAtmospherics = true;
gWaterEdgeProgram.mFeatures.hasWaterFog = true;
gWaterEdgeProgram.mFeatures.hasGamma = true;
gWaterEdgeProgram.mFeatures.hasTransport = true;
gWaterEdgeProgram.mFeatures.hasSrgb = true;
gWaterEdgeProgram.mFeatures.hasSrgb = true;
gWaterEdgeProgram.mFeatures.hasReflectionProbes = true;
gWaterEdgeProgram.mFeatures.hasShadows = use_sun_shadow;
gWaterEdgeProgram.mShaderFiles.clear();
@ -1221,7 +1218,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
bool has_skin = i & 0x10;
gDeferredMaterialProgram[i].mFeatures.hasSrgb = true;
gDeferredMaterialProgram[i].mFeatures.hasTransport = true;
gDeferredMaterialProgram[i].mFeatures.encodesNormal = true;
gDeferredMaterialProgram[i].mFeatures.calculatesAtmospherics = true;
gDeferredMaterialProgram[i].mFeatures.hasAtmospherics = true;
@ -1318,7 +1314,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredMaterialWaterProgram[i].mFeatures.hasAtmospherics = true;
gDeferredMaterialWaterProgram[i].mFeatures.hasGamma = true;
gDeferredMaterialWaterProgram[i].mFeatures.hasTransport = true;
gDeferredMaterialWaterProgram[i].mFeatures.hasShadows = use_sun_shadow;
if (has_skin)
@ -1417,7 +1412,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader->mFeatures.calculatesAtmospherics = true;
shader->mFeatures.hasAtmospherics = true;
shader->mFeatures.hasGamma = true;
shader->mFeatures.hasTransport = true;
shader->mFeatures.hasShadows = use_sun_shadow;
shader->mFeatures.isDeferred = true; // include deferredUtils
shader->mFeatures.hasReflectionProbes = mShaderLevel[SHADER_DEFERRED];
@ -1732,7 +1726,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader->mFeatures.calculatesAtmospherics = true;
shader->mFeatures.hasAtmospherics = true;
shader->mFeatures.hasGamma = true;
shader->mFeatures.hasTransport = true;
shader->mFeatures.hasShadows = use_sun_shadow;
shader->mFeatures.hasReflectionProbes = true;
shader->mFeatures.hasWaterFog = true;
@ -1871,7 +1864,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader[i]->mFeatures.calculatesAtmospherics = true;
shader[i]->mFeatures.hasAtmospherics = true;
shader[i]->mFeatures.hasGamma = true;
shader[i]->mFeatures.hasTransport = true;
shader[i]->mFeatures.hasShadows = use_sun_shadow;
shader[i]->mFeatures.hasReflectionProbes = true;
shader[i]->mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
@ -1930,7 +1922,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarEyesProgram.mName = "Deferred Avatar Eyes Shader";
gDeferredAvatarEyesProgram.mFeatures.calculatesAtmospherics = true;
gDeferredAvatarEyesProgram.mFeatures.hasGamma = true;
gDeferredAvatarEyesProgram.mFeatures.hasTransport = true;
gDeferredAvatarEyesProgram.mFeatures.hasAtmospherics = true;
gDeferredAvatarEyesProgram.mFeatures.disableTextureIndex = true;
gDeferredAvatarEyesProgram.mFeatures.hasSrgb = true;
gDeferredAvatarEyesProgram.mFeatures.encodesNormal = true;
@ -1949,7 +1941,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightProgram.mName = "Deferred Fullbright Shader";
gDeferredFullbrightProgram.mFeatures.calculatesAtmospherics = true;
gDeferredFullbrightProgram.mFeatures.hasGamma = true;
gDeferredFullbrightProgram.mFeatures.hasTransport = true;
gDeferredFullbrightProgram.mFeatures.hasAtmospherics = true;
gDeferredFullbrightProgram.mFeatures.hasSrgb = true;
gDeferredFullbrightProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gDeferredFullbrightProgram.mShaderFiles.clear();
@ -1966,7 +1958,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gHUDFullbrightProgram.mName = "HUD Fullbright Shader";
gHUDFullbrightProgram.mFeatures.calculatesAtmospherics = true;
gHUDFullbrightProgram.mFeatures.hasGamma = true;
gHUDFullbrightProgram.mFeatures.hasTransport = true;
gHUDFullbrightProgram.mFeatures.hasAtmospherics = true;
gHUDFullbrightProgram.mFeatures.hasSrgb = true;
gHUDFullbrightProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gHUDFullbrightProgram.mShaderFiles.clear();
@ -1984,7 +1976,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightAlphaMaskProgram.mName = "Deferred Fullbright Alpha Masking Shader";
gDeferredFullbrightAlphaMaskProgram.mFeatures.calculatesAtmospherics = true;
gDeferredFullbrightAlphaMaskProgram.mFeatures.hasGamma = true;
gDeferredFullbrightAlphaMaskProgram.mFeatures.hasTransport = true;
gDeferredFullbrightAlphaMaskProgram.mFeatures.hasAtmospherics = true;
gDeferredFullbrightAlphaMaskProgram.mFeatures.hasSrgb = true;
gDeferredFullbrightAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gDeferredFullbrightAlphaMaskProgram.mShaderFiles.clear();
@ -2003,7 +1995,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gHUDFullbrightAlphaMaskProgram.mName = "HUD Fullbright Alpha Masking Shader";
gHUDFullbrightAlphaMaskProgram.mFeatures.calculatesAtmospherics = true;
gHUDFullbrightAlphaMaskProgram.mFeatures.hasGamma = true;
gHUDFullbrightAlphaMaskProgram.mFeatures.hasTransport = true;
gHUDFullbrightAlphaMaskProgram.mFeatures.hasAtmospherics = true;
gHUDFullbrightAlphaMaskProgram.mFeatures.hasSrgb = true;
gHUDFullbrightAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gHUDFullbrightAlphaMaskProgram.mShaderFiles.clear();
@ -2022,7 +2014,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightAlphaMaskAlphaProgram.mName = "Deferred Fullbright Alpha Masking Alpha Shader";
gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.calculatesAtmospherics = true;
gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.hasGamma = true;
gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.hasTransport = true;
gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.hasAtmospherics = true;
gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.hasSrgb = true;
gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.isDeferred = true;
gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
@ -2043,7 +2035,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gHUDFullbrightAlphaMaskAlphaProgram.mName = "HUD Fullbright Alpha Masking Alpha Shader";
gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.calculatesAtmospherics = true;
gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.hasGamma = true;
gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.hasTransport = true;
gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.hasAtmospherics = true;
gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.hasSrgb = true;
gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.isDeferred = true;
gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
@ -2064,7 +2056,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightWaterProgram.mName = "Deferred Fullbright Underwater Shader";
gDeferredFullbrightWaterProgram.mFeatures.calculatesAtmospherics = true;
gDeferredFullbrightWaterProgram.mFeatures.hasGamma = true;
gDeferredFullbrightWaterProgram.mFeatures.hasTransport = true;
gDeferredFullbrightWaterProgram.mFeatures.hasAtmospherics = true;
gDeferredFullbrightWaterProgram.mFeatures.hasWaterFog = true;
gDeferredFullbrightWaterProgram.mFeatures.hasSrgb = true;
gDeferredFullbrightWaterProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
@ -2084,7 +2076,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightWaterAlphaProgram.mName = "Deferred Fullbright Underwater Alpha Shader";
gDeferredFullbrightWaterAlphaProgram.mFeatures.calculatesAtmospherics = true;
gDeferredFullbrightWaterAlphaProgram.mFeatures.hasGamma = true;
gDeferredFullbrightWaterAlphaProgram.mFeatures.hasTransport = true;
gDeferredFullbrightWaterAlphaProgram.mFeatures.hasAtmospherics = true;
gDeferredFullbrightWaterAlphaProgram.mFeatures.hasWaterFog = true;
gDeferredFullbrightWaterAlphaProgram.mFeatures.hasSrgb = true;
gDeferredFullbrightWaterAlphaProgram.mFeatures.isDeferred = true;
@ -2107,7 +2099,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightAlphaMaskWaterProgram.mName = "Deferred Fullbright Underwater Alpha Masking Shader";
gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.calculatesAtmospherics = true;
gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasGamma = true;
gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasTransport = true;
gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasAtmospherics = true;
gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasWaterFog = true;
gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasSrgb = true;
gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
@ -2129,7 +2121,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightShinyProgram.mFeatures.calculatesAtmospherics = true;
gDeferredFullbrightShinyProgram.mFeatures.hasAtmospherics = true;
gDeferredFullbrightShinyProgram.mFeatures.hasGamma = true;
gDeferredFullbrightShinyProgram.mFeatures.hasTransport = true;
gDeferredFullbrightShinyProgram.mFeatures.hasSrgb = true;
gDeferredFullbrightShinyProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gDeferredFullbrightShinyProgram.mShaderFiles.clear();
@ -2148,7 +2139,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gHUDFullbrightShinyProgram.mFeatures.calculatesAtmospherics = true;
gHUDFullbrightShinyProgram.mFeatures.hasAtmospherics = true;
gHUDFullbrightShinyProgram.mFeatures.hasGamma = true;
gHUDFullbrightShinyProgram.mFeatures.hasTransport = true;
gHUDFullbrightShinyProgram.mFeatures.hasSrgb = true;
gHUDFullbrightShinyProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gHUDFullbrightShinyProgram.mShaderFiles.clear();
@ -2167,7 +2157,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredEmissiveProgram.mName = "Deferred Emissive Shader";
gDeferredEmissiveProgram.mFeatures.calculatesAtmospherics = true;
gDeferredEmissiveProgram.mFeatures.hasGamma = true;
gDeferredEmissiveProgram.mFeatures.hasTransport = true;
gDeferredEmissiveProgram.mFeatures.hasAtmospherics = true;
gDeferredEmissiveProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gDeferredEmissiveProgram.mShaderFiles.clear();
gDeferredEmissiveProgram.mShaderFiles.push_back(make_pair("deferred/emissiveV.glsl", GL_VERTEX_SHADER));
@ -2185,7 +2175,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredSoftenProgram.mFeatures.hasSrgb = true;
gDeferredSoftenProgram.mFeatures.calculatesAtmospherics = true;
gDeferredSoftenProgram.mFeatures.hasAtmospherics = true;
gDeferredSoftenProgram.mFeatures.hasTransport = true;
gDeferredSoftenProgram.mFeatures.hasGamma = true;
gDeferredSoftenProgram.mFeatures.isDeferred = true;
gDeferredSoftenProgram.mFeatures.hasShadows = use_sun_shadow;
@ -2242,7 +2231,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredSoftenWaterProgram.mFeatures.hasSrgb = true;
gDeferredSoftenWaterProgram.mFeatures.calculatesAtmospherics = true;
gDeferredSoftenWaterProgram.mFeatures.hasAtmospherics = true;
gDeferredSoftenWaterProgram.mFeatures.hasTransport = true;
gDeferredSoftenWaterProgram.mFeatures.hasGamma = true;
gDeferredSoftenWaterProgram.mFeatures.isDeferred = true;
gDeferredSoftenWaterProgram.mFeatures.hasShadows = use_sun_shadow;
@ -2281,14 +2269,11 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredShadowProgram.mName = "Deferred Shadow Shader";
gDeferredShadowProgram.mFeatures.isDeferred = true;
gDeferredShadowProgram.mFeatures.hasShadows = true;
gDeferredShadowProgram.mShaderFiles.clear();
gDeferredShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowV.glsl", GL_VERTEX_SHADER));
gDeferredShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowF.glsl", GL_FRAGMENT_SHADER));
gDeferredShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
// gDeferredShadowProgram.addPermutation("DEPTH_CLAMP", "1"); // disable depth clamp for now
gDeferredShadowProgram.mRiggedVariant = &gDeferredSkinnedShadowProgram;
gDeferredShadowProgram.mRiggedVariant = &gDeferredSkinnedShadowProgram;
success = gDeferredShadowProgram.createShader(NULL, NULL);
llassert(success);
}
@ -2418,7 +2403,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredTerrainProgram.mFeatures.calculatesAtmospherics = true;
gDeferredTerrainProgram.mFeatures.hasAtmospherics = true;
gDeferredTerrainProgram.mFeatures.hasGamma = true;
gDeferredTerrainProgram.mFeatures.hasTransport = true;
gDeferredTerrainProgram.mShaderFiles.clear();
gDeferredTerrainProgram.mShaderFiles.push_back(make_pair("deferred/terrainV.glsl", GL_VERTEX_SHADER));
@ -2441,8 +2425,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredTerrainWaterProgram.mFeatures.calculatesAtmospherics = true;
gDeferredTerrainWaterProgram.mFeatures.hasAtmospherics = true;
gDeferredTerrainWaterProgram.mFeatures.hasGamma = true;
gDeferredTerrainWaterProgram.mFeatures.hasTransport = true;
gDeferredTerrainWaterProgram.mShaderFiles.clear();
gDeferredTerrainWaterProgram.mShaderFiles.push_back(make_pair("deferred/terrainV.glsl", GL_VERTEX_SHADER));
gDeferredTerrainWaterProgram.mShaderFiles.push_back(make_pair("deferred/terrainF.glsl", GL_FRAGMENT_SHADER));
@ -2479,7 +2462,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarAlphaProgram.mFeatures.encodesNormal = true;
gDeferredAvatarAlphaProgram.mFeatures.calculatesAtmospherics = true;
gDeferredAvatarAlphaProgram.mFeatures.hasAtmospherics = true;
gDeferredAvatarAlphaProgram.mFeatures.hasTransport = true;
gDeferredAvatarAlphaProgram.mFeatures.hasGamma = true;
gDeferredAvatarAlphaProgram.mFeatures.isDeferred = true;
gDeferredAvatarAlphaProgram.mFeatures.hasShadows = true;
@ -2656,7 +2638,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredWLSkyProgram.mName = "Deferred Windlight Sky Shader";
gDeferredWLSkyProgram.mShaderFiles.clear();
gDeferredWLSkyProgram.mFeatures.calculatesAtmospherics = true;
gDeferredWLSkyProgram.mFeatures.hasTransport = true;
gDeferredWLSkyProgram.mFeatures.hasAtmospherics = true;
gDeferredWLSkyProgram.mFeatures.hasGamma = true;
gDeferredWLSkyProgram.mFeatures.hasSrgb = true;
@ -2674,7 +2656,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredWLCloudProgram.mName = "Deferred Windlight Cloud Program";
gDeferredWLCloudProgram.mShaderFiles.clear();
gDeferredWLCloudProgram.mFeatures.calculatesAtmospherics = true;
gDeferredWLCloudProgram.mFeatures.hasTransport = true;
gDeferredWLCloudProgram.mFeatures.hasAtmospherics = true;
gDeferredWLCloudProgram.mFeatures.hasGamma = true;
gDeferredWLCloudProgram.mFeatures.hasSrgb = true;
@ -2691,7 +2673,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
{
gDeferredWLSunProgram.mName = "Deferred Windlight Sun Program";
gDeferredWLSunProgram.mFeatures.calculatesAtmospherics = true;
gDeferredWLSunProgram.mFeatures.hasTransport = true;
gDeferredWLSunProgram.mFeatures.hasAtmospherics = true;
gDeferredWLSunProgram.mFeatures.hasGamma = true;
gDeferredWLSunProgram.mFeatures.hasAtmospherics = true;
gDeferredWLSunProgram.mFeatures.disableTextureIndex = true;
@ -2709,7 +2691,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
{
gDeferredWLMoonProgram.mName = "Deferred Windlight Moon Program";
gDeferredWLMoonProgram.mFeatures.calculatesAtmospherics = true;
gDeferredWLMoonProgram.mFeatures.hasTransport = true;
gDeferredWLMoonProgram.mFeatures.hasAtmospherics = true;
gDeferredWLMoonProgram.mFeatures.hasGamma = true;
gDeferredWLMoonProgram.mFeatures.hasAtmospherics = true;
gDeferredWLMoonProgram.mFeatures.hasSrgb = true;
@ -3209,7 +3191,6 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
gReflectionProbeDisplayProgram.mFeatures.hasSrgb = true;
gReflectionProbeDisplayProgram.mFeatures.calculatesAtmospherics = true;
gReflectionProbeDisplayProgram.mFeatures.hasAtmospherics = true;
gReflectionProbeDisplayProgram.mFeatures.hasTransport = true;
gReflectionProbeDisplayProgram.mFeatures.hasGamma = true;
gReflectionProbeDisplayProgram.mFeatures.isDeferred = true;
gReflectionProbeDisplayProgram.mShaderFiles.clear();

View File

@ -5777,9 +5777,6 @@ U32 LLVOAvatar::renderSkinned()
// render all geometry attached to the skeleton
//--------------------------------------------------------------------
bool should_alpha_mask = shouldAlphaMask();
LLGLState test(GL_ALPHA_TEST, should_alpha_mask);
BOOL first_pass = TRUE;
if (!LLDrawPoolAvatar::sSkipOpaque)
{
@ -5829,7 +5826,6 @@ U32 LLVOAvatar::renderSkinned()
if (!LLDrawPoolAvatar::sSkipTransparent || LLPipeline::sImpostorRender)
{
LLGLState blend(GL_BLEND, !mIsDummy);
LLGLState test(GL_ALPHA_TEST, !mIsDummy);
num_indices += renderTransparent(first_pass);
}
@ -5909,9 +5905,6 @@ U32 LLVOAvatar::renderRigid()
return 0;
}
bool should_alpha_mask = shouldAlphaMask();
LLGLState test(GL_ALPHA_TEST, should_alpha_mask);
if (isTextureVisible(TEX_EYES_BAKED) || (getOverallAppearance() == AOA_JELLYDOLL && !isControlAvatar()) || isUIAvatar())
{
LLViewerJoint* eyeball_left = getViewerJoint(MESH_ID_EYEBALL_LEFT);
@ -5976,8 +5969,7 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel)
gGL.flush();
}
{
LLGLEnable test(GL_ALPHA_TEST);
gGL.flush();
gGL.flush();
gGL.color4ubv(color.mV);
gGL.getTexUnit(diffuse_channel)->bind(&mImpostor);
@ -12621,7 +12613,10 @@ void LLVOAvatar::readProfileQuery(S32 retries)
LL::WorkQueue::getInstance("mainloop")->post([id, retries] {
LLVOAvatar* avatar = (LLVOAvatar*) gObjectList.findObject(id);
avatar->readProfileQuery(retries);
if(avatar)
{
avatar->readProfileQuery(retries);
}
});
}
}

View File

@ -63,7 +63,6 @@
#include "llfeaturemanager.h"
#include "llfloatertelehub.h"
#include "llfloaterreg.h"
#include "llgldbg.h"
#include "llhudmanager.h"
#include "llhudnametag.h"
#include "llhudtext.h"
@ -2542,7 +2541,6 @@ void LLPipeline::doOcclusion(LLCamera& camera)
gGL.setColorMask(false, false);
LLGLDisable blend(GL_BLEND);
LLGLDisable test(GL_ALPHA_TEST);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
@ -3891,7 +3889,6 @@ void render_hud_elements()
if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
LLGLEnable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
// Draw the tracking overlays
@ -3926,7 +3923,6 @@ void LLPipeline::renderHighlights()
// Render highlighted faces.
LLGLSPipelineAlpha gls_pipeline_alpha;
LLColor4 color(1.f, 1.f, 1.f, 0.5f);
LLGLEnable color_mat(GL_COLOR_MATERIAL);
disableLights();
if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
@ -4096,8 +4092,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera, bool do_occlusion)
}
}
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
LLVertexBuffer::unbind();
LLGLState::checkStates();
@ -4204,8 +4198,6 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
LLGLEnable cull(GL_CULL_FACE);
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
calcNearbyLights(camera);
setupHWLights();
@ -7289,7 +7281,6 @@ void LLPipeline::generateGlow(LLRenderTarget* src)
{
LLGLEnable blend_on(GL_BLEND);
LLGLEnable test(GL_ALPHA_TEST);
gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
@ -7721,8 +7712,6 @@ void LLPipeline::renderFinalize()
enableLightsFullbright();
LLGLDisable test(GL_ALPHA_TEST);
gGL.setColorMask(true, true);
glClearColor(0, 0, 0, 0);
@ -8133,8 +8122,6 @@ void LLPipeline::renderDeferredLighting()
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("deferred");
LLViewerCamera *camera = LLViewerCamera::getInstance();
LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0);
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
{
gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_HUD);
@ -8295,7 +8282,6 @@ void LLPipeline::renderDeferredLighting()
{
LLGLDepthTest depth(GL_FALSE);
LLGLDisable blend(GL_BLEND);
LLGLDisable test(GL_ALPHA_TEST);
// full screen blit
mScreenTriangleVB->setBuffer();