Commit c116ee60 authored by Dave Airlie's avatar Dave Airlie

st/mesa: add support for viewport index semantic

This adds GS output and FS input support, even though FS input
support isn't supported until GLSL 4.30 from what I can see.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent a21552a9
...@@ -572,6 +572,11 @@ st_translate_fragment_program(struct st_context *st, ...@@ -572,6 +572,11 @@ st_translate_fragment_program(struct st_context *st,
input_semantic_index[slot] = 0; input_semantic_index[slot] = 0;
interpMode[slot] = TGSI_INTERPOLATE_CONSTANT; interpMode[slot] = TGSI_INTERPOLATE_CONSTANT;
break; break;
case VARYING_SLOT_VIEWPORT:
input_semantic_name[slot] = TGSI_SEMANTIC_VIEWPORT_INDEX;
input_semantic_index[slot] = 0;
interpMode[slot] = TGSI_INTERPOLATE_CONSTANT;
break;
case VARYING_SLOT_CLIP_DIST0: case VARYING_SLOT_CLIP_DIST0:
input_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST; input_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;
input_semantic_index[slot] = 0; input_semantic_index[slot] = 0;
...@@ -1027,6 +1032,10 @@ st_translate_geometry_program(struct st_context *st, ...@@ -1027,6 +1032,10 @@ st_translate_geometry_program(struct st_context *st,
gs_output_semantic_name[slot] = TGSI_SEMANTIC_PRIMID; gs_output_semantic_name[slot] = TGSI_SEMANTIC_PRIMID;
gs_output_semantic_index[slot] = 0; gs_output_semantic_index[slot] = 0;
break; break;
case VARYING_SLOT_VIEWPORT:
gs_output_semantic_name[slot] = TGSI_SEMANTIC_VIEWPORT_INDEX;
gs_output_semantic_index[slot] = 0;
break;
case VARYING_SLOT_TEX0: case VARYING_SLOT_TEX0:
case VARYING_SLOT_TEX1: case VARYING_SLOT_TEX1:
case VARYING_SLOT_TEX2: case VARYING_SLOT_TEX2:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment