OSDN Git Service

i965: Fix source depth reg setting for FSes reading and writing to depth.
[android-x86/external-mesa.git] / src / mesa / drivers / dri / i965 / brw_wm.c
index 14e05be..d381add 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);