i965: Move common code out of #ifdef
authorMatt Turner <mattst88@gmail.com>
Thu, 16 Nov 2017 21:35:01 +0000 (13:35 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 17 Nov 2017 20:14:38 +0000 (12:14 -0800)
I'm going to change the call in a later patch and with the difference in
indentation level it wasn't immediately obvious that the calls were
identical.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/compiler/brw_fs_generator.cpp
src/intel/compiler/brw_vec4_generator.cpp

index 46f9a338ea29c2998dd9df81a4b0e0158d1fe0fa..96691ac3ffc8ab56a42ca39d2bc07dbe1f8e0616 100644 (file)
@@ -2192,17 +2192,14 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
    annotation_finalize(&annotation, p->next_insn_offset);
 
 #ifndef NDEBUG
-   bool validated = brw_validate_instructions(devinfo, p->store,
-                                              start_offset,
-                                              p->next_insn_offset,
-                                              &annotation);
+   bool validated =
 #else
    if (unlikely(debug_flag))
+#endif
       brw_validate_instructions(devinfo, p->store,
                                 start_offset,
                                 p->next_insn_offset,
                                 &annotation);
-#endif
 
    int before_size = p->next_insn_offset - start_offset;
    brw_compact_instructions(p, start_offset, annotation.ann_count,
index bde4110e5498e92b8acdd4969627e91b14d25149..63831e4ad63a8eaad664bc8abfd49d9e14ff8c9d 100644 (file)
@@ -2178,15 +2178,13 @@ generate_code(struct brw_codegen *p,
    annotation_finalize(&annotation, p->next_insn_offset);
 
 #ifndef NDEBUG
-   bool validated = brw_validate_instructions(devinfo, p->store,
-                                              0, p->next_insn_offset,
-                                              &annotation);
+   bool validated =
 #else
    if (unlikely(debug_flag))
+#endif
       brw_validate_instructions(devinfo, p->store,
                                 0, p->next_insn_offset,
                                 &annotation);
-#endif
 
    int before_size = p->next_insn_offset;
    brw_compact_instructions(p, 0, annotation.ann_count, annotation.ann);