diff options
author | Brian Paul <[email protected]> | 2000-05-18 18:12:36 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-05-18 18:12:36 +0000 |
commit | 3a94f5c0ac15b233e2db429bec4de7d1e5f6e72a (patch) | |
tree | 3a0cb7dac67df6ceda1e8665c1d0b525240447b6 /src/mesa/main/context.c | |
parent | 0c74657fe0bd8dc126062056d53a84dfee44076d (diff) |
added Kevin's 32bpp Z buffer fix
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 14446130c1b..2954b455c9f 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1,4 +1,4 @@ -/* $Id: context.c,v 1.64 2000/05/07 20:41:30 brianp Exp $ */ +/* $Id: context.c,v 1.65 2000/05/18 18:12:36 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -216,10 +216,18 @@ _mesa_initialize_visual( GLvisual *vis, vis->DepthMax = 1; vis->DepthMaxF = 1.0F; } - else { + else if (depthBits < 32) { vis->DepthMax = (1 << depthBits) - 1; vis->DepthMaxF = (GLfloat) vis->DepthMax; } + else { + /* Special case since shift values greater than or equal to the + * number of bits in the left hand expression's type are + * undefined. + */ + vis->DepthMax = 0xffffffff; + vis->DepthMaxF = (GLfloat) vis->DepthMax; + } return GL_TRUE; } |