Mesa (master): mesa: fix GL error checking in TransformFeedbackVaryings

Marek Olšák mareko at kemper.freedesktop.org
Thu Oct 27 02:32:37 PDT 2011


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Mon Oct 24 02:21:48 2011 +0200

mesa: fix GL error checking in TransformFeedbackVaryings

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/main/transformfeedback.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 47efad1..86fff88 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -603,7 +603,9 @@ _mesa_TransformFeedbackVaryings(GLuint program, GLsizei count,
       return;
    }
 
-   if (count < 0 || count > ctx->Const.MaxTransformFeedbackSeparateAttribs) {
+   if (count < 0 ||
+       (bufferMode == GL_SEPARATE_ATTRIBS &&
+        count > ctx->Const.MaxTransformFeedbackSeparateAttribs)) {
       _mesa_error(ctx, GL_INVALID_VALUE,
                   "glTransformFeedbackVaryings(count=%d)", count);
       return;



More information about the mesa-commit mailing list