Commits

Anonymous committed e713e9c

STORM-165 decode_priority clamp issue in texture fetching

Patch by Merov ported and reviewed by Tofu, from SG2.

Comments (0)

Files changed (1)

indra/newview/llviewertexture.cpp

 	S32 current_discard = getCurrentDiscardLevelForFetching() ;
 	S32 desired_discard = getDesiredDiscardLevel();
 	F32 decode_priority = getDecodePriority();
-	decode_priority = llmax(decode_priority, 0.0f);
+	decode_priority = llclamp(decode_priority, 0.0f, maxDecodePriority());
 
 	if (mIsFetching)
 	{