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 <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
macos/master
Gert Wollny 6 years ago committed by Dave Airlie
parent 3e7a6ac4e7
commit ab34c9d782
  1. 7
      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"); STRCAT_WITH_RET(glsl_hdr, "#extension GL_OES_texture_storage_multisample_2d_array : require\n");
if (ctx->prog_type == TGSI_PROCESSOR_GEOMETRY) if (ctx->prog_type == TGSI_PROCESSOR_GEOMETRY)
STRCAT_WITH_RET(glsl_hdr, "#extension GL_EXT_geometry_shader : require\n"); 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); PAD_GPU_SHADER5(glsl_hdr);
STRCAT_WITH_RET(glsl_hdr, "precision highp float;\n"); STRCAT_WITH_RET(glsl_hdr, "precision highp float;\n");
STRCAT_WITH_RET(glsl_hdr, "precision highp int;\n"); STRCAT_WITH_RET(glsl_hdr, "precision highp int;\n");

Loading…
Cancel
Save