intel: Add a batch flush between front-buffer downsample and X protocol.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_fs_cse.cpp
index 2a8fd0be2e7d6a4e79d5d6659d6c51beb5cfde04..e715c3767b9ef1b41c0c0ff2ad4f9b8881a12abe 100644 (file)
@@ -97,8 +97,9 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
        inst = (fs_inst *) inst->next) {
 
       /* Skip some cases. */
-      if (is_expression(inst) && !inst->predicate &&
-          !inst->force_uncompressed && !inst->force_sechalf &&
+      if (is_expression(inst) &&
+          !inst->predicate &&
+          !inst->is_partial_write() &&
           !inst->conditional_mod)
       {
         bool found = false;
@@ -195,7 +196,7 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
             /* Kill any AEB entries using registers that don't get reused any
              * more -- a sure sign they'll fail operands_match().
              */
-            if (src_reg->file == GRF && virtual_grf_use[src_reg->reg] < ip) {
+            if (src_reg->file == GRF && virtual_grf_end[src_reg->reg] < ip) {
                entry->remove();
                ralloc_free(entry);
               break;