summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2009-04-08 16:39:17 +0100
committerAlan Hourihane <[email protected]>2009-04-08 16:39:17 +0100
commita97c846d613c3d7ec962ee095fd8282fa3b84eea (patch)
treedd7948a104771bef6f928a563e13885eed512ba8 /src/mesa/state_tracker/st_program.c
parent84e784665aa5b64c11538e90f0ff1482899a1965 (diff)
gallium: when using gl_PointCoord ensure we use the correct attribute.
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index f825204915c..6348e83d8ae 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -427,11 +427,13 @@ st_translate_fragment_program(struct st_context *st,
interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
break;
case FRAG_ATTRIB_FOGC:
- if (stfp->Base.UsesPointCoord)
+ if (stfp->Base.UsesPointCoord) {
stfp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- else
+ stfp->input_semantic_index[slot] = num_generic++;
+ } else {
stfp->input_semantic_name[slot] = TGSI_SEMANTIC_FOG;
- stfp->input_semantic_index[slot] = 0;
+ stfp->input_semantic_index[slot] = 0;
+ }
interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
break;
case FRAG_ATTRIB_TEX0: