diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-01-16 16:31:37 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-01-16 16:31:37 -0700 |
commit | bdc38254618d5f984e206b5ddb484c3cbc55c3bb (patch) | |
tree | d6ecf8dedda5d4fb9c6d73c877496fb4cedf42b0 /src/mesa/pipe/softpipe | |
parent | ecc9cf43af658413f91818fe90fdb0c2eaad9a46 (diff) |
Fix broken fog.
Note that fogcoord and front-facing attribs are in the same register, in the
X and Y channels, respectively.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_prim_setup.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.c b/src/mesa/pipe/softpipe/sp_prim_setup.c index 722cadc5c0..7847027cae 100644 --- a/src/mesa/pipe/softpipe/sp_prim_setup.c +++ b/src/mesa/pipe/softpipe/sp_prim_setup.c @@ -554,12 +554,6 @@ static void setup_tri_coefficients( struct setup_stage *setup ) */ setup_fragcoord_coeff(setup); } - else if (fs->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) { - /* FOG.y = front/back facing XXX fix this */ - setup->coef[fragSlot].a0[1] = 1 - setup->quad.facing; - setup->coef[fragSlot].dadx[1] = 0.0; - setup->coef[fragSlot].dady[1] = 0.0; - } else { #endif uint j; @@ -578,8 +572,18 @@ static void setup_tri_coefficients( struct setup_stage *setup ) break; default: /* invalid interp mode */ - assert(0); + /* assert(0); re-enable this and run demos/fogcoord.c ... */ + ; + } + + if (fs->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) { + /* FOG.y = front/back facing XXX fix this */ + setup->coef[fragSlot].a0[1] = 1 - setup->quad.facing; + setup->coef[fragSlot].dadx[1] = 0.0; + setup->coef[fragSlot].dady[1] = 0.0; } + + #if USE_INPUT_MAP } #endif |