From 9e95fad02e1d8690deba91a8f30d722f039366ff Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Wed, 4 Jun 2008 15:44:38 +0800 Subject: [PATCH] i915: Fix GL_DEPTH_TEXTURE_MODE issue. (bug #16221) --- src/mesa/drivers/dri/i915/i915_texstate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c index 987c6c0454c..af7166e681d 100644 --- a/src/mesa/drivers/dri/i915/i915_texstate.c +++ b/src/mesa/drivers/dri/i915/i915_texstate.c @@ -65,7 +65,12 @@ translate_texture_format(GLuint mesa_format, GLenum DepthMode) case MESA_FORMAT_RGBA_FXT1: return (MAPSURF_COMPRESSED | MT_COMPRESS_FXT1); case MESA_FORMAT_Z16: - return (MAPSURF_16BIT | (DepthMode==GL_ALPHA?MT_16BIT_A16:MT_16BIT_L16)); + if (DepthMode == GL_ALPHA) + return (MAPSURF_16BIT | MT_16BIT_A16); + else if (DepthMode == GL_INTENSITY) + return (MAPSURF_16BIT | MT_16BIT_I16); + else + return (MAPSURF_16BIT | MT_16BIT_L16); case MESA_FORMAT_RGBA_DXT1: case MESA_FORMAT_RGB_DXT1: return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT1); -- 2.30.2