Mesa (mesa_7_4_branch): mesa: replace >= with > when testing if we' ve exceeded max local params

Brian Paul brianp at kemper.freedesktop.org
Tue Apr 7 14:37:39 UTC 2009


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

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Apr  7 08:34:04 2009 -0600

mesa: replace >= with > when testing if we've exceeded max local params

Now a program that uses 256 locals works as it should.

(cherry picked from master, commit a4173956ebcc224b5a0d76bace07b87bdf8bed03)

---

 src/mesa/shader/arbprogparse.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index a3a75c3..8b7b5b1 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -1908,10 +1908,10 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst,
 
    /* Make sure we haven't blown past our parameter limits */
    if (((Program->Base.Target == GL_VERTEX_PROGRAM_ARB) &&
-        (Program->Base.NumParameters >=
+        (Program->Base.NumParameters >
          ctx->Const.VertexProgram.MaxLocalParams))
        || ((Program->Base.Target == GL_FRAGMENT_PROGRAM_ARB)
-           && (Program->Base.NumParameters >=
+           && (Program->Base.NumParameters >
                ctx->Const.FragmentProgram.MaxLocalParams))) {
       program_error(ctx, Program->Position, "Too many parameter variables");
       return 1;




More information about the mesa-commit mailing list