summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_extensions.c7
-rw-r--r--src/mesa/state_tracker/st_program.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index cd10a0c9dea..f3798cffe18 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -605,6 +605,13 @@ void st_init_extensions(struct st_context *st)
ctx->Const.ForceGLSLVersion = st->options.force_glsl_version;
}
+ /* This extension needs full OpenGL 3.2, but we don't know if that's
+ * supported at this point. Only check the GLSL version. */
+ if (ctx->Const.GLSLVersion >= 150 &&
+ screen->get_param(screen, PIPE_CAP_TGSI_VS_LAYER)) {
+ ctx->Extensions.AMD_vertex_shader_layer = GL_TRUE;
+ }
+
if (ctx->Const.GLSLVersion >= 130) {
ctx->Const.NativeIntegers = GL_TRUE;
ctx->Const.MaxClipPlanes = 8;
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index f010e1889f8..e7c357c9e42 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -258,6 +258,10 @@ st_prepare_vertex_program(struct gl_context *ctx,
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_CLIPVERTEX;
stvp->output_semantic_index[slot] = 0;
break;
+ case VARYING_SLOT_LAYER:
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_LAYER;
+ stvp->output_semantic_index[slot] = 0;
+ break;
case VARYING_SLOT_TEX0:
case VARYING_SLOT_TEX1: