i965/fs: Add no_dd_{clear,check} fields to fs_inst.
authorMatt Turner <mattst88@gmail.com>
Sun, 29 Jun 2014 06:31:04 +0000 (23:31 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 1 Jul 2014 05:31:05 +0000 (22:31 -0700)
And plumb them through. Also make the assert in the generator look like
the vec4 one.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_generator.cpp

index 3d0da23acf1d3337b98d5c970e281a68080f61e4..58e71756b16010033e8276575ed88bd7482bfc71 100644 (file)
@@ -239,6 +239,8 @@ public:
    bool force_uncompressed:1;
    bool force_sechalf:1;
    bool force_writemask_all:1;
+   bool no_dd_clear:1;
+   bool no_dd_check:1;
 };
 
 /**
index 0f41781183dec910cdb8d27fc97b41dedecd464a..3dab2dae0e4e80b2f08408dfcd0a81a3dff995cd 100644 (file)
@@ -1755,14 +1755,16 @@ fs_generator::generate_code(exec_list *instructions)
          break;
       }
 
-      if (inst->conditional_mod) {
-         /* Set the conditional modifier on the last instruction we generated.
-          * Also, make sure we only emitted one instruction - anything else
-          * doesn't make sense.
-          */
-         assert(p->next_insn_offset == last_insn_offset + 16);
+      if (inst->no_dd_clear || inst->no_dd_check || inst->conditional_mod) {
+         assert(p->next_insn_offset == last_insn_offset + 16 ||
+                !"conditional_mod, no_dd_check, or no_dd_clear set for IR "
+                 "emitting more than 1 instruction");
+
          brw_inst *last = &p->store[last_insn_offset / 16];
+
          brw_inst_set_cond_modifier(brw, last, inst->conditional_mod);
+         brw_inst_set_no_dd_clear(brw, last, inst->no_dd_clear);
+         brw_inst_set_no_dd_check(brw, last, inst->no_dd_check);
       }
    }