summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-04-15 01:57:52 -0700
committerKenneth Graunke <[email protected]>2015-04-17 12:06:08 -0700
commite9efd667defe13c89881f138cb5719c72573ff73 (patch)
treed711cc45e9b4482c65b8063068cb562a133d9221 /src
parentcfab4ea9c654819c96272a62d7b1664e9038fe91 (diff)
i965: Make shader_time use 0 instead of -1 for "no meaningful ID".
0 is not a valid GLSL shader or ARB program ID. For some reason, shader_time used -1 instead...so we had code to detect 0, then override it to -1. We can just delete that. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 9e27c2aa974..0ca63de0cf9 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -346,7 +346,7 @@ print_shader_time_line(const char *stage, const char *name,
{
fprintf(stderr, "%-6s%-18s", stage, name);
- if (shader_num != -1)
+ if (shader_num != 0)
fprintf(stderr, "%4d: ", shader_num);
else
fprintf(stderr, " : ");
@@ -443,7 +443,7 @@ brw_report_shader_time(struct brw_context *brw)
if (scaled[i] == 0)
continue;
- int shader_num = -1;
+ int shader_num = 0;
if (prog) {
shader_num = prog->Name;
@@ -456,7 +456,6 @@ brw_report_shader_time(struct brw_context *brw)
(brw->shader_time.types[i] == ST_FS8 ||
brw->shader_time.types[i] == ST_FS16)) {
shader_name = "ff";
- shader_num = -1;
} else {
shader_name = "glsl";
}
@@ -464,7 +463,6 @@ brw_report_shader_time(struct brw_context *brw)
shader_num = brw->shader_time.programs[i]->Id;
if (shader_num == 0) {
shader_name = "ff";
- shader_num = -1;
} else {
shader_name = "prog";
}
@@ -495,10 +493,10 @@ brw_report_shader_time(struct brw_context *brw)
}
fprintf(stderr, "\n");
- print_shader_time_line("total", "vs", -1, total_by_type[ST_VS], total);
- print_shader_time_line("total", "gs", -1, total_by_type[ST_GS], total);
- print_shader_time_line("total", "fs8", -1, total_by_type[ST_FS8], total);
- print_shader_time_line("total", "fs16", -1, total_by_type[ST_FS16], total);
+ print_shader_time_line("total", "vs", 0, total_by_type[ST_VS], total);
+ print_shader_time_line("total", "gs", 0, total_by_type[ST_GS], total);
+ print_shader_time_line("total", "fs8", 0, total_by_type[ST_FS8], total);
+ print_shader_time_line("total", "fs16", 0, total_by_type[ST_FS16], total);
}
static void