From ab34c9d78256f4c810bd5f8e76373a9f9e8a93aa Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 14 Aug 2018 09:43:11 +0200 Subject: [PATCH] shader: Enable tesselation extension manually for GLSL version < 3.20 GLES 3.1 might support tesselation shaders through the extension, but this requires the extension to be enabled manually. Signed-off-by: Gert Wollny Reviewed-by: Dave Airlie --- src/vrend_shader.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 4014bdd..3e32198 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -3995,6 +3995,13 @@ static char *emit_header(struct dump_ctx *ctx, char *glsl_hdr) STRCAT_WITH_RET(glsl_hdr, "#extension GL_OES_texture_storage_multisample_2d_array : require\n"); if (ctx->prog_type == TGSI_PROCESSOR_GEOMETRY) STRCAT_WITH_RET(glsl_hdr, "#extension GL_EXT_geometry_shader : require\n"); + + if ((ctx->prog_type == TGSI_PROCESSOR_TESS_CTRL || + ctx->prog_type == TGSI_PROCESSOR_TESS_EVAL)) { + if (ctx->cfg->glsl_version < 320) + STRCAT_WITH_RET(glsl_hdr, "#extension GL_OES_tessellation_shader : require\n"); + } + PAD_GPU_SHADER5(glsl_hdr); STRCAT_WITH_RET(glsl_hdr, "precision highp float;\n"); STRCAT_WITH_RET(glsl_hdr, "precision highp int;\n");