summaryrefslogtreecommitdiff
path: root/indra/llrender/llglslshader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r--indra/llrender/llglslshader.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index aac5e3abc8..5a0281eeb5 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -450,8 +450,11 @@ bool LLGLSLShader::createShader()
llassert_always(!mShaderFiles.empty());
#if LL_DARWIN
- // work-around missing mix(vec3,vec3,bvec3)
- mDefines["OLD_SELECT"] = "1";
+ if(!gGLManager.mIsApple)
+ {
+ // work-around missing mix(vec3,vec3,bvec3)
+ mDefines["OLD_SELECT"] = "1";
+ }
#endif
mShaderHash = hash();
@@ -572,7 +575,7 @@ bool LLGLSLShader::createShader()
}
}
-#ifdef LL_PROFILER_ENABLE_RENDER_DOC
+#if LL_PROFILER_ENABLE_RENDER_DOC
setLabel(mName.c_str());
#endif
@@ -1190,22 +1193,22 @@ S32 LLGLSLShader::bindTexture(S32 uniform, LLRenderTarget* texture, bool depth,
return -1;
}
- uniform = getTextureChannel(uniform);
+ S32 channel = getTextureChannel(uniform);
- if (uniform > -1)
+ if (channel > -1)
{
if (depth) {
- gGL.getTexUnit(uniform)->bind(texture, true);
+ gGL.getTexUnit(channel)->bind(texture, true);
}
else {
bool has_mips = mode == LLTexUnit::TFO_TRILINEAR || mode == LLTexUnit::TFO_ANISOTROPIC;
- gGL.getTexUnit(uniform)->bindManual(texture->getUsage(), texture->getTexture(index), has_mips);
+ gGL.getTexUnit(channel)->bindManual(texture->getUsage(), texture->getTexture(index), has_mips);
}
- gGL.getTexUnit(uniform)->setTextureFilteringOption(mode);
+ gGL.getTexUnit(channel)->setTextureFilteringOption(mode);
}
- return uniform;
+ return channel;
}
S32 LLGLSLShader::bindTexture(const std::string& uniform, LLRenderTarget* texture, bool depth, LLTexUnit::eTextureFilterOptions mode)
@@ -2116,7 +2119,7 @@ LLUUID LLGLSLShader::hash()
return hash_obj.digest();
}
-#ifdef LL_PROFILER_ENABLE_RENDER_DOC
+#if LL_PROFILER_ENABLE_RENDER_DOC
void LLGLSLShader::setLabel(const char* label) {
LL_LABEL_OBJECT_GL(GL_PROGRAM, mProgramObject, strlen(label), label);
}