aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-02-20 13:26:45 -0800
committerEric Anholt <[email protected]>2014-02-22 19:23:20 -0800
commitf474ced0d13e288e24e694e583f041562c7ee2c8 (patch)
tree4789c4707258a3b7422730d03f2f4a794c83b233 /src/mesa/drivers/dri/i965
parent0e2c7e2f6ecfc2f5bf74e99955a175caa2f4515f (diff)
i965: Use the object label when available for shader_time output.
Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 58a7e811e3a..2145d7b6a66 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -318,7 +318,7 @@ static void
print_shader_time_line(const char *stage, const char *name,
int shader_num, uint64_t time, uint64_t total)
{
- printf("%-6s%-6s", stage, name);
+ printf("%-6s%-18s", stage, name);
if (shader_num != -1)
printf("%4d: ", shader_num);
@@ -406,24 +406,27 @@ brw_report_shader_time(struct brw_context *brw)
qsort(sorted, brw->shader_time.num_entries, sizeof(sorted[0]), compare_time);
printf("\n");
- printf("type ID cycles spent %% of total\n");
+ printf("type ID cycles spent %% of total\n");
for (int s = 0; s < brw->shader_time.num_entries; s++) {
const char *shader_name;
const char *stage;
/* Work back from the sorted pointers times to a time to print. */
int i = sorted[s] - scaled;
+ struct gl_shader_program *prog = brw->shader_time.shader_programs[i];
if (scaled[i] == 0)
continue;
int shader_num = -1;
- if (brw->shader_time.shader_programs[i]) {
- shader_num = brw->shader_time.shader_programs[i]->Name;
+ if (prog) {
+ shader_num = prog->Name;
/* The fixed function fragment shader generates GLSL IR with a Name
* of 0, and nothing else does.
*/
- if (shader_num == 0 &&
+ if (prog->Label) {
+ shader_name = prog->Label;
+ } else if (shader_num == 0 &&
(brw->shader_time.types[i] == ST_FS8 ||
brw->shader_time.types[i] == ST_FS16)) {
shader_name = "ff";