[Mesa-dev] [PATCH 06/20] !UPSTREAM: print cfg counts
Matt Turner
mattst88 at gmail.com
Thu Jul 24 19:54:13 PDT 2014
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 1 +
src/mesa/drivers/dri/i965/brw_shader.cpp | 4 +++-
src/mesa/drivers/dri/i965/brw_shader.h | 1 +
src/mesa/drivers/dri/i965/brw_vec4.cpp | 1 +
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 2fd700f..59d46e8 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3171,6 +3171,7 @@ fs_visitor::run()
assert(sanity_param_count == fp->Base.Parameters->NumParameters);
calculate_cfg();
+ fprintf(stderr, "fs%d cfg: %d\n", dispatch_width, num_cfg);
return !failed;
}
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index f56ea68..0deb090 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -551,7 +551,8 @@ backend_visitor::backend_visitor(struct brw_context *brw,
prog(prog),
stage_prog_data(stage_prog_data),
cfg(NULL),
- stage(stage)
+ stage(stage),
+ num_cfg(0)
{
}
@@ -772,6 +773,7 @@ backend_visitor::calculate_cfg()
if (this->cfg)
return;
cfg = new(mem_ctx) cfg_t(&this->instructions);
+ num_cfg++;
}
void
diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
index 5c48671..40689eb 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.h
+++ b/src/mesa/drivers/dri/i965/brw_shader.h
@@ -161,6 +161,7 @@ public:
exec_list instructions;
cfg_t *cfg;
+ int num_cfg;
gl_shader_stage stage;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 5f6526d..5d276eb 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1743,6 +1743,7 @@ vec4_visitor::run()
assert(sanity_param_count == prog->Parameters->NumParameters);
calculate_cfg();
+ fprintf(stderr, "vec4 cfg: %d\n", num_cfg);
return !failed;
}
--
1.8.5.5
More information about the mesa-dev
mailing list