aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2013-12-18 18:00:33 +1000
committerDave Airlie <[email protected]>2013-12-18 22:46:29 +0000
commit149140e922a9fbf892c60a755788fb88d9757749 (patch)
treeeb00fa45a1c94b859f779de4d017b906f9bc919c /src/mesa/state_tracker/st_program.c
parent28b552bf6b7a0a79187db2887b25cbfa42cbf98b (diff)
st_glsl_to_tgsi: add support for prim id fragment shader input
For GLSL 1.50 we can get frag shaders with primitive id as an input, add support to the translator for this. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index e7c357c9e42..f72122b4f24 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -567,6 +567,11 @@ st_translate_fragment_program(struct st_context *st,
input_semantic_index[slot] = 0;
interpMode[slot] = TGSI_INTERPOLATE_CONSTANT;
break;
+ case VARYING_SLOT_PRIMITIVE_ID:
+ input_semantic_name[slot] = TGSI_SEMANTIC_PRIMID;
+ input_semantic_index[slot] = 0;
+ interpMode[slot] = TGSI_INTERPOLATE_CONSTANT;
+ break;
case VARYING_SLOT_CLIP_DIST0:
input_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;
input_semantic_index[slot] = 0;