Module: Mesa Branch: master Commit: 149140e922a9fbf892c60a755788fb88d9757749 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=149140e922a9fbf892c60a755788fb88d9757749
Author: Dave Airlie <[email protected]> Date: Wed Dec 18 18:00:33 2013 +1000 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]> --- src/mesa/state_tracker/st_program.c | 5 +++++ 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 e7c357c..f72122b 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; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
