summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-07-02 12:17:59 -0400
committerIlia Mirkin <[email protected]>2014-07-03 19:39:25 -0400
commit0fb6f1bf1d0729486443996c620ea1b766489e15 (patch)
treeb904e6476d610cc0296182c92f4248c19dcfbd68 /src/mesa/state_tracker/st_program.c
parent313acb3ffa2e73635807c4028b7aedced5bad379 (diff)
mesa/st: enable AMD_vertex_shader_viewport_index
The assumption is that any driver capable of emitting layer from the vertex shader and supporting viewports should be able to also handle emitting viewport index from the vertex shader. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Tobias Droste <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 1df411c3b87..3570557fee6 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -262,6 +262,10 @@ st_prepare_vertex_program(struct gl_context *ctx,
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_LAYER;
stvp->output_semantic_index[slot] = 0;
break;
+ case VARYING_SLOT_VIEWPORT:
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_VIEWPORT_INDEX;
+ stvp->output_semantic_index[slot] = 0;
+ break;
case VARYING_SLOT_TEX0:
case VARYING_SLOT_TEX1: