Hi,

attached is a change that fixes a problem with the isosurf mesa demo.

Please review.

Mathias
From ce63927e24df800ab6c89554ae9b2096cd79122a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mathias=20Fr=C3=B6hlich?= <mathias.froehl...@web.de>
Date: Fri, 16 Dec 2011 20:16:52 +0100
Subject: [PATCH] mesa: Set _NEW_ARRAY flag on rebind in any case.

Remove the special case, not seting the _NEW_ARRAY
flag for !ctx->VertexProgram._MaintainTnlProgram in
vbo_exec_array.c::recalculate_input_bindings.
This fixes a problem with isosurf that was exposed
by the recent array object changes.

Signed-off-by: Mathias Froehlich <mathias.froehl...@web.de>
---
 src/mesa/vbo/vbo_exec_array.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index a6e41e9..133ea0a 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -440,14 +440,6 @@ recalculate_input_bindings(struct gl_context *ctx)
 	 inputs[VERT_ATTRIB_GENERIC(i)] = &vbo->generic_currval[i];
          const_inputs |= VERT_BIT_GENERIC(i);
       }
-
-      /* There is no need to make _NEW_ARRAY dirty here for the TnL program,
-       * because it already takes care of invalidating the state necessary
-       * to revalidate vertex arrays. Not marking the state as dirty also
-       * improves performance (quite significantly in some apps).
-       */
-      if (!ctx->VertexProgram._MaintainTnlProgram)
-         ctx->NewState |= _NEW_ARRAY;
       break;
 
    case VP_NV:
@@ -474,8 +466,6 @@ recalculate_input_bindings(struct gl_context *ctx)
 	 inputs[VERT_ATTRIB_GENERIC(i)] = &vbo->generic_currval[i];
          const_inputs |= VERT_BIT_GENERIC(i);
       }
-
-      ctx->NewState |= _NEW_ARRAY;
       break;
 
    case VP_ARB:
@@ -514,10 +504,10 @@ recalculate_input_bindings(struct gl_context *ctx)
       }
 
       inputs[VERT_ATTRIB_GENERIC0] = inputs[0];
-      ctx->NewState |= _NEW_ARRAY;
       break;
    }
 
+   ctx->NewState |= _NEW_ARRAY;
    _mesa_set_varying_vp_inputs( ctx, VERT_BIT_ALL & (~const_inputs) );
 }
 
-- 
1.7.4.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to