mesa: Draw indirect is not allowed when xfb is active and unpaused
authorMarta Lofstedt <marta.lofstedt@intel.com>
Mon, 26 Oct 2015 10:50:24 +0000 (11:50 +0100)
committerMarta Lofstedt <marta.lofstedt@linux.intel.com>
Tue, 27 Oct 2015 07:49:21 +0000 (08:49 +0100)
OpenGL ES 3.1 specification, section 10.5:
"An INVALID_OPERATION error is generated if
transform feedback is active and not paused."

Signed-off-by: Marta Lofstedt <marta.lofstedt@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/api_validate.c

index e4cfc9bfdafd3c924afe8b92bf9eb00edfbefa31..e936d62d488e45c68b6cbf68140c19003456025c 100644 (file)
@@ -701,6 +701,15 @@ valid_draw_indirect(struct gl_context *ctx,
    if (!_mesa_valid_prim_mode(ctx, mode, name))
       return GL_FALSE;
 
+   /* OpenGL ES 3.1 specification, section 10.5:
+    *
+    *      "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)) {
+      _mesa_error(ctx, GL_INVALID_OPERATION,
+                  "%s(TransformFeedback is active and not paused)", name);
+   }
 
    /* From OpenGL version 4.4. section 10.5
     * and OpenGL ES 3.1, section 10.6: