From a4fcddc45158a246aab08ed84d08aa6bfd622bcc Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Mon, 11 Feb 2019 12:23:51 +0100 Subject: [PATCH] vrend: in OpenGL it is allowed to have a TES shader without a TCS shader Set the pre stage correctly when the TCS shader is missing on OpenGL and warn about it when on OpenGL ES. Signed-off-by: Gert Wollny --- src/vrend_renderer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 8dc0291..8b90536 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -2907,7 +2907,13 @@ static inline void vrend_fill_shader_key(struct vrend_context *ctx, prev_type = PIPE_SHADER_VERTEX; break; case PIPE_SHADER_TESS_EVAL: - prev_type = PIPE_SHADER_TESS_CTRL; + if (key->tcs_present) + prev_type = PIPE_SHADER_TESS_CTRL; + else + if (!ctx->shader_cfg.use_gles) + prev_type = PIPE_SHADER_VERTEX; + else + vrend_printf("Error OpenGL ES doesn't allow a tesselation evaluation shader without a teselation control shader"); break; case PIPE_SHADER_TESS_CTRL: prev_type = PIPE_SHADER_VERTEX;