diff options
author | Kenneth Graunke <[email protected]> | 2017-02-22 17:16:01 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-02-23 11:07:06 -0800 |
commit | e6e8475b0f17e605e1c8251a076cc1d48734873b (patch) | |
tree | 047c0a672506b2a1da5f2d72a092945840ad5649 /src/compiler/glsl | |
parent | a9c488f2858f8a383dd50e557ec8a832bcb35f47 (diff) |
glsl: Raise a link error for non-SSO ES programs with a TES but no TCS.
OpenGL allows the TCS to be missing and supplies an implicit passthrough
shader, but OpenGL ES does not (see section 7.3 of the ES 3.2 spec,
cited above in the code).
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 <[email protected]>
Reviewed-by: Andres Gomez <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 7343e4ebe5e..3eddbe24d09 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. */ |