diff options
author | Brian <brian@yutani.localnet.net> | 2007-04-28 08:50:07 -0600 |
---|---|---|
committer | Brian <brian@yutani.localnet.net> | 2007-04-28 08:50:07 -0600 |
commit | bcc3baadbafc3f3deb79e3a753d9ee3867917073 (patch) | |
tree | f76ed6c529e550723d5867c1bac9054b09b8a069 /src | |
parent | 4ca7c804db63c9eeaddf1f65dc92006e2cabacec (diff) |
use EMIT_1F or EMIT_4F for fog depending on fragment program (bug 10788)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/swrast_setup/ss_context.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index 360cc61cb1..ccf0eb3d28 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -131,8 +131,10 @@ setup_vertex_format(GLcontext *ctx) if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_COLOR_INDEX )) EMIT_ATTR( _TNL_ATTRIB_COLOR_INDEX, EMIT_1F, index ); - if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_FOG )) - EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1F, attrib[FRAG_ATTRIB_FOGC]); + if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_FOG )) { + const GLint emit = ctx->FragmentProgram._Current ? EMIT_4F : EMIT_1F; + EMIT_ATTR( _TNL_ATTRIB_FOG, emit, attrib[FRAG_ATTRIB_FOGC]); + } if (RENDERINPUTS_TEST_RANGE(index_bitset, _TNL_FIRST_TEX, _TNL_LAST_TEX)) { |