mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
mesa: Care for differences in fog mode only if fog is consumed.
In creating fixed function vertex shader hash keys do only care for producing the varying output if fog is enabled and the varing is consumed in the fragment stage. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
6395a0ecf2
commit
06621e8a0d
1 changed files with 5 additions and 3 deletions
|
|
@ -222,9 +222,11 @@ static void make_state_key( struct gl_context *ctx, struct state_key *key )
|
|||
if (ctx->Transform.RescaleNormals)
|
||||
key->rescale_normals = 1;
|
||||
|
||||
key->fog_distance_mode =
|
||||
translate_fog_distance_mode(ctx->Fog.FogCoordinateSource,
|
||||
ctx->Fog.FogDistanceMode);
|
||||
/* Only distinguish fog parameters if we actually need */
|
||||
if (key->fragprog_inputs_read & VARYING_BIT_FOGC)
|
||||
key->fog_distance_mode =
|
||||
translate_fog_distance_mode(ctx->Fog.FogCoordinateSource,
|
||||
ctx->Fog.FogDistanceMode);
|
||||
|
||||
if (ctx->Point._Attenuated)
|
||||
key->point_attenuated = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue