[Mesa-dev] [PATCH 12/18] mesa: Skip ES 3.0/3.1 transform feedback primitive counting error.

Kenneth Graunke kenneth at whitecape.org
Mon Aug 1 17:29:39 UTC 2016


This error condition is not implementable when using tessellation or
geometry shaders.  The text was also removed from the ES 3.2 spec.
I believe the intended behavior is to remove the error condition
when either OES_geometry_shader or OES_tessellation_shader are
exposed.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/main/api_validate.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 2ee2cd8..68f55b6 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -546,8 +546,20 @@ validate_draw_arrays(struct gl_context *ctx, const char *func,
     *
     * This is in contrast to the behaviour of desktop GL, where the extra
     * primitives are silently dropped from the transform feedback buffer.
+    *
+    * This text is removed in ES 3.2, presumably because it's not really
+    * implementable with geometry and tessellation shaders.  In fact,
+    * issue 13 of the OES_geometry_shader spec says:
+    *
+    * "Since we no longer require being able to predict how much geometry will
+    *  be generated [...]"
+    *
+    * It isn't speaking about this condition specifically, but speaks of
+    * lifting similar transform feedback drawing restrictions.
     */
-   if (_mesa_is_gles3(ctx) && _mesa_is_xfb_active_and_unpaused(ctx)) {
+   if (_mesa_is_gles3(ctx) && _mesa_is_xfb_active_and_unpaused(ctx) &&
+       !_mesa_has_OES_geometry_shader(ctx) &&
+       !_mesa_has_OES_tessellation_shader(ctx)) {
       size_t prim_count = vbo_count_tessellated_primitives(mode, count, 1);
       if (xfb_obj->GlesRemainingPrims < prim_count) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
-- 
2.9.2



More information about the mesa-dev mailing list