Change swizzle from (x000) to (x001).

Test-case: piglit:spec/ARB_texture_rg/fs-shadow2d-red-01
Test-case: piglit:spec/ARB_texture_rg/fs-shadow2d-red-02
Test-case: piglit:spec/ARB_texture_rg/fs-shadow2d-red-03

Signed-off-by: Chad Versace <[email protected]>
---
 src/mesa/drivers/dri/i965/brw_wm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm.c 
b/src/mesa/drivers/dri/i965/brw_wm.c
index d3e5107..797b8e2 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -379,9 +379,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;
            }
         }
 
-- 
1.7.4

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to