Mesa (mesa_7_4_branch): Flag GLSL programs as depending on constant state when they use uniforms.

Eric Anholt anholt at kemper.freedesktop.org
Wed May 6 19:30:35 UTC 2009


Module: Mesa
Branch: mesa_7_4_branch
Commit: c521d4629b2112128f2b3864bb8acf2ca84f1d5f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c521d4629b2112128f2b3864bb8acf2ca84f1d5f

Author: Eric Anholt <eric at anholt.net>
Date:   Tue May  5 12:14:29 2009 -0700

Flag GLSL programs as depending on constant state when they use uniforms.

This is not a cherry-pick, as it got fixed in master with the
_NEW_PROGRAM_CONSTANTS change.  Fixes bad rendering with various GLSL programs
idr and I have been writing.

---

 src/mesa/shader/slang/slang_link.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index b8427ca..2aa3851 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -249,6 +249,11 @@ link_uniform_vars(GLcontext *ctx,
             _mesa_append_uniform(shProg->Uniforms, p->Name, prog->Target, i);
          if (uniform)
             uniform->Initialized = p->Initialized;
+
+	 /* Add the flag indicating that the program is dependent on constant
+	  * state.
+	  */
+	 prog->Parameters->StateFlags |= _NEW_PROGRAM;
       }
 
       /* The samplerMap[] table we build here is used to remap/re-index




More information about the mesa-commit mailing list