summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
authorMarta Lofstedt <marta.lofstedt@intel.com>2015-10-26 11:50:24 +0100
committerMarta Lofstedt <marta.lofstedt@linux.intel.com>2015-10-27 08:49:21 +0100
commit3daa7e5147f164e822269f13c3bcccfa6446fa83 (patch)
tree03dabb5cf09a508ad812bfe32fd18dffd1eec27f /src/mesa/main/api_validate.c
parent2c91e086563541271668f9ea6ca58689c0c97d44 (diff)
downloadexternal_mesa3d-3daa7e5147f164e822269f13c3bcccfa6446fa83.zip
external_mesa3d-3daa7e5147f164e822269f13c3bcccfa6446fa83.tar.gz
external_mesa3d-3daa7e5147f164e822269f13c3bcccfa6446fa83.tar.bz2
mesa: Draw indirect is not allowed when xfb is active and unpaused
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>
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r--src/mesa/main/api_validate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index e4cfc9b..e936d62 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -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: