i965: Fix tex_swizzle when depth mode is GL_RED
authorChad Versace <chad.versace@intel.com>
Sun, 13 Mar 2011 01:49:41 +0000 (17:49 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 14 Mar 2011 20:03:50 +0000 (13:03 -0700)
Change swizzle from (x000) to (x001).

Signed-off-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_wm.c

index 390b3d6b7ef45c8dd4a83e97ed941b277cf05995..ca17e80c8da5d9421157876ec0450b24cf61c8c2 100644 (file)
@@ -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;
            }
         }