diff options
author | Roland Scheidegger <rscheidegger@gmx.ch> | 2006-10-24 22:37:51 +0000 |
---|---|---|
committer | Roland Scheidegger <rscheidegger@gmx.ch> | 2006-10-24 22:37:51 +0000 |
commit | fc606f7db9072d4f40081aea8f92f1d4489a5115 (patch) | |
tree | 82b01e890ff3bd8ea96c7c92f688987b8e6b97ab /src/mesa/drivers/dri/r200/r200_maos_arrays.c | |
parent | e4298b94927f12c4710443ede1b50a325103ac72 (diff) | |
download | external_mesa3d-fc606f7db9072d4f40081aea8f92f1d4489a5115.zip external_mesa3d-fc606f7db9072d4f40081aea8f92f1d4489a5115.tar.gz external_mesa3d-fc606f7db9072d4f40081aea8f92f1d4489a5115.tar.bz2 |
fix (per-vertex) fog when using ARB_vp by incorporating fog factor computation into the vertex program (not yet fixed for swtnl). Simplify (and correct) the VTX_TCL_OUTPUT_VTXFMT handling when using vertex programs, turns out it's solely driven by the needs of the past-vertex stage of the pipeline, this should fix lockups with ill-specified applications using vertex programs (for instance applications enabling fog but not writing to fog coord output will now get (conformant) undefined results instead of lockups).
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_maos_arrays.c')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_maos_arrays.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c index 12ea462..92348c9 100644 --- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c +++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c @@ -420,12 +420,21 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) } if (inputs & VERT_BIT_FOG) { - if (!rmesa->tcl.fog.buf) - emit_vecfog( ctx, - &(rmesa->tcl.fog), - (char *)VB->FogCoordPtr->data, - VB->FogCoordPtr->stride, - count); + if (!rmesa->tcl.fog.buf) { + if (ctx->VertexProgram._Enabled) + emit_vector( ctx, + &(rmesa->tcl.fog), + (char *)VB->FogCoordPtr->data, + 1, + VB->FogCoordPtr->stride, + count); + else + emit_vecfog( ctx, + &(rmesa->tcl.fog), + (char *)VB->FogCoordPtr->data, + VB->FogCoordPtr->stride, + count); + } vfmt0 |= R200_VTX_DISCRETE_FOG; component[nr++] = &rmesa->tcl.fog; |