gallium: fix fog vs. pointcoord attribute handling in mesa->TGSI conversion
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 17 Sep 2008 22:49:26 +0000 (16:49 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 17 Sep 2008 22:49:26 +0000 (16:49 -0600)
src/mesa/state_tracker/st_program.c

index 936a6e32ea14de7151ae77b617b2d1fc821de17f..b2abf0286e73cd54f08af4e01ed6bbceea4383bc 100644 (file)
@@ -409,7 +409,10 @@ st_translate_fragment_program(struct st_context *st,
             interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
             break;
          case FRAG_ATTRIB_FOGC:
-            stfp->input_semantic_name[slot] = TGSI_SEMANTIC_FOG;
+            if (stfp->Base.UsesPointCoord)
+               stfp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
+            else
+               stfp->input_semantic_name[slot] = TGSI_SEMANTIC_FOG;
             stfp->input_semantic_index[slot] = 0;
             interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
             break;