[Mesa-dev] [PATCH] glsl: Raise a link error for non-SSO ES programs with a TES but no TCS.
Andres Gomez
agomez at igalia.com
Thu Feb 23 12:03:36 UTC 2017
I would welcome a reference to the text in Secption 7.3 of the OpenGL
ES 3.2 specs as a code comment and commit text but, other than that,
this is:
Reviewed-by: Andres Gomez <agomez at igalia.com>
On Wed, 2017-02-22 at 17:54 -0800, Kenneth Graunke wrote:
> OpenGL allows the TCS to be missing and supplies an implicit passthrough
> shader, but OpenGL ES does not.
>
> One open question is how to handle this for ARB_ES3_2_compatibility.
> This patch raises the link error for all ES shading language programs,
> but it might make sense to base it on the API. The approach taken in
> this patch is more restrictive, but should still allow any valid ES
> programs to work in GL.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/compiler/glsl/linker.cpp | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
> index b6f8bc4212e..9e68c6e2d71 100644
> --- a/src/compiler/glsl/linker.cpp
> +++ b/src/compiler/glsl/linker.cpp
> @@ -4743,6 +4743,16 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
> "tessellation evaluation shader\n");
> goto done;
> }
> +
> + if (prog->IsES) {
> + if (num_shaders[MESA_SHADER_TESS_EVAL] > 0 &&
> + num_shaders[MESA_SHADER_TESS_CTRL] == 0) {
> + linker_error(prog, "GLSL ES requires non-separable programs "
> + "containing a tessellation evaluation shader to also "
> + "be linked with a tessellation control shader\n");
> + goto done;
> + }
> + }
> }
>
> /* Compute shaders have additional restrictions. */
--
Br,
Andres
More information about the mesa-dev
mailing list