[Mesa-dev] [PATCH 19/46] mesa: don't allow drawing with tess ctrl shader and without tess eval shader

Kenneth Graunke kenneth at whitecape.org
Fri Jun 19 02:39:20 PDT 2015


On Wednesday, June 17, 2015 01:01:15 AM Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  src/mesa/main/api_validate.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
> index 401120a..9a5ac69 100644
> --- a/src/mesa/main/api_validate.c
> +++ b/src/mesa/main/api_validate.c
> @@ -69,6 +69,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.
> +       *
> +       * Also, all vendors except one don't support a tess ctrl shader without
> +       * a tess eval shader anyway.
> +       */
> +      if (ctx->TessCtrlProgram._Current && !ctx->TessEvalProgram._Current) {
> +         _mesa_error(ctx, GL_INVALID_OPERATION,
> +                     "%s(tess eval shader is missing)", function);
> +         return false;
> +      }
> +
>        /* Section 7.3 (Program Objects) of the OpenGL 4.5 Core Profile spec
>         * says:
>         *
> 

This makes sense to me - the TCS always generates patches, and I don't
see any way to record those with transform feedback.  And nothing else
can use patches.  So...effectively you need a TES.

It sounds like they were leaving the door open for a vendor extension
that allowed transform feedback on patches, but nobody has written such
an extension yet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150619/33df884a/attachment.sig>


More information about the mesa-dev mailing list