i965: Also do constant propagation for the second operand of CMP.
[mesa.git] / src / mesa / drivers / dri / i965 / gen6_wm_state.c
index afce1da666954f9876fa455ec945056caab76ebf..d88c86a1b259d32e0711715ac266de7432e2ccc3 100644 (file)
@@ -153,8 +153,7 @@ upload_wm_state(struct brw_context *brw)
 
    dw6 |= GEN6_WM_PERSPECTIVE_PIXEL_BARYCENTRIC;
 
-   /* This should probably be FS inputs read */
-   dw6 |= brw_count_bits(brw->vs.prog_data->outputs_written) <<
+   dw6 |= brw_count_bits(brw->fragment_program->Base.InputsRead) <<
       GEN6_WM_NUM_SF_OUTPUTS_SHIFT;
 
    BEGIN_BATCH(9);