aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-09 16:34:28 +0100
committermarha <marha@users.sourceforge.net>2012-01-09 16:34:28 +0100
commita1e97828c89278770cb249039ec92d959440c640 (patch)
treef3d4ed7e3f3d589c606f01b3c9e6de03d638e2d3 /mesalib/src/mesa/state_tracker/st_program.c
parent7e9f4ea970e8f7008c212d7d3918a974eb0066da (diff)
downloadvcxsrv-a1e97828c89278770cb249039ec92d959440c640.tar.gz
vcxsrv-a1e97828c89278770cb249039ec92d959440c640.tar.bz2
vcxsrv-a1e97828c89278770cb249039ec92d959440c640.zip
xwininfo libX11 mesa mkfontscale xkeyboard-config git update 9 jan 2011
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_program.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_program.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_program.c b/mesalib/src/mesa/state_tracker/st_program.c
index aceaaf8c5..8d7469dfb 100644
--- a/mesalib/src/mesa/state_tracker/st_program.c
+++ b/mesalib/src/mesa/state_tracker/st_program.c
@@ -255,6 +255,10 @@ st_prepare_vertex_program(struct gl_context *ctx,
case VERT_RESULT_EDGE:
assert(0);
break;
+ case VERT_RESULT_CLIP_VERTEX:
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_CLIPVERTEX;
+ stvp->output_semantic_index[slot] = 0;
+ break;
case VERT_RESULT_TEX0:
case VERT_RESULT_TEX1:
@@ -432,10 +436,13 @@ st_get_vp_variant(struct st_context *st,
static unsigned
-st_translate_interp(enum glsl_interp_qualifier glsl_qual)
+st_translate_interp(enum glsl_interp_qualifier glsl_qual, bool is_color)
{
switch (glsl_qual) {
case INTERP_QUALIFIER_NONE:
+ if (is_color)
+ return TGSI_INTERPOLATE_LINEAR;
+ return TGSI_INTERPOLATE_PERSPECTIVE;
case INTERP_QUALIFIER_SMOOTH:
return TGSI_INTERPOLATE_PERSPECTIVE;
case INTERP_QUALIFIER_FLAT:
@@ -538,12 +545,14 @@ st_translate_fragment_program(struct st_context *st,
case FRAG_ATTRIB_COL0:
input_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
input_semantic_index[slot] = 0;
- interpMode[slot] = st_translate_interp(stfp->Base.InterpQualifier[attr]);
+ interpMode[slot] = st_translate_interp(stfp->Base.InterpQualifier[attr],
+ TRUE);
break;
case FRAG_ATTRIB_COL1:
input_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
input_semantic_index[slot] = 1;
- interpMode[slot] = st_translate_interp(stfp->Base.InterpQualifier[attr]);
+ interpMode[slot] = st_translate_interp(stfp->Base.InterpQualifier[attr],
+ TRUE);
break;
case FRAG_ATTRIB_FOGC:
input_semantic_name[slot] = TGSI_SEMANTIC_FOG;
@@ -600,7 +609,8 @@ st_translate_fragment_program(struct st_context *st,
if (attr == FRAG_ATTRIB_PNTC)
interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
else
- interpMode[slot] = st_translate_interp(stfp->Base.InterpQualifier[attr]);
+ interpMode[slot] = st_translate_interp(stfp->Base.InterpQualifier[attr],
+ FALSE);
break;
}
}