mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-14 11:10:30 +01:00
added div by zero check for Fog.End/Start (from gallium-0.1)
This commit is contained in:
parent
4b6b0fd526
commit
5976a6a75c
1 changed files with 2 additions and 1 deletions
|
|
@ -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:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue