summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorBryan Cain <[email protected]>2012-01-02 14:49:46 -0600
committerBryan Cain <[email protected]>2012-01-05 13:03:26 -0600
commit59be691638200797583bce39a83f641d30d97492 (patch)
treeda1b4c1a25c79483fdb2e6ffba737a0e386dd126 /src/mesa/state_tracker/st_program.c
parent6951870e5790a4b563bfa3b943ed338f9c5922ac (diff)
st/mesa: add support for gl_ClipDistance
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index d62bfcd4ffc..aceaaf8c552 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -244,6 +244,14 @@ st_prepare_vertex_program(struct gl_context *ctx,
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_PSIZE;
stvp->output_semantic_index[slot] = 0;
break;
+ case VERT_RESULT_CLIP_DIST0:
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;
+ stvp->output_semantic_index[slot] = 0;
+ break;
+ case VERT_RESULT_CLIP_DIST1:
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;
+ stvp->output_semantic_index[slot] = 1;
+ break;
case VERT_RESULT_EDGE:
assert(0);
break;
@@ -547,6 +555,16 @@ st_translate_fragment_program(struct st_context *st,
input_semantic_index[slot] = 0;
interpMode[slot] = TGSI_INTERPOLATE_CONSTANT;
break;
+ case FRAG_ATTRIB_CLIP_DIST0:
+ input_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;
+ input_semantic_index[slot] = 0;
+ interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
+ break;
+ case FRAG_ATTRIB_CLIP_DIST1:
+ input_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;
+ input_semantic_index[slot] = 1;
+ interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
+ break;
/* In most cases, there is nothing special about these
* inputs, so adopt a convention to use the generic
* semantic name and the mesa FRAG_ATTRIB_ number as the