summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-05-23 15:29:14 -0700
committerIan Romanick <[email protected]>2016-08-26 15:03:14 -0700
commit658e90f9a8c0c68e0bee5007cf3f654cc95188b6 (patch)
tree7d16df73b58753177ded2966482671455ed88fc9 /src/mesa/main/api_validate.c
parentaa228eb1a69b2b367583878f440423229d4d1ac3 (diff)
mesa: Document reasons for allowing XFB drawing modes in GLES 3.1 w/GL_OES_geometry_shader
Originally this patch added the checks to allow the draw calls with XFB, but commit 2dabd497 beat me to it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r--src/mesa/main/api_validate.c33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 384a8858e8b..b35751e4668 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -396,12 +396,30 @@ validate_DrawElements_common(struct gl_context *ctx,
const GLvoid *indices,
const char *caller)
{
- /* From the GLES3 specification, section 2.14.2 (Transform Feedback
- * Primitive Capture):
+ /* Section 2.14.2 (Transform Feedback Primitive Capture) of the OpenGL ES
+ * 3.1 spec says:
*
* The error INVALID_OPERATION is also generated by DrawElements,
* DrawElementsInstanced, and DrawRangeElements while transform feedback
* is active and not paused, regardless of mode.
+ *
+ * The OES_geometry_shader_spec says:
+ *
+ * Issues:
+ *
+ * ...
+ *
+ * (13) Does this extension change how transform feedback operates
+ * compared to unextended OpenGL ES 3.0 or 3.1?
+ *
+ * RESOLVED: Yes... Since we no longer require being able to predict how
+ * much geometry will be generated, we also lift the restriction that
+ * only DrawArray* commands are supported and also support the
+ * DrawElements* commands for transform feedback.
+ *
+ * This should also be reflected in the body of the spec, but that appears
+ * to have been overlooked. The body of the spec only explicitly allows
+ * the indirect versions.
*/
if (_mesa_is_gles3(ctx) && !ctx->Extensions.OES_geometry_shader &&
_mesa_is_xfb_active_and_unpaused(ctx)) {
@@ -730,6 +748,17 @@ valid_draw_indirect(struct gl_context *ctx,
*
* "An INVALID_OPERATION error is generated if
* transform feedback is active and not paused."
+ *
+ * The OES_geometry_shader spec says:
+ *
+ * On p. 250 in the errors section for the DrawArraysIndirect command,
+ * and on p. 254 in the errors section for the DrawElementsIndirect
+ * command, delete the errors which state:
+ *
+ * "An INVALID_OPERATION error is generated if transform feedback is
+ * active and not paused."
+ *
+ * (thus allowing transform feedback to work with indirect draw commands).
*/
if (_mesa_is_gles31(ctx) && !ctx->Extensions.OES_geometry_shader &&
_mesa_is_xfb_active_and_unpaused(ctx)) {