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