From f5c431aa7bce953503b33c957ba024bdd9104e63 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Thu, 11 Mar 2010 16:06:36 -0600
Subject: [PATCH] EXT-6276 Put in some gl flush calls to texture state
 functions.

---
 indra/llrender/llrender.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 0ce6bdf3985..9acfb6b0a89 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -387,6 +387,8 @@ void LLTexUnit::setTextureAddressMode(eTextureAddressMode mode)
 {
 	if (mIndex < 0 || mCurrTexture == 0) return;
 
+	gGL.flush();
+
 	activate();
 
 	glTexParameteri (sGLTextureType[mCurrTexType], GL_TEXTURE_WRAP_S, sGLAddressMode[mode]);
@@ -401,6 +403,8 @@ void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions optio
 {
 	if (mIndex < 0 || mCurrTexture == 0) return;
 
+	gGL.flush();
+
 	if (option == TFO_POINT)
 	{
 		glTexParameteri(sGLTextureType[mCurrTexType], GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-- 
GitLab