Merge. Pull in viewer-release after 3.6.8 fixes for AMD graphics.

Thu, 17 Oct 2013 18:26:04 -0400

author
Monty Brandenberg <monty@lindenlab.com>
date
Thu, 17 Oct 2013 18:26:04 -0400
changeset 40734
12872e1718f4
parent 40733
4558989b7313
parent 39341
1bdb1593c7a9
child 40735
c7ea0015ea29

Merge. Pull in viewer-release after 3.6.8 fixes for AMD graphics.

     1.1 --- a/.hgtags	Fri Oct 04 18:24:59 2013 -0400
     1.2 +++ b/.hgtags	Thu Oct 17 18:26:04 2013 -0400
     1.3 @@ -466,3 +466,4 @@
     1.4  91ed595b716f14f07409595b734fda891a59379e 3.6.4-release
     1.5  bf6d453046011a11de2643fac610cc5258650f82 3.6.5-release
     1.6  ae457ece77001767ae9613148c495e7b98cc0f4a 3.6.7-release
     1.7 +d40c66e410741de7e90b1ed6dac28dd8a2d7e1f6 3.6.8-release
     2.1 --- a/indra/llappearance/lltexlayer.cpp	Fri Oct 04 18:24:59 2013 -0400
     2.2 +++ b/indra/llappearance/lltexlayer.cpp	Thu Oct 17 18:26:04 2013 -0400
     2.3 @@ -1123,7 +1123,10 @@
     2.4  	// *TODO: Is this correct?
     2.5  	//gPipeline.disableLights();
     2.6  	stop_glerror();
     2.7 -	glDisable(GL_LIGHTING);
     2.8 +	if (!LLGLSLShader::sNoFixedFunction)
     2.9 +	{
    2.10 +		glDisable(GL_LIGHTING);
    2.11 +	}
    2.12  	stop_glerror();
    2.13  
    2.14  	bool use_shaders = LLGLSLShader::sNoFixedFunction;
     3.1 --- a/indra/llrender/llcubemap.cpp	Fri Oct 04 18:24:59 2013 -0400
     3.2 +++ b/indra/llrender/llcubemap.cpp	Thu Oct 17 18:26:04 2013 -0400
     3.3 @@ -81,7 +81,7 @@
     3.4  		{
     3.5  			U32 texname = 0;
     3.6  			
     3.7 -			LLImageGL::generateTextures(LLTexUnit::TT_CUBE_MAP, GL_RGB8, 1, &texname);
     3.8 +			LLImageGL::generateTextures(1, &texname);
     3.9  
    3.10  			for (int i = 0; i < 6; i++)
    3.11  			{
     4.1 --- a/indra/llrender/llimagegl.cpp	Fri Oct 04 18:24:59 2013 -0400
     4.2 +++ b/indra/llrender/llimagegl.cpp	Thu Oct 17 18:26:04 2013 -0400
     4.3 @@ -54,8 +54,6 @@
     4.4  S32 LLImageGL::sBoundTextureMemoryInBytes		= 0;
     4.5  S32 LLImageGL::sCurBoundTextureMemory	= 0;
     4.6  S32 LLImageGL::sCount					= 0;
     4.7 -LLImageGL::dead_texturelist_t LLImageGL::sDeadTextureList[LLTexUnit::TT_NONE];
     4.8 -U32 LLImageGL::sCurTexName = 1;
     4.9  
    4.10  BOOL LLImageGL::sGlobalUseAnisotropic	= FALSE;
    4.11  F32 LLImageGL::sLastFrameTime			= 0.f;
    4.12 @@ -716,7 +714,12 @@
    4.13  					mMipLevels = wpo2(llmax(w, h));
    4.14  
    4.15  					//use legacy mipmap generation mode (note: making this condional can cause rendering issues)
    4.16 -					glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE);
    4.17 +					// -- but making it not conditional triggers deprecation warnings when core profile is enabled
    4.18 +					//		(some rendering issues while core profile is enabled are acceptable at this point in time)
    4.19 +					if (!LLRender::sGLCoreProfile)
    4.20 +					{
    4.21 +						glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE);
    4.22 +					}
    4.23  
    4.24  					LLImageGL::setManualImage(mTarget, 0, mFormatInternal,
    4.25  								 w, h, 
    4.26 @@ -1084,95 +1087,19 @@
    4.27  
    4.28  // static
    4.29  static LLFastTimer::DeclareTimer FTM_GENERATE_TEXTURES("generate textures");
    4.30 -void LLImageGL::generateTextures(LLTexUnit::eTextureType type, U32 format, S32 numTextures, U32 *textures)
    4.31 +void LLImageGL::generateTextures(S32 numTextures, U32 *textures)
    4.32  {
    4.33  	LLFastTimer t(FTM_GENERATE_TEXTURES);
    4.34 -	bool empty = true;
    4.35 -
    4.36 -	if (LLRender::sGLCoreProfile)
    4.37 -	{
    4.38 -		switch (format)
    4.39 -		{
    4.40 -			case GL_LUMINANCE8: format = GL_RGB8; break;
    4.41 -			case GL_LUMINANCE8_ALPHA8:
    4.42 -			case GL_ALPHA8: format = GL_RGBA8; break;
    4.43 -		}
    4.44 -	}
    4.45 -
    4.46 -	dead_texturelist_t::iterator iter = sDeadTextureList[type].find(format);
    4.47 -	
    4.48 -	if (iter != sDeadTextureList[type].end())
    4.49 -	{
    4.50 -		empty = iter->second.empty();
    4.51 -	}
    4.52 -	
    4.53 -	for (S32 i = 0; i < numTextures; ++i)
    4.54 -	{
    4.55 -		if (!empty)
    4.56 -		{
    4.57 -			textures[i] = iter->second.front();
    4.58 -			iter->second.pop_front();
    4.59 -			empty = iter->second.empty();
    4.60 -		}
    4.61 -		else
    4.62 -		{
    4.63 -			textures[i] = sCurTexName++;
    4.64 -		}
    4.65 -	}
    4.66 +	glGenTextures(numTextures, textures);
    4.67  }
    4.68  
    4.69  // static
    4.70 -void LLImageGL::deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip_levels, S32 numTextures, U32 *textures, bool immediate)
    4.71 +void LLImageGL::deleteTextures(S32 numTextures, U32 *textures)
    4.72  {
    4.73  	if (gGLManager.mInited)
    4.74  	{
    4.75 -		switch (format)
    4.76 -		{
    4.77 -			case 0:
    4.78 -
    4.79 -			// We get ARB errors in debug when attempting to use glTexImage2D with these deprecated pix formats
    4.80 -			//
    4.81 -			case GL_LUMINANCE8:
    4.82 -			case GL_INTENSITY8:
    4.83 -			case GL_ALPHA8:
    4.84 -				glDeleteTextures(numTextures, textures);
    4.85 -			break;
    4.86 -
    4.87 -			default:
    4.88 -			{
    4.89 -				if (type == LLTexUnit::TT_CUBE_MAP || mip_levels == -1)
    4.90 -		{ //unknown internal format or unknown number of mip levels, not safe to reuse
    4.91 -			glDeleteTextures(numTextures, textures);
    4.92 -		}
    4.93 -		else
    4.94 -		{
    4.95 -			for (S32 i = 0; i < numTextures; ++i)
    4.96 -			{ //remove texture from VRAM by setting its size to zero
    4.97 -
    4.98 -				for (S32 j = 0; j <= mip_levels; j++)
    4.99 -				{
   4.100 -					gGL.getTexUnit(0)->bindManual(type, textures[i]);
   4.101 -							U32 internal_type = LLTexUnit::getInternalType(type);
   4.102 -							glTexImage2D(internal_type, j, format, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
   4.103 -							stop_glerror();
   4.104 -				}
   4.105 -
   4.106 -				llassert(std::find(sDeadTextureList[type][format].begin(),
   4.107 -								   sDeadTextureList[type][format].end(), textures[i]) == 
   4.108 -								   sDeadTextureList[type][format].end());
   4.109 -
   4.110 -				sDeadTextureList[type][format].push_back(textures[i]);
   4.111 -			}	
   4.112 -		}
   4.113 +		glDeleteTextures(numTextures, textures);
   4.114  	}
   4.115 -			break;
   4.116 -		}
   4.117 -	}
   4.118 -	
   4.119 -	/*if (immediate)
   4.120 -	{
   4.121 -		LLImageGL::deleteDeadTextures();
   4.122 -	}*/
   4.123  }
   4.124  
   4.125  // static
   4.126 @@ -1300,11 +1227,11 @@
   4.127  
   4.128  	if(mTexName)
   4.129  	{
   4.130 -		LLImageGL::deleteTextures(mBindTarget, mFormatInternal, mMipLevels, 1, (reinterpret_cast<GLuint*>(&mTexName))) ;
   4.131 +		LLImageGL::deleteTextures(1, (reinterpret_cast<GLuint*>(&mTexName))) ;
   4.132  	}
   4.133  	
   4.134  
   4.135 -	LLImageGL::generateTextures(mBindTarget, mFormatInternal, 1, &mTexName);
   4.136 +	LLImageGL::generateTextures(1, &mTexName);
   4.137  	stop_glerror();
   4.138  	if (!mTexName)
   4.139  	{
   4.140 @@ -1419,7 +1346,7 @@
   4.141  	}
   4.142  	else
   4.143  	{
   4.144 -		LLImageGL::generateTextures(mBindTarget, mFormatInternal, 1, &mTexName);
   4.145 +		LLImageGL::generateTextures(1, &mTexName);
   4.146  		stop_glerror();
   4.147  		{
   4.148  			llverify(gGL.getTexUnit(0)->bind(this));
   4.149 @@ -1464,7 +1391,7 @@
   4.150  	{
   4.151  		sGlobalTextureMemoryInBytes -= mTextureMemory;
   4.152  
   4.153 -		LLImageGL::deleteTextures(mBindTarget, mFormatInternal, mMipLevels, 1, &old_name);
   4.154 +		LLImageGL::deleteTextures(1, &old_name);
   4.155  
   4.156  		stop_glerror();
   4.157  	}
   4.158 @@ -1593,30 +1520,6 @@
   4.159  {
   4.160  	bool reset = false;
   4.161  
   4.162 -	/*while (!sDeadTextureList.empty())
   4.163 -	{
   4.164 -		GLuint tex = sDeadTextureList.front();
   4.165 -		sDeadTextureList.pop_front();
   4.166 -		for (int i = 0; i < gGLManager.mNumTextureImageUnits; i++)
   4.167 -		{
   4.168 -			LLTexUnit* tex_unit = gGL.getTexUnit(i);
   4.169 -
   4.170 -			if (tex_unit && tex_unit->getCurrTexture() == tex)
   4.171 -			{
   4.172 -				tex_unit->unbind(tex_unit->getCurrType());
   4.173 -				stop_glerror();
   4.174 -
   4.175 -				if (i > 0)
   4.176 -				{
   4.177 -					reset = true;
   4.178 -				}
   4.179 -			}
   4.180 -		}
   4.181 -		
   4.182 -		glDeleteTextures(1, &tex);
   4.183 -		stop_glerror();
   4.184 -	}*/
   4.185 -
   4.186  	if (reset)
   4.187  	{
   4.188  		gGL.getTexUnit(0)->activate();
   4.189 @@ -1633,7 +1536,7 @@
   4.190  			mTextureMemory = 0;
   4.191  		}
   4.192  		
   4.193 -		LLImageGL::deleteTextures(mBindTarget,  mFormatInternal, mMipLevels, 1, &mTexName);			
   4.194 +		LLImageGL::deleteTextures(1, &mTexName);			
   4.195  		mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel.
   4.196  		mTexName = 0;		
   4.197  		mGLTextureCreated = FALSE ;
     5.1 --- a/indra/llrender/llimagegl.h	Fri Oct 04 18:24:59 2013 -0400
     5.2 +++ b/indra/llrender/llimagegl.h	Thu Oct 17 18:26:04 2013 -0400
     5.3 @@ -45,16 +45,9 @@
     5.4  {
     5.5  	friend class LLTexUnit;
     5.6  public:
     5.7 -	static U32 sCurTexName;
     5.8 -
     5.9 -	//previously used but now available texture names
    5.10 -	// sDeadTextureList[<usage>][<internal format>]
    5.11 -	typedef std::map<U32, std::list<U32> > dead_texturelist_t;
    5.12 -	static dead_texturelist_t sDeadTextureList[LLTexUnit::TT_NONE];
    5.13 -
    5.14  	// These 2 functions replace glGenTextures() and glDeleteTextures()
    5.15 -	static void generateTextures(LLTexUnit::eTextureType type, U32 format, S32 numTextures, U32 *textures);
    5.16 -	static void deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip_levels, S32 numTextures, U32 *textures, bool immediate = false);
    5.17 +	static void generateTextures(S32 numTextures, U32 *textures);
    5.18 +	static void deleteTextures(S32 numTextures, U32 *textures);
    5.19  	static void deleteDeadTextures();
    5.20  
    5.21  	// Size calculation
     6.1 --- a/indra/llrender/llrendertarget.cpp	Fri Oct 04 18:24:59 2013 -0400
     6.2 +++ b/indra/llrender/llrendertarget.cpp	Thu Oct 17 18:26:04 2013 -0400
     6.3 @@ -194,7 +194,7 @@
     6.4  	}
     6.5  
     6.6  	U32 tex;
     6.7 -	LLImageGL::generateTextures(mUsage, color_fmt, 1, &tex);
     6.8 +	LLImageGL::generateTextures(1, &tex);
     6.9  	gGL.getTexUnit(0)->bindManual(mUsage, tex);
    6.10  
    6.11  	stop_glerror();
    6.12 @@ -280,7 +280,7 @@
    6.13  	}
    6.14  	else
    6.15  	{
    6.16 -		LLImageGL::generateTextures(mUsage, GL_DEPTH_COMPONENT24, 1, &mDepth);
    6.17 +		LLImageGL::generateTextures(1, &mDepth);
    6.18  		gGL.getTexUnit(0)->bindManual(mUsage, mDepth);
    6.19  		
    6.20  		U32 internal_type = LLTexUnit::getInternalType(mUsage);
    6.21 @@ -357,7 +357,7 @@
    6.22  		}
    6.23  		else
    6.24  		{
    6.25 -			LLImageGL::deleteTextures(mUsage, 0, 0, 1, &mDepth, true);
    6.26 +			LLImageGL::deleteTextures(1, &mDepth);
    6.27  			stop_glerror();
    6.28  		}
    6.29  		mDepth = 0;
    6.30 @@ -389,7 +389,7 @@
    6.31  	if (mTex.size() > 0)
    6.32  	{
    6.33  		sBytesAllocated -= mResX*mResY*4*mTex.size();
    6.34 -		LLImageGL::deleteTextures(mUsage, mInternalFormat[0], 0, mTex.size(), &mTex[0], true);
    6.35 +		LLImageGL::deleteTextures(mTex.size(), &mTex[0]);
    6.36  		mTex.clear();
    6.37  		mInternalFormat.clear();
    6.38  	}
     7.1 --- a/indra/llrender/llvertexbuffer.cpp	Fri Oct 04 18:24:59 2013 -0400
     7.2 +++ b/indra/llrender/llvertexbuffer.cpp	Thu Oct 17 18:26:04 2013 -0400
     7.3 @@ -91,7 +91,6 @@
     7.4  
     7.5  U32 LLVBOPool::sBytesPooled = 0;
     7.6  U32 LLVBOPool::sIndexBytesPooled = 0;
     7.7 -U32 LLVBOPool::sCurGLName = 1;
     7.8  
     7.9  std::list<U32> LLVertexBuffer::sAvailableVAOName;
    7.10  U32 LLVertexBuffer::sCurVAOName = 1;
    7.11 @@ -125,16 +124,8 @@
    7.12  {
    7.13  	U32 ret = 0;
    7.14  
    7.15 -	if (mGLNamePool.empty())
    7.16 -	{
    7.17 -		ret = sCurGLName++;
    7.18 -	}
    7.19 -	else
    7.20 -	{
    7.21 -		ret = mGLNamePool.front();
    7.22 -		mGLNamePool.pop_front();
    7.23 -	}
    7.24 -
    7.25 +	glGenBuffersARB(1, &ret);
    7.26 +	
    7.27  	return ret;
    7.28  }
    7.29  
    7.30 @@ -146,12 +137,9 @@
    7.31  
    7.32  		glBindBufferARB(mType, name);
    7.33  		glBufferDataARB(mType, 0, NULL, mUsage);
    7.34 +		glBindBufferARB(mType, 0);
    7.35  
    7.36 -		llassert(std::find(mGLNamePool.begin(), mGLNamePool.end(), name) == mGLNamePool.end());
    7.37 -
    7.38 -		mGLNamePool.push_back(name);
    7.39 -
    7.40 -		glBindBufferARB(mType, 0);
    7.41 +		glDeleteBuffersARB(1, &name);
    7.42  	}
    7.43  }
    7.44  
    7.45 @@ -1333,7 +1321,7 @@
    7.46  		//actually allocate space for the vertex buffer if using VBO mapping
    7.47  		flush();
    7.48  
    7.49 -		if (gGLManager.mHasVertexArrayObject && useVBOs() && (LLRender::sGLCoreProfile || sUseVAO))
    7.50 +		if (gGLManager.mHasVertexArrayObject && useVBOs() && sUseVAO)
    7.51  		{
    7.52  #if GL_ARB_vertex_array_object
    7.53  			mGLArray = getVAOName();
     8.1 --- a/indra/llrender/llvertexbuffer.h	Fri Oct 04 18:24:59 2013 -0400
     8.2 +++ b/indra/llrender/llvertexbuffer.h	Thu Oct 17 18:26:04 2013 -0400
     8.3 @@ -57,8 +57,6 @@
     8.4  	static U32 sBytesPooled;
     8.5  	static U32 sIndexBytesPooled;
     8.6  	
     8.7 -	static U32 sCurGLName;
     8.8 -
     8.9  	LLVBOPool(U32 vboUsage, U32 vboType);
    8.10  		
    8.11  	const U32 mUsage;
    8.12 @@ -86,8 +84,6 @@
    8.13  		volatile U8* mClientData;
    8.14  	};
    8.15  
    8.16 -	std::list<U32> mGLNamePool;
    8.17 -
    8.18  	typedef std::list<Record> record_list_t;
    8.19  	std::vector<record_list_t> mFreeList;
    8.20  	std::vector<U32> mMissCount;
     9.1 --- a/indra/newview/VIEWER_VERSION.txt	Fri Oct 04 18:24:59 2013 -0400
     9.2 +++ b/indra/newview/VIEWER_VERSION.txt	Thu Oct 17 18:26:04 2013 -0400
     9.3 @@ -1,1 +1,1 @@
     9.4 -3.6.8
     9.5 +3.6.9
    10.1 --- a/indra/newview/lldrawpoolavatar.cpp	Fri Oct 04 18:24:59 2013 -0400
    10.2 +++ b/indra/newview/lldrawpoolavatar.cpp	Thu Oct 17 18:26:04 2013 -0400
    10.3 @@ -697,7 +697,7 @@
    10.4  	specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP);
    10.5  	normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL);
    10.6  	sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
    10.7 -	gPipeline.bindDeferredShader(*sVertexProgram);
    10.8 +	sVertexProgram->bind();
    10.9  	sVertexProgram->setMinimumAlpha(0.01f);
   10.10  }
   10.11  
    11.1 --- a/indra/newview/llspatialpartition.cpp	Fri Oct 04 18:24:59 2013 -0400
    11.2 +++ b/indra/newview/llspatialpartition.cpp	Thu Oct 17 18:26:04 2013 -0400
    11.3 @@ -89,28 +89,17 @@
    11.4  public:
    11.5  	LLOcclusionQueryPool()
    11.6  	{
    11.7 -		mCurQuery = 1;
    11.8 +		
    11.9  	}
   11.10  
   11.11  protected:
   11.12  
   11.13 -	std::list<GLuint> mAvailableName;
   11.14 -	GLuint mCurQuery;
   11.15 -		
   11.16  	virtual GLuint allocateName()
   11.17  	{
   11.18  		GLuint ret = 0;
   11.19  
   11.20 -		if (!mAvailableName.empty())
   11.21 -		{
   11.22 -			ret = mAvailableName.front();
   11.23 -			mAvailableName.pop_front();
   11.24 -		}
   11.25 -		else
   11.26 -		{
   11.27 -			ret = mCurQuery++;
   11.28 -		}
   11.29 -
   11.30 +		glGenQueriesARB(1, &ret);
   11.31 +	
   11.32  		return ret;
   11.33  	}
   11.34  
   11.35 @@ -119,8 +108,7 @@
   11.36  #if LL_TRACK_PENDING_OCCLUSION_QUERIES
   11.37  		LLSpatialGroup::sPendingQueries.erase(name);
   11.38  #endif
   11.39 -		llassert(std::find(mAvailableName.begin(), mAvailableName.end(), name) == mAvailableName.end());
   11.40 -		mAvailableName.push_back(name);
   11.41 +		glDeleteQueriesARB(1, &name);
   11.42  	}
   11.43  };
   11.44  
    12.1 --- a/indra/newview/llvoavatar.cpp	Fri Oct 04 18:24:59 2013 -0400
    12.2 +++ b/indra/newview/llvoavatar.cpp	Thu Oct 17 18:26:04 2013 -0400
    12.3 @@ -934,7 +934,7 @@
    12.4  		}
    12.5  		if (mBakedTextureDatas[i].mMaskTexName)
    12.6  		{
    12.7 -			LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, (GLuint*)&(mBakedTextureDatas[i].mMaskTexName));
    12.8 +			LLImageGL::deleteTextures(1, (GLuint*)&(mBakedTextureDatas[i].mMaskTexName));
    12.9  			mBakedTextureDatas[i].mMaskTexName = 0 ;
   12.10  		}
   12.11  	}
   12.12 @@ -7272,7 +7272,7 @@
   12.13  			}
   12.14  
   12.15  			U32 gl_name;
   12.16 -			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, GL_ALPHA8, 1, &gl_name );
   12.17 +			LLImageGL::generateTextures(1, &gl_name );
   12.18  			stop_glerror();
   12.19  
   12.20  			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, gl_name);
   12.21 @@ -7309,7 +7309,7 @@
   12.22  						maskData->mLastDiscardLevel = discard_level;
   12.23  						if (self->mBakedTextureDatas[baked_index].mMaskTexName)
   12.24  						{
   12.25 -							LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, &(self->mBakedTextureDatas[baked_index].mMaskTexName));
   12.26 +							LLImageGL::deleteTextures(1, &(self->mBakedTextureDatas[baked_index].mMaskTexName));
   12.27  						}
   12.28  						self->mBakedTextureDatas[baked_index].mMaskTexName = gl_name;
   12.29  						found_texture_id = true;
    13.1 --- a/indra/newview/llvoavatarself.cpp	Fri Oct 04 18:24:59 2013 -0400
    13.2 +++ b/indra/newview/llvoavatarself.cpp	Thu Oct 17 18:26:04 2013 -0400
    13.3 @@ -3066,7 +3066,7 @@
    13.4  		 namep; 
    13.5  		 namep = sScratchTexNames.getNextData() )
    13.6  	{
    13.7 -		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, (U32 *)namep );
    13.8 +		LLImageGL::deleteTextures(1, (U32 *)namep );
    13.9  		stop_glerror();
   13.10  	}
   13.11  
    14.1 --- a/indra/newview/pipeline.cpp	Fri Oct 04 18:24:59 2013 -0400
    14.2 +++ b/indra/newview/pipeline.cpp	Thu Oct 17 18:26:04 2013 -0400
    14.3 @@ -1198,13 +1198,13 @@
    14.4  	
    14.5  	if (mNoiseMap)
    14.6  	{
    14.7 -		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 0, 1, &mNoiseMap);
    14.8 +		LLImageGL::deleteTextures(1, &mNoiseMap);
    14.9  		mNoiseMap = 0;
   14.10  	}
   14.11  
   14.12  	if (mTrueNoiseMap)
   14.13  	{
   14.14 -		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 0, 1, &mTrueNoiseMap);
   14.15 +		LLImageGL::deleteTextures(1, &mTrueNoiseMap);
   14.16  		mTrueNoiseMap = 0;
   14.17  	}
   14.18  
   14.19 @@ -1229,7 +1229,7 @@
   14.20  {
   14.21  	if (mLightFunc)
   14.22  	{
   14.23 -		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_R16F, 0, 1, &mLightFunc);
   14.24 +		LLImageGL::deleteTextures(1, &mLightFunc);
   14.25  		mLightFunc = 0;
   14.26  	}
   14.27  }
   14.28 @@ -1323,7 +1323,7 @@
   14.29  				noise[i].mV[2] = ll_frand()*scaler+1.f-scaler/2.f;
   14.30  			}
   14.31  
   14.32 -			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 1, &mNoiseMap);
   14.33 +			LLImageGL::generateTextures(1, &mNoiseMap);
   14.34  			
   14.35  			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseMap);
   14.36  			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB, GL_FLOAT, noise, false);
   14.37 @@ -1339,7 +1339,7 @@
   14.38  				noise[i] = ll_frand()*2.0-1.0;
   14.39  			}
   14.40  
   14.41 -			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 1, &mTrueNoiseMap);
   14.42 +			LLImageGL::generateTextures(1, &mTrueNoiseMap);
   14.43  			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mTrueNoiseMap);
   14.44  			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB,GL_FLOAT, noise, false);
   14.45  			gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
   14.46 @@ -1452,7 +1452,7 @@
   14.47  			//
   14.48  			pix_format = GL_R32F;
   14.49  #endif
   14.50 -			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, pix_format, 1, &mLightFunc);
   14.51 +			LLImageGL::generateTextures(1, &mLightFunc);
   14.52  			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);
   14.53  			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, pix_format, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false);
   14.54  			//LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_UNSIGNED_BYTE, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false);

mercurial