aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/transformfeedback.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-13 10:11:58 +0200
committermarha <marha@users.sourceforge.net>2012-07-13 10:11:58 +0200
commitf0a7d1d88be0c31bd471f4428c4493a93f2d9321 (patch)
tree15b5078011dc751f9c1a1bb21e51dc2e600ee205 /mesalib/src/mesa/main/transformfeedback.c
parent165450290d6c26756ede118f52ba2164abce7c9a (diff)
downloadvcxsrv-f0a7d1d88be0c31bd471f4428c4493a93f2d9321.tar.gz
vcxsrv-f0a7d1d88be0c31bd471f4428c4493a93f2d9321.tar.bz2
vcxsrv-f0a7d1d88be0c31bd471f4428c4493a93f2d9321.zip
xserver mesa git update 13 Jul 2012
Diffstat (limited to 'mesalib/src/mesa/main/transformfeedback.c')
-rw-r--r--mesalib/src/mesa/main/transformfeedback.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/transformfeedback.c b/mesalib/src/mesa/main/transformfeedback.c
index 6f8221201..7679b4b08 100644
--- a/mesalib/src/mesa/main/transformfeedback.c
+++ b/mesalib/src/mesa/main/transformfeedback.c
@@ -603,6 +603,38 @@ _mesa_TransformFeedbackVaryings(GLuint program, GLsizei count,
return;
}
+ if (ctx->Extensions.ARB_transform_feedback3) {
+ if (bufferMode == GL_INTERLEAVED_ATTRIBS) {
+ unsigned buffers = 1;
+
+ for (i = 0; i < count; i++) {
+ if (strcmp(varyings[i], "gl_NextBuffer") == 0)
+ buffers++;
+ }
+
+ if (buffers > ctx->Const.MaxTransformFeedbackBuffers) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTransformFeedbackVaryings(too many gl_NextBuffer "
+ "occurences)");
+ return;
+ }
+ } else {
+ for (i = 0; i < count; i++) {
+ if (strcmp(varyings[i], "gl_NextBuffer") == 0 ||
+ strcmp(varyings[i], "gl_SkipComponents1") == 0 ||
+ strcmp(varyings[i], "gl_SkipComponents2") == 0 ||
+ strcmp(varyings[i], "gl_SkipComponents3") == 0 ||
+ strcmp(varyings[i], "gl_SkipComponents4") == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTransformFeedbackVaryings(SEPARATE_ATTRIBS,"
+ "varying=%s)",
+ varyings[i]);
+ return;
+ }
+ }
+ }
+ }
+
/* free existing varyings, if any */
for (i = 0; i < shProg->TransformFeedback.NumVarying; i++) {
free(shProg->TransformFeedback.VaryingNames[i]);