i965: Fix source depth reg setting for FSes reading and writing to depth.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_wm.c
index 8a3b7df9c7892e07be8368c51463118a4074364b..d4e22d593967727a4844cad6a936252f2315d182 100644 (file)
@@ -202,6 +202,7 @@ static void brw_wm_populate_key( struct brw_context *brw,
    /* BRW_NEW_FRAGMENT_PROGRAM */
    const struct brw_fragment_program *fp = 
       (struct brw_fragment_program *)brw->fragment_program;
+   GLboolean uses_depth = (fp->program.Base.InputsRead & (1 << FRAG_ATTRIB_WPOS)) != 0;
    GLuint lookup = 0;
    GLuint line_aa;
    GLuint i;
@@ -263,6 +264,7 @@ static void brw_wm_populate_key( struct brw_context *brw,
         
    brw_wm_lookup_iz(line_aa,
                    lookup,
+                   uses_depth,
                    key);