From: Chad Versace Date: Sun, 13 Mar 2011 01:49:41 +0000 (-0800) Subject: i965: Fix tex_swizzle when depth mode is GL_RED X-Git-Tag: mesa-7.11-rc1~1475 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1842b89f77bb7bd283b61e27cd69c643f2a60a22;p=platform%2Fupstream%2Fmesa.git i965: Fix tex_swizzle when depth mode is GL_RED Change swizzle from (x000) to (x001). Signed-off-by: Chad Versace Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 390b3d6..ca17e80 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -377,9 +377,10 @@ static void brw_wm_populate_key( struct brw_context *brw, } else if (t->DepthMode == GL_LUMINANCE) { swizzles[3] = SWIZZLE_ONE; } else if (t->DepthMode == GL_RED) { + /* See table 3.23 of the GL 3.0 spec. */ swizzles[1] = SWIZZLE_ZERO; swizzles[2] = SWIZZLE_ZERO; - swizzles[3] = SWIZZLE_ZERO; + swizzles[3] = SWIZZLE_ONE; } }