From 6469f1c2f21ecd3b15a18957d882ef6a16b17ecf Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sun, 17 Jul 2011 00:24:08 -0500 Subject: SH-2031 High risk changeset, but potentially high reward. Addresses frame stalls in renderer by never using the fixed function pipeline if shaders are available. --- indra/llrender/llglslshader.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llrender/llglslshader.cpp') diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index ad2c662dfc..c582858413 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -49,6 +49,7 @@ using std::make_pair; using std::string; GLhandleARB LLGLSLShader::sCurBoundShader = 0; +bool LLGLSLShader::sNoFixedFunction = false; BOOL shouldChange(const LLVector4& v1, const LLVector4& v2) { @@ -376,6 +377,7 @@ BOOL LLGLSLShader::link(BOOL suppress_errors) void LLGLSLShader::bind() { + gGL.flush(); if (gGLManager.mHasShaderObjects) { glUseProgramObjectARB(mProgramObject); @@ -390,6 +392,7 @@ void LLGLSLShader::bind() void LLGLSLShader::unbind() { + gGL.flush(); if (gGLManager.mHasShaderObjects) { stop_glerror(); -- cgit v1.2.3 From 190ff3c346ae8f86b4533fd03f7a0dcb0808dde3 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 18 Jul 2011 10:39:02 -0500 Subject: SH-2031 Fix for link error in llui_libtest --- indra/llrender/llglslshader.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llrender/llglslshader.cpp') diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index c582858413..80c93bb0d2 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -51,6 +51,10 @@ using std::string; GLhandleARB LLGLSLShader::sCurBoundShader = 0; bool LLGLSLShader::sNoFixedFunction = false; +//UI shader -- declared here so llui_libtest will link properly +LLGLSLShader gUIProgram; +LLGLSLShader gSolidColorProgram; + BOOL shouldChange(const LLVector4& v1, const LLVector4& v2) { return v1 != v2; -- cgit v1.2.3