Skip to content

Commit 3a92b88

Browse files
author
Rye
committed
Disable old mac opengl hacks on apple silicon
1 parent 638ecbe commit 3a92b88

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

indra/llrender/llglslshader.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,11 @@ bool LLGLSLShader::createShader()
421421
llassert_always(!mShaderFiles.empty());
422422

423423
#if LL_DARWIN
424-
// work-around missing mix(vec3,vec3,bvec3)
425-
mDefines["OLD_SELECT"] = "1";
424+
if(!gGLManager.mIsApple)
425+
{
426+
// work-around missing mix(vec3,vec3,bvec3)
427+
mDefines["OLD_SELECT"] = "1";
428+
}
426429
#endif
427430

428431
mShaderHash = hash();

indra/llrender/llshadermgr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
450450

451451
// endsure work-around for missing GLSL funcs gets propogated to feature shader files (e.g. srgbF.glsl)
452452
#if LL_DARWIN
453-
if (defines)
453+
if (defines && !gGLManager.mIsApple)
454454
{
455455
(*defines)["OLD_SELECT"] = "1";
456456
}

indra/newview/pipeline.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,9 +1423,12 @@ void LLPipeline::createLUTBuffers()
14231423

14241424
U32 pix_format = GL_R16F;
14251425
#if LL_DARWIN
1426-
// Need to work around limited precision with 10.6.8 and older drivers
1427-
//
1428-
pix_format = GL_R32F;
1426+
if(!gGLManager.mIsApple)
1427+
{
1428+
// Need to work around limited precision with 10.6.8 and older drivers
1429+
//
1430+
pix_format = GL_R32F;
1431+
}
14291432
#endif
14301433
LLImageGL::generateTextures(1, &mLightFunc);
14311434
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);

0 commit comments

Comments
 (0)