Disable old GPU hacks on macos when running against Apple GPU

master
Rye 2025-02-10 14:10:47 -05:00
parent 0ea0edb5d9
commit fd94dc0cd0
4 changed files with 12 additions and 12 deletions

View File

@ -421,8 +421,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();

View File

@ -450,7 +450,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
// endsure work-around for missing GLSL funcs gets propogated to feature shader files (e.g. srgbF.glsl)
#if LL_DARWIN
if (defines)
if (!gGLManager.mIsApple && defines)
{
(*defines)["OLD_SELECT"] = "1";
}

View File

@ -787,12 +787,6 @@ void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVecto
gGL.syncMatrices();
U32 mask = LLVertexBuffer::MAP_VERTEX;
if (tc)
{
mask = mask | LLVertexBuffer::MAP_TEXCOORD0;
}
unbind();
gGL.begin(mode);

View File

@ -1440,9 +1440,12 @@ void LLPipeline::createLUTBuffers()
U32 pix_format = GL_R16F;
#if LL_DARWIN
// Need to work around limited precision with 10.6.8 and older drivers
//
pix_format = GL_R32F;
if(!gGLManager.mIsApple)
{
// Need to work around limited precision with 10.6.8 and older drivers
//
pix_format = GL_R32F;
}
#endif
LLImageGL::generateTextures(1, &mLightFunc);
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);