[Mesa-stable] [Mesa-dev] [PATCH 1/5] mesa: Do (TCS && !TES) draw time validation in ES as well.

Kenneth Graunke kenneth at whitecape.org
Sat Feb 11 09:24:49 UTC 2017


On Saturday, February 11, 2017 12:21:36 AM PST Alejandro PiƱeiro wrote:
> On 11/02/17 08:52, Kenneth Graunke wrote:
> > Now that we have OES_tessellation_shader, the same situation can occur
> > in ES too, not just GL core profile.
> >
> > Having a TCS but no TES may confuse drivers - i965 crashes, for example.
> >
> > This prevents regressions in
> > ES31-CTS.core.tessellation_shader.single.xfb_captures_data_from_correct_stage
> > with some SSO pipeline validation changes I'm making.
> >
> > Cc: "17.0" <mesa-stable at lists.freedesktop.org>
> > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> > ---
> >  src/mesa/main/api_validate.c | 38 +++++++++++++++++++-------------------
> >  1 file changed, 19 insertions(+), 19 deletions(-)
> >
> > diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
> > index 6c95701ea0e..d64264fe1e9 100644
> > --- a/src/mesa/main/api_validate.c
> > +++ b/src/mesa/main/api_validate.c
> > @@ -236,6 +236,25 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
> >        return false;
> >     }
> >  
> > +   /* The spec argues that this is allowed because a tess ctrl shader
> > +    * without a tess eval shader can be used with transform feedback.
> > +    * However, glBeginTransformFeedback doesn't allow GL_PATCHES and
> > +    * therefore doesn't allow tessellation.
> > +    *
> > +    * Further investigation showed that this is indeed a spec bug and
> > +    * a tess ctrl shader without a tess eval shader shouldn't have been
> > +    * allowed, because there is no API in GL 4.0 that can make use this
> > +    * to produce something useful.
> 
> As the check is done for both OpenGL and OpenGL ES, how about update the
> comment to include both, as right now only mentions desktop?
> 
> In any case, this is a nitpick, feel free to ignore if you think that
> increases the comment without good reason.

Good call, I've changed it to:

+   /* Section 11.2 (Tessellation) of the ES 3.2 spec says:
+    *
+    * "An INVALID_OPERATION error is generated by any command that
+    *  transfers vertices to the GL if the current program state has
+    *  one but not both of a tessellation control shader and tessellation
+    *  evaluation shader."
+    *
+    * The OpenGL spec argues that this is allowed because a tess ctrl shader

Thanks Alejandro!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20170211/fb79a48e/attachment.sig>


More information about the mesa-stable mailing list