Mesa (master): i965/fs: Don't modify ann_count if not debugging.
Matt Turner
mattst88 at kemper.freedesktop.org
Sun May 25 17:29:32 UTC 2014
Module: Mesa
Branch: master
Commit: c9fd68408b83d274722b32b0e23c48d5d6e40862
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c9fd68408b83d274722b32b0e23c48d5d6e40862
Author: Matt Turner <mattst88 at gmail.com>
Date: Sun May 25 10:30:13 2014 -0700
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().
---
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 4 +++-
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index d1d2719..6ba8bb9 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -1751,7 +1751,9 @@ fs_generator::generate_code(exec_list *instructions,
* we've emitted any discards. If not, this will emit no code.
*/
if (!patch_discard_jumps_to_fb_writes()) {
- annotation->ann_count--;
+ if (unlikely(debug_flag)) {
+ annotation->ann_count--;
+ }
}
break;
diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
index bab1208..6755398 100644
--- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
@@ -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
* 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;
default:
More information about the mesa-commit
mailing list