i965/fs: Don't modify ann_count if not debugging.

If we make ann_count non-zero, annotation_finalize() won't bail.

Not modifying it seems to make the code more clear than would modifying
annotation_finalize().
This commit is contained in:
Matt Turner
2014-05-25 10:30:13 -07:00
parent c2c639ecf6
commit c9fd68408b
2 changed files with 8 additions and 2 deletions

View File

@@ -1751,7 +1751,9 @@ fs_generator::generate_code(exec_list *instructions,
* we've emitted any discards. If not, this will emit no code. * we've emitted any discards. If not, this will emit no code.
*/ */
if (!patch_discard_jumps_to_fb_writes()) { if (!patch_discard_jumps_to_fb_writes()) {
annotation->ann_count--; if (unlikely(debug_flag)) {
annotation->ann_count--;
}
} }
break; break;

View File

@@ -1243,7 +1243,11 @@ gen8_fs_generator::generate_code(exec_list *instructions,
/* This is the place where the final HALT needs to be inserted if /* This is the place where the final HALT needs to be inserted if
* we've emitted any discards. If not, this will emit no code. * we've emitted any discards. If not, this will emit no code.
*/ */
patch_discard_jumps_to_fb_writes(); if (!patch_discard_jumps_to_fb_writes()) {
if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
annotation->ann_count--;
}
}
break; break;
default: default: