diff options
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/llcommon/llapr.cpp | 2 | ||||
| -rwxr-xr-x | indra/llprimitive/lltextureentry.cpp | 2 | ||||
| -rwxr-xr-x | indra/llrender/llrender.cpp | 43 | ||||
| -rwxr-xr-x | indra/newview/pipeline.cpp | 21 | 
4 files changed, 38 insertions, 30 deletions
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index a0802c6adf..b7815b0e35 100755 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -226,7 +226,7 @@ void LLVolatileAPRPool::clearVolatileAPRPool()  		llassert_always(mNumActiveRef > 0) ;  	} -	llassert(mNumTotalRef < (FULL_VOLATILE_APR_POOL << 2)) ; +	llassert(mNumTotalRef <= (FULL_VOLATILE_APR_POOL << 2)) ;  }  BOOL LLVolatileAPRPool::isFull() diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 597f078490..0db75a0e82 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -545,7 +545,7 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID)  		{  			mMaterialUpdatePending = true;  			mMaterialID = pMaterialID; -			return TEM_CHANGE_NONE; +			return TEM_CHANGE_TEXTURE;  		}  		mMaterialUpdatePending = false; diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index c60eb8d9d9..f2f1b62be0 100755 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1849,35 +1849,36 @@ void LLRender::flush()  			sUIVerts += mCount;  		} -		if (gDebugGL) +		//store mCount in a local variable to avoid re-entrance (drawArrays may call flush) +		U32 count = mCount; + +		if (mMode == LLRender::QUADS && !sGLCoreProfile)  		{ -			if (mMode == LLRender::QUADS && !sGLCoreProfile) +			if (mCount%4 != 0)  			{ -				if (mCount%4 != 0) -				{ -					llerrs << "Incomplete quad rendered." << llendl; -				} +				count -= (mCount % 4); +				llwarns << "Incomplete quad requested." << llendl;  			} -			 -			if (mMode == LLRender::TRIANGLES) +		} + +		if (mMode == LLRender::TRIANGLES) +		{ +			if (mCount%3 != 0)  			{ -				if (mCount%3 != 0) -				{ -					llerrs << "Incomplete triangle rendered." << llendl; -				} +				count -= (mCount % 3); +				llwarns << "Incomplete triangle requested." << llendl;  			} -			 -			if (mMode == LLRender::LINES) +		} + +		if (mMode == LLRender::LINES) +		{ +			if (mCount%2 != 0)  			{ -				if (mCount%2 != 0) -				{ -					llerrs << "Incomplete line rendered." << llendl; -				} +				count -= (mCount % 2); +				llwarns << "Incomplete line requested." << llendl;  			}  		} - -		//store mCount in a local variable to avoid re-entrance (drawArrays may call flush) -		U32 count = mCount; +		  		mCount = 0;  		if (mBuffer->useVBOs() && !mBuffer->isLocked()) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4801c52209..24718d9077 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1399,11 +1399,18 @@ void LLPipeline::createLUTBuffers()  				}  			} -			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, GL_R16F, 1, &mLightFunc); +			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; +#endif +			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, pix_format, 1, &mLightFunc);  			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc); -			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_R16F, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false); +			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, pix_format, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false);  			//LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_UNSIGNED_BYTE, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false);  			gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); +			gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR);  			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);  			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); @@ -2445,8 +2452,8 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl  		}  		else  		{ -			mScreen.bindTarget(); -		} +		mScreen.bindTarget(); +	}  	}  	if (sUseOcclusion > 1) @@ -2590,10 +2597,10 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl  		}  		else  		{ -			mScreen.flush(); -		} +		mScreen.flush();  	}  } +}  void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera)  { @@ -8314,7 +8321,7 @@ void LLPipeline::renderDeferredLighting()  		LLStrider<LLVector3> vert;   		mDeferredVB->getVertexStrider(vert); -		 +  		vert[0].set(-1,1,0);  		vert[1].set(-1,-3,0);  		vert[2].set(3,1,0);  | 
