summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-05-06 16:48:58 -0500
committerRunitaiLinden <davep@lindenlab.com>2024-05-06 16:48:58 -0500
commitc6d752b880cacca8fb8f10f28790a50161fcb9ab (patch)
tree14910a69597962134f2e78e864a2f05962a16356 /indra/llrender/llshadermgr.cpp
parent76101843c0d390c25a783f212eb1ea75e508ada4 (diff)
parent7d87e41bbd5d4761b1eb17e49b7a00b948d84213 (diff)
Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into gltf-dev-maint-a-merge
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r--indra/llrender/llshadermgr.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 636e13719a..4e03882b7a 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -66,14 +66,14 @@ LLShaderMgr * LLShaderMgr::instance()
return sInstance;
}
-BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
+bool LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
llassert_always(shader != NULL);
LLShaderFeatures *features = & shader->mFeatures;
if (features->attachNothing)
{
- return TRUE;
+ return true;
}
//////////////////////////////////////
// Attach Vertex Shader Features First
@@ -84,7 +84,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("windlight/atmosphericsVarsV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -92,7 +92,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("windlight/atmosphericsHelpersV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -102,40 +102,40 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("lighting/lightFuncSpecularV.glsl"))
{
- return FALSE;
+ return false;
}
if (!features->isAlphaLighting)
{
if (!shader->attachVertexObject("lighting/sumLightsSpecularV.glsl"))
{
- return FALSE;
+ return false;
}
}
if (!shader->attachVertexObject("lighting/lightSpecularV.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachVertexObject("lighting/lightFuncV.glsl"))
{
- return FALSE;
+ return false;
}
if (!features->isAlphaLighting)
{
if (!shader->attachVertexObject("lighting/sumLightsV.glsl"))
{
- return FALSE;
+ return false;
}
}
if (!shader->attachVertexObject("lighting/lightV.glsl"))
{
- return FALSE;
+ return false;
}
}
}
@@ -145,16 +145,16 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("environment/srgbF.glsl")) // NOTE -- "F" suffix is superfluous here, there is nothing fragment specific in srgbF
{
- return FALSE;
+ return false;
}
if (!shader->attachVertexObject("windlight/atmosphericsFuncs.glsl")) {
- return FALSE;
+ return false;
}
if (!shader->attachVertexObject("windlight/atmosphericsV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -162,7 +162,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("avatar/avatarSkinV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -171,13 +171,13 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
shader->mRiggedVariant = shader;
if (!shader->attachVertexObject("avatar/objectSkinV.glsl"))
{
- return FALSE;
+ return false;
}
}
if (!shader->attachVertexObject("deferred/textureUtilV.glsl"))
{
- return FALSE;
+ return false;
}
///////////////////////////////////////
@@ -195,7 +195,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("environment/srgbF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -203,7 +203,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("windlight/atmosphericsVarsF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -211,7 +211,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("windlight/atmosphericsHelpersF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -220,7 +220,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/deferredUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -228,7 +228,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/screenSpaceReflUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -236,7 +236,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/shadowUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -244,7 +244,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/reflectionProbeF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -252,7 +252,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/aoUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -260,19 +260,19 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("windlight/gammaF.glsl"))
{
- return FALSE;
+ return false;
}
}
if (features->hasAtmospherics || features->isDeferred)
{
if (!shader->attachFragmentObject("windlight/atmosphericsFuncs.glsl")) {
- return FALSE;
+ return false;
}
if (!shader->attachFragmentObject("windlight/atmosphericsF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -289,7 +289,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("environment/waterFogF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -301,14 +301,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("lighting/lightAlphaMaskNonIndexedF.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachFragmentObject("lighting/lightNonIndexedF.glsl"))
{
- return FALSE;
+ return false;
}
}
}
@@ -318,14 +318,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("lighting/lightAlphaMaskF.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachFragmentObject("lighting/lightF.glsl"))
{
- return FALSE;
+ return false;
}
}
shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels, 1);
@@ -336,18 +336,18 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("objects/nonindexedTextureV.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachVertexObject("objects/indexedTextureV.glsl"))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//============================================================================
@@ -421,7 +421,7 @@ void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLchar** shader_code_t
LL_CONT << LL_ENDL;
}
-void LLShaderMgr::dumpObjectLog(GLuint ret, BOOL warns, const std::string& filename)
+void LLShaderMgr::dumpObjectLog(GLuint ret, bool warns, const std::string& filename)
{
std::string log;
log = get_object_log(ret);
@@ -877,7 +877,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
{
//an error occured, print log
LL_WARNS("ShaderLoading") << "GLSL Compilation Error:" << LL_ENDL;
- dumpObjectLog(ret, TRUE, open_file_name);
+ dumpObjectLog(ret, true, open_file_name);
dumpShaderSource(shader_code_count, shader_code_text);
glDeleteShader(ret); //no longer need handle
ret = 0;
@@ -919,7 +919,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
return ret;
}
-BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
+bool LLShaderMgr::linkProgramObject(GLuint obj, bool suppress_errors)
{
//check for errors
{
@@ -936,7 +936,7 @@ BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
{
//an error occured, print log
LL_SHADER_LOADING_WARNS() << "GLSL Linker Error:" << LL_ENDL;
- dumpObjectLog(obj, TRUE, "linker");
+ dumpObjectLog(obj, true, "linker");
return success;
}
}
@@ -947,12 +947,12 @@ BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
{
LL_SHADER_LOADING_WARNS() << "GLSL Linker: Running in Software:" << LL_ENDL;
success = GL_FALSE;
- suppress_errors = FALSE;
+ suppress_errors = false;
}
return success;
}
-BOOL LLShaderMgr::validateProgramObject(GLuint obj)
+bool LLShaderMgr::validateProgramObject(GLuint obj)
{
//check program validity against current GL
glValidateProgram(obj);
@@ -965,7 +965,7 @@ BOOL LLShaderMgr::validateProgramObject(GLuint obj)
}
else
{
- dumpObjectLog(obj, FALSE);
+ dumpObjectLog(obj, false);
}
return success;