From: Brian Paul Date: Wed, 17 Sep 2008 22:49:26 +0000 (-0600) Subject: gallium: fix fog vs. pointcoord attribute handling in mesa->TGSI conversion X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ee8d1ad679ea8540e91616933a880cdb3836a19;p=mesa.git gallium: fix fog vs. pointcoord attribute handling in mesa->TGSI conversion --- diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 936a6e32ea1..b2abf0286e7 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -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;