[Mesa-dev] [PATCH 18/23] i965: Print IR annotations only with INTEL_DEBUG=annotation.
Matt Turner
mattst88 at gmail.com
Mon May 19 11:55:44 PDT 2014
Running shader-db without INTEL_DEBUG=annotation reduces the runtime
from ~90 to ~80 seconds on my machine. It also reduces the disk space
consumed by the .out files from 660 MB (676 on disk) to 343 MB (358 on
disk).
---
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 6 ++++--
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 6 ++++--
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | 6 ++++--
src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp | 6 ++++--
src/mesa/drivers/dri/i965/intel_debug.c | 1 +
src/mesa/drivers/dri/i965/intel_debug.h | 1 +
6 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index b0b3b56..872b5a4 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -1363,8 +1363,10 @@ fs_generator::generate_code(exec_list *instructions, int *num_annotations,
}
ann[ann_num].offset = p->next_insn_offset;
- ann[ann_num].ir = inst->ir;
- ann[ann_num].annotation = inst->annotation;
+ if (INTEL_DEBUG & DEBUG_ANNOTATION) {
+ ann[ann_num].ir = inst->ir;
+ ann[ann_num].annotation = inst->annotation;
+ }
if (cfg->blocks[block_num]->start == inst) {
ann[ann_num].block_start = cfg->blocks[block_num];
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index 2176de4..5980aad 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -1296,8 +1296,10 @@ vec4_generator::generate_code(exec_list *instructions, int *num_annotations,
}
ann[ann_num].offset = p->next_insn_offset;
- ann[ann_num].ir = inst->ir;
- ann[ann_num].annotation = inst->annotation;
+ if (INTEL_DEBUG & DEBUG_ANNOTATION) {
+ ann[ann_num].ir = inst->ir;
+ ann[ann_num].annotation = inst->annotation;
+ }
if (cfg->blocks[block_num]->start == inst) {
ann[ann_num].block_start = cfg->blocks[block_num];
diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
index 7e90ee6..9011bff 100644
--- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
@@ -924,8 +924,10 @@ gen8_fs_generator::generate_code(exec_list *instructions, int *num_annotations,
}
ann[ann_num].offset = next_inst_offset;
- ann[ann_num].ir = ir->ir;
- ann[ann_num].annotation = ir->annotation;
+ if (INTEL_DEBUG & DEBUG_ANNOTATION) {
+ ann[ann_num].ir = ir->ir;
+ ann[ann_num].annotation = ir->annotation;
+ }
if (cfg->blocks[block_num]->start == ir) {
ann[ann_num].block_start = cfg->blocks[block_num];
diff --git a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp
index 5470f87..4aeaf89 100644
--- a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp
@@ -878,8 +878,10 @@ gen8_vec4_generator::generate_code(exec_list *instructions,
}
ann[ann_num].offset = next_inst_offset;
- ann[ann_num].ir = ir->ir;
- ann[ann_num].annotation = ir->annotation;
+ if (INTEL_DEBUG & DEBUG_ANNOTATION) {
+ ann[ann_num].ir = ir->ir;
+ ann[ann_num].annotation = ir->annotation;
+ }
if (cfg->blocks[block_num]->start == ir) {
ann[ann_num].block_start = cfg->blocks[block_num];
diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c
index 621a571..64d2c61 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.c
+++ b/src/mesa/drivers/dri/i965/intel_debug.c
@@ -64,6 +64,7 @@ static const struct dri_debug_control debug_control[] = {
{ "no16", DEBUG_NO16 },
{ "blorp", DEBUG_BLORP },
{ "nodualobj", DEBUG_NO_DUAL_OBJECT_GS },
+ { "annotation", DEBUG_ANNOTATION },
{ NULL, 0 }
};
diff --git a/src/mesa/drivers/dri/i965/intel_debug.h b/src/mesa/drivers/dri/i965/intel_debug.h
index 6402cec..49cc584 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.h
+++ b/src/mesa/drivers/dri/i965/intel_debug.h
@@ -60,6 +60,7 @@ extern uint64_t INTEL_DEBUG;
#define DEBUG_NO16 0x20000000
#define DEBUG_VUE 0x40000000
#define DEBUG_NO_DUAL_OBJECT_GS 0x80000000
+#define DEBUG_ANNOTATION 0x100000000
#ifdef HAVE_ANDROID_PLATFORM
#define LOG_TAG "INTEL-MESA"
--
1.8.3.2
More information about the mesa-dev
mailing list