Mesa (master): gallium: when using gl_PointCoord ensure we use the correct attribute.
Alan Hourihane
alanh at kemper.freedesktop.org
Wed Apr 8 15:40:08 UTC 2009
Module: Mesa
Branch: master
Commit: a97c846d613c3d7ec962ee095fd8282fa3b84eea
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a97c846d613c3d7ec962ee095fd8282fa3b84eea
Author: Alan Hourihane <alanh at vmware.com>
Date: Wed Apr 8 16:39:17 2009 +0100
gallium: when using gl_PointCoord ensure we use the correct attribute.
---
src/mesa/state_tracker/st_program.c | 8 +++++---
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 f825204..6348e83 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:
More information about the mesa-commit
mailing list