aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_triangle.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-05-25 22:29:52 +0000
committerBrian Paul <[email protected]>2004-05-25 22:29:52 +0000
commite6e0ba781b0a6a1b8747cae49ca622a6a61b1bf8 (patch)
tree532064a9dbe77d74c93f1b82f85d2975c497d4f2 /src/mesa/swrast/s_triangle.c
parent3953e12890a7c1d45705126f581ae4c0893e917b (diff)
only use simple_z_textured_triangle if depthBits <= 16
Diffstat (limited to 'src/mesa/swrast/s_triangle.c')
-rw-r--r--src/mesa/swrast/s_triangle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 00c1a0ace25..ff4ebb3704d 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -192,6 +192,7 @@ _swrast_culltriangle( GLcontext *ctx,
* Render an RGB, GL_DECAL, textured triangle.
* Interpolate S,T, GL_LESS depth test, w/out mipmapping or
* perspective correction.
+ * Depth buffer bits must be <= sizeof(DEFAULT_SOFTWARE_DEPTH_TYPE)
*
* No fog.
*/
@@ -1091,7 +1092,8 @@ _swrast_choose_triangle( GLcontext *ctx )
&& ctx->Depth.Func == GL_LESS
&& ctx->Depth.Mask == GL_TRUE)
|| swrast->_RasterMask == TEXTURE_BIT)
- && ctx->Polygon.StippleFlag == GL_FALSE) {
+ && ctx->Polygon.StippleFlag == GL_FALSE
+ && ctx->Visual.depthBits <= 16) {
if (swrast->_RasterMask == (DEPTH_BIT | TEXTURE_BIT)) {
USE(simple_z_textured_triangle);
}