From 992ebe2c630cc34ecf77a527ca1b4fd6e29546c6 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 15 Jan 2015 13:16:21 +0100 Subject: [PATCH] Remove Nicky's AMD fix - will be replaced by the V3 version --- indra/llrender/llshadermgr.cpp | 5 ----- .../app_settings/shaders/class1/avatar/avatarSkinV.glsl | 6 ------ .../app_settings/shaders/class1/avatar/objectSkinV.glsl | 9 --------- .../app_settings/shaders/class1/deferred/blurLightF.glsl | 6 ------ .../shaders/class1/deferred/multiPointLightF.glsl | 8 -------- .../app_settings/shaders/class1/deferred/postgiF.glsl | 6 ------ 6 files changed, 40 deletions(-) diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 35da8ab2c4..eabaacd16a 100755 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -680,11 +680,6 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade } } - // add define for ATI/AMD so we can do some special ifdef magic in shaders. - if( gGLManager.mIsATI ) - text[ count++ ] = strdup( "#define ND_IS_AMD_CARD 1\n" ); - // - if (texture_index_channels > 0 && type == GL_FRAGMENT_SHADER_ARB) { //use specified number of texture channels for indexed texture rendering diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl index 0ceb087b02..bc63d07d72 100755 --- a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl @@ -40,10 +40,4 @@ mat4 getSkinnedTransform() ret[3] = vec4(0,0,0,1); return ret; - -#ifdef ND_IS_AMD_CARD - // If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts. - vec4 dummy1 = matrixPalette[0]; - vec4 dummy2 = matrixPalette[44]; -#endif } diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl index ca1a46b4e3..57129c3bd1 100755 --- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl @@ -63,14 +63,5 @@ mat4 getObjectSkinnedTransform() ret[3] = vec4(trans, 1.0); return ret; - -#ifdef ND_IS_AMD_CARD - // If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts. - mat3 dummy1 = matrixPalette[0]; - vec3 dummy2 = translationPalette[0]; - mat3 dummy3 = matrixPalette[51]; - vec3 dummy4 = translationPalette[51]; -#endif - } diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl index 29930c3202..a4f54dff70 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl @@ -132,11 +132,5 @@ void main() col.y *= col.y; frag_color = col; - -#ifdef ND_IS_AMD_CARD - // If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts. - vec3 dummy1 = kern[0]; - vec3 dummy2 = kern[3]; -#endif } diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl index c496e1d9a5..236567219b 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl @@ -161,12 +161,4 @@ void main() frag_color.rgb = out_col; frag_color.a = 0.0; - -#ifdef ND_IS_AMD_CARD - // If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts. - vec4 dummy1 = light[0]; - vec4 dummy2 = light_col[0]; - vec4 dummy3 = light[LIGHT_COUNT-1]; - vec4 dummy4 = light_col[LIGHT_COUNT-1]; -#endif } diff --git a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl index 77e2a9f918..96f9628424 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl @@ -99,10 +99,4 @@ void main() col = col*col*blur_quad.x + col*blur_quad.y + blur_quad.z; frag_color.rgb = col; - -#ifdef ND_IS_AMD_CARD - // If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts. - vec2 dummy1 = kern[0]; - vec2 dummy2 = kern[31]; -#endif }