Backed out changeset dba5b62f57e5: Changes to llglshader.cpp are already in Alex Ivy and the OSX SDK version needs to be set via build variables in a separate repository

meow-7.2.2
Ansariel 2018-01-25 09:13:43 +01:00
parent cd0e901c7b
commit 7e6e64e476
2 changed files with 22 additions and 61 deletions

View File

@ -152,16 +152,11 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DARWIN 1)
# now we only support Xcode 6.0 using 10.9 (Mavericks), minimum OS 10.7 (Lion)
#<FS:TS> Be a bit more flexible: support Xcode 6 to 9 and SDKs from 10.9 to 10.13
#<FS:TS> Be a bit more flexible: support Xcode 6 or 7 and SDKs from 10.9 to 10.11
#set(XCODE_VERSION 6.0)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
#set(CMAKE_OSX_SYSROOT macosx10.9)
if(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk")
# Assume Xcode 9 if High Sierra SDK is present
set(XCODE_VERSION 9.2)
set(CMAKE_OSX_SYSROOT macosx10.13)
message(STATUS "OS X SDK 10.13 found.")
elseif(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk")
if(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk")
# Assume Xcode 7 if Sierra SDK is present
set(XCODE_VERSION 7.3)
set(CMAKE_OSX_SYSROOT macosx10.12)
@ -181,9 +176,9 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(XCODE_VERSION 6.0)
set(CMAKE_OSX_SYSROOT macosx10.9)
message(STATUS "OS X SDK 10.9 found.")
else(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk")
else(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk")
message(FATAL_ERROR "Unable to determine which OS X SDK to use. Giving up.")
endif(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk")
endif(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk")
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL 3)

View File

@ -416,9 +416,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
{
GLhandleARB shaderhandle = LLShaderMgr::instance()->loadShaderFile((*fileIter).first, mShaderLevel, (*fileIter).second, &mDefines, mFeatures.mIndexedTextureChannels);
LL_DEBUGS("ShaderLoading") << "SHADER FILE: " << (*fileIter).first << " mShaderLevel=" << mShaderLevel << LL_ENDL;
//<FS:TS> Xcode 9 compatibility
//if (shaderhandle > 0)
if (shaderhandle)
if (shaderhandle > 0)
{
attachObject(shaderhandle);
}
@ -1007,9 +1005,7 @@ S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode)
void LLGLSLShader::uniform1i(U32 index, GLint x)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1031,9 +1027,7 @@ void LLGLSLShader::uniform1i(U32 index, GLint x)
void LLGLSLShader::uniform1f(U32 index, GLfloat x)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1055,9 +1049,7 @@ void LLGLSLShader::uniform1f(U32 index, GLfloat x)
void LLGLSLShader::uniform2f(U32 index, GLfloat x, GLfloat y)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1080,9 +1072,7 @@ void LLGLSLShader::uniform2f(U32 index, GLfloat x, GLfloat y)
void LLGLSLShader::uniform3f(U32 index, GLfloat x, GLfloat y, GLfloat z)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1105,9 +1095,7 @@ void LLGLSLShader::uniform3f(U32 index, GLfloat x, GLfloat y, GLfloat z)
void LLGLSLShader::uniform4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1130,9 +1118,7 @@ void LLGLSLShader::uniform4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat
void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1155,9 +1141,7 @@ void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v)
void LLGLSLShader::uniform1fv(U32 index, U32 count, const GLfloat* v)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1180,9 +1164,7 @@ void LLGLSLShader::uniform1fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniform2fv(U32 index, U32 count, const GLfloat* v)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1205,9 +1187,7 @@ void LLGLSLShader::uniform2fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniform3fv(U32 index, U32 count, const GLfloat* v)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1230,9 +1210,7 @@ void LLGLSLShader::uniform3fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1255,9 +1233,7 @@ void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1274,9 +1250,7 @@ void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, c
void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1293,9 +1267,7 @@ void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, c
void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1312,9 +1284,7 @@ void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose,
void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
if (mUniform.size() <= index)
{
@ -1332,9 +1302,7 @@ void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, c
GLint LLGLSLShader::getUniformLocation(const LLStaticHashedString& uniform)
{
GLint ret = -1;
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
LLStaticStringTable<GLint>::iterator iter = mUniformMap.find(uniform);
if (iter != mUniformMap.end())
@ -1358,9 +1326,7 @@ GLint LLGLSLShader::getUniformLocation(const LLStaticHashedString& uniform)
GLint LLGLSLShader::getUniformLocation(U32 index)
{
GLint ret = -1;
//<FS:TS> Xcode 9 compatibiltiy
//if (mProgramObject > 0)
if (mProgramObject)
if (mProgramObject > 0)
{
llassert(index < mUniform.size());
return mUniform[index];