added div by zero check for Fog.End/Start (from gallium-0.1)
This commit is contained in:
@@ -253,7 +253,8 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
|
||||
value[0] = ctx->Fog.Density;
|
||||
value[1] = ctx->Fog.Start;
|
||||
value[2] = ctx->Fog.End;
|
||||
value[3] = 1.0F / (ctx->Fog.End - ctx->Fog.Start);
|
||||
value[3] = (ctx->Fog.End == ctx->Fog.Start)
|
||||
? 1.0 : 1.0F / (ctx->Fog.End - ctx->Fog.Start);
|
||||
return;
|
||||
case STATE_CLIPPLANE:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user