[Mesa-dev] [PATCH 4/4] mesa: Draw indirect is not allowed when xfb is active and unpaused

2015-10-20 Thread Marta Lofstedt
From: Marta Lofstedt 

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 
---
 src/mesa/main/api_validate.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index a084362..cb6112f 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -711,6 +711,15 @@ valid_draw_indirect(struct gl_context *ctx,
   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 but not paused)", name);
+   }
+
/*
 * OpenGL ES 3.1 spec. section 10.5:
 * "An INVALID_OPERATION error is generated if zero is bound to
-- 
2.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 4/4] mesa: Draw indirect is not allowed when xfb is active and unpaused

2015-10-20 Thread Tapani Pälli

On 10/20/2015 05:19 PM, Marta Lofstedt wrote:

From: Marta Lofstedt 

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 
---
  src/mesa/main/api_validate.c | 9 +
  1 file changed, 9 insertions(+)

diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index a084362..cb6112f 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -711,6 +711,15 @@ valid_draw_indirect(struct gl_context *ctx,
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 but not paused)", name);


better go with "and not paused" here like spec says;

Reviewed-by: Tapani Pälli 


+   }
+
 /*
  * OpenGL ES 3.1 spec. section 10.5:
  * "An INVALID_OPERATION error is generated if zero is bound to


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev