aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-16 11:30:08 +0200
committermarha <marha@users.sourceforge.net>2013-10-16 11:30:08 +0200
commit56e12b1310b1b52d00bc27e919d915255af5bf03 (patch)
tree19379a18fe9a678a109397837339820892101e4b /mesalib/src/mesa/main/api_validate.c
parentc5883f8af060c0a300a29e732e8bb893bc8e0eca (diff)
parent9e23b44bfe1e6e85231b1c07d945cadf0c868648 (diff)
downloadvcxsrv-56e12b1310b1b52d00bc27e919d915255af5bf03.tar.gz
vcxsrv-56e12b1310b1b52d00bc27e919d915255af5bf03.tar.bz2
vcxsrv-56e12b1310b1b52d00bc27e919d915255af5bf03.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig libxcb libxcb/xcb-proto xserver mesa pixman xkbcomp git update 16 oct 2013 Conflicts: mesalib/src/mesa/drivers/dri/common/drisw_util.c pixman/pixman/pixman-mmx.c
Diffstat (limited to 'mesalib/src/mesa/main/api_validate.c')
-rw-r--r--mesalib/src/mesa/main/api_validate.c53
1 files changed, 35 insertions, 18 deletions
diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c
index 002992186..f285c9748 100644
--- a/mesalib/src/mesa/main/api_validate.c
+++ b/mesalib/src/mesa/main/api_validate.c
@@ -330,26 +330,43 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name)
if (_mesa_is_xfb_active_and_unpaused(ctx)) {
GLboolean pass = GL_TRUE;
- switch (mode) {
- case GL_POINTS:
- pass = ctx->TransformFeedback.Mode == GL_POINTS;
- break;
- case GL_LINES:
- case GL_LINE_STRIP:
- case GL_LINE_LOOP:
- pass = ctx->TransformFeedback.Mode == GL_LINES;
- break;
- default:
- pass = ctx->TransformFeedback.Mode == GL_TRIANGLES;
- break;
+ if(ctx->Shader.CurrentGeometryProgram) {
+ switch (ctx->Shader.CurrentGeometryProgram->Geom.OutputType) {
+ case GL_POINTS:
+ pass = ctx->TransformFeedback.Mode == GL_POINTS;
+ break;
+ case GL_LINE_STRIP:
+ pass = ctx->TransformFeedback.Mode == GL_LINES;
+ break;
+ case GL_TRIANGLE_STRIP:
+ pass = ctx->TransformFeedback.Mode == GL_TRIANGLES;
+ break;
+ default:
+ pass = GL_FALSE;
+ }
+ }
+ else {
+ switch (mode) {
+ case GL_POINTS:
+ pass = ctx->TransformFeedback.Mode == GL_POINTS;
+ break;
+ case GL_LINES:
+ case GL_LINE_STRIP:
+ case GL_LINE_LOOP:
+ pass = ctx->TransformFeedback.Mode == GL_LINES;
+ break;
+ default:
+ pass = ctx->TransformFeedback.Mode == GL_TRIANGLES;
+ break;
+ }
}
if (!pass) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(mode=%s vs transform feedback %s)",
- name,
- _mesa_lookup_prim_by_nr(mode),
- _mesa_lookup_prim_by_nr(ctx->TransformFeedback.Mode));
- return GL_FALSE;
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(mode=%s vs transform feedback %s)",
+ name,
+ _mesa_lookup_prim_by_nr(mode),
+ _mesa_lookup_prim_by_nr(ctx->TransformFeedback.Mode));
+ return GL_FALSE;
}
}