mesa: allow xfb to be active in GLES when geometry shader is enabled.
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 21 May 2016 23:43:42 +0000 (19:43 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 24 May 2016 00:03:20 +0000 (20:03 -0400)
OES_geometry_shader has wording to allow xfb when using Draw*Indirect
and DrawElements.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/api_validate.c

index a714c0a21463498ffadc4517336fa3f25e465d19..c7625c3f6945117d54391b56889f589bc236d320 100644 (file)
@@ -391,7 +391,8 @@ validate_DrawElements_common(struct gl_context *ctx,
     *   DrawElementsInstanced, and DrawRangeElements while transform feedback
     *   is active and not paused, regardless of mode.
     */
-   if (_mesa_is_gles3(ctx) && _mesa_is_xfb_active_and_unpaused(ctx)) {
+   if (_mesa_is_gles3(ctx) && !ctx->Extensions.OES_geometry_shader &&
+       _mesa_is_xfb_active_and_unpaused(ctx)) {
       _mesa_error(ctx, GL_INVALID_OPERATION,
                   "%s(transform feedback active)", caller);
       return false;
@@ -741,7 +742,8 @@ valid_draw_indirect(struct gl_context *ctx,
     *      "An INVALID_OPERATION error is generated if
     *      transform feedback is active and not paused."
     */
-   if (_mesa_is_gles31(ctx) && _mesa_is_xfb_active_and_unpaused(ctx)) {
+   if (_mesa_is_gles31(ctx) && !ctx->Extensions.OES_geometry_shader &&
+       _mesa_is_xfb_active_and_unpaused(ctx)) {
       _mesa_error(ctx, GL_INVALID_OPERATION,
                   "%s(TransformFeedback is active and not paused)", name);
    }