summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2018-05-23 01:47:55 -0400
committerMarek Olšák <marek.olsak@amd.com>2018-05-29 20:13:24 -0400
commit858ac8942d07d4c2d3e1cd1ac18381fa2e1de32c (patch)
treed45825e255346885b600dd1af8246cbe4997613b
parent16ac832392c7737e42f4b1019dc3e8c688c6d3f4 (diff)
mesa: expose ARB_tessellation_shader in the compatibility profile
Gallium drivers don't expose this yet due to: "st/mesa: use PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY" Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
-rw-r--r--src/mesa/drivers/dri/i965/intel_extensions.c3
-rw-r--r--src/mesa/main/extensions_table.h2
-rw-r--r--src/mesa/state_tracker/st_extensions.c4
3 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index 93a4de139e..34597c5e05 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -236,7 +236,8 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.ARB_shader_image_size = true;
ctx->Extensions.ARB_shader_precision = true;
ctx->Extensions.ARB_shader_texture_image_samples = true;
- ctx->Extensions.ARB_tessellation_shader = true;
+ if (ctx->API != API_OPENGL_COMPAT)
+ ctx->Extensions.ARB_tessellation_shader = true;
ctx->Extensions.ARB_texture_compression_bptc = true;
ctx->Extensions.ARB_texture_view = true;
ctx->Extensions.ARB_shader_storage_buffer_object = true;
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 02b0d2689c..447eb087fc 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -132,7 +132,7 @@ EXT(ARB_shadow , ARB_shadow
EXT(ARB_sparse_buffer , ARB_sparse_buffer , GLL, GLC, x , x , 2014)
EXT(ARB_stencil_texturing , ARB_stencil_texturing , GLL, GLC, x , x , 2012)
EXT(ARB_sync , ARB_sync , GLL, GLC, x , x , 2003)
-EXT(ARB_tessellation_shader , ARB_tessellation_shader , x , GLC, x , x , 2009)
+EXT(ARB_tessellation_shader , ARB_tessellation_shader , GLL, GLC, x , x , 2009)
EXT(ARB_texture_barrier , NV_texture_barrier , GLL, GLC, x , x , 2014)
EXT(ARB_texture_border_clamp , ARB_texture_border_clamp , GLL, x , x , x , 2000)
EXT(ARB_texture_buffer_object , ARB_texture_buffer_object , GLL, GLC, x , x , 2008)
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index b5622b330b..bf73d506c1 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -1020,8 +1020,10 @@ void st_init_extensions(struct pipe_screen *screen,
/* Below are the cases which cannot be moved into tables easily. */
+ /* The compatibility profile also requires GLSLVersionCompat >= 400. */
if (screen->get_shader_param(screen, PIPE_SHADER_TESS_CTRL,
- PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
+ PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0 &&
+ (api != API_OPENGL_COMPAT || consts->GLSLVersionCompat >= 400)) {
extensions->ARB_tessellation_shader = GL_TRUE;
}