diff options
author | Keith Whitwell <[email protected]> | 2004-12-30 16:30:26 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2004-12-30 16:30:26 +0000 |
commit | c664f0c5155da800c34de1783754313e86654eda (patch) | |
tree | 2d8c7ab7452a987b432367191d1f5bd619f57189 /src/mesa/drivers/dri/unichrome/via_context.c | |
parent | 8be4747fd642aef719f9ee55a42f05fe69a043eb (diff) |
Calculate DEPTH_SCALE correctly for polygon offset.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_context.c')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index b3cc66f087c..4c70af60c83 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -356,6 +356,7 @@ viaCreateContext(const __GLcontextModes *mesaVis, vmesa->depth_max = (GLfloat)0xffff; vmesa->depth_clear_mask = 0xf << 28; vmesa->ClearDepth = 0xffff; + vmesa->polygon_offset_scale = 1.0 / vmesa->depth_max; break; case 24: vmesa->hasDepth = GL_TRUE; @@ -370,6 +371,7 @@ viaCreateContext(const __GLcontextModes *mesaVis, vmesa->have_hw_stencil = GL_TRUE; vmesa->stencilBits = mesaVis->stencilBits; vmesa->stencil_clear_mask = 0x1 << 28; + vmesa->polygon_offset_scale = 2.0 / vmesa->depth_max; break; case 32: vmesa->hasDepth = GL_TRUE; @@ -380,6 +382,7 @@ viaCreateContext(const __GLcontextModes *mesaVis, vmesa->depth_clear_mask = 0; vmesa->ClearDepth = 0xffffffff; vmesa->depth_clear_mask = 0xf << 28; + vmesa->polygon_offset_scale = 2.0 / vmesa->depth_max; break; default: assert(0); |