summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/hud/hud_context.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2015-08-02 17:24:30 +0200
committerMarek Olšák <marek.olsak@amd.com>2015-08-06 20:44:36 +0200
commit97a65d90fe88e6b4b4a42d866b23e73ce72f6dc2 (patch)
tree4868a2852136d54c8068a50b201a70dbc015e0ce /src/gallium/auxiliary/hud/hud_context.c
parent130a03e360e6aebe93e86b1d522ebf22371aa2d4 (diff)
downloadexternal_mesa3d-97a65d90fe88e6b4b4a42d866b23e73ce72f6dc2.zip
external_mesa3d-97a65d90fe88e6b4b4a42d866b23e73ce72f6dc2.tar.gz
external_mesa3d-97a65d90fe88e6b4b4a42d866b23e73ce72f6dc2.tar.bz2
gallium,hud: allow displaying cumulative values instead of average
The cumulative value is useful for queries like the number of shader compilations. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/gallium/auxiliary/hud/hud_context.c')
-rw-r--r--src/gallium/auxiliary/hud/hud_context.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
index e0ca29d..decc055 100644
--- a/src/gallium/auxiliary/hud/hud_context.c
+++ b/src/gallium/auxiliary/hud/hud_context.c
@@ -896,13 +896,15 @@ hud_parse_env_var(struct hud_context *hud, const char *env)
has_occlusion_query(hud->pipe->screen)) {
hud_pipe_query_install(pane, hud->pipe, "samples-passed",
PIPE_QUERY_OCCLUSION_COUNTER, 0, 0,
- PIPE_DRIVER_QUERY_TYPE_UINT64);
+ PIPE_DRIVER_QUERY_TYPE_UINT64,
+ PIPE_DRIVER_QUERY_RESULT_TYPE_AVERAGE);
}
else if (strcmp(name, "primitives-generated") == 0 &&
has_streamout(hud->pipe->screen)) {
hud_pipe_query_install(pane, hud->pipe, "primitives-generated",
PIPE_QUERY_PRIMITIVES_GENERATED, 0, 0,
- PIPE_DRIVER_QUERY_TYPE_UINT64);
+ PIPE_DRIVER_QUERY_TYPE_UINT64,
+ PIPE_DRIVER_QUERY_RESULT_TYPE_AVERAGE);
}
else {
boolean processed = FALSE;
@@ -929,7 +931,8 @@ hud_parse_env_var(struct hud_context *hud, const char *env)
if (i < Elements(pipeline_statistics_names)) {
hud_pipe_query_install(pane, hud->pipe, name,
PIPE_QUERY_PIPELINE_STATISTICS, i,
- 0, PIPE_DRIVER_QUERY_TYPE_UINT64);
+ 0, PIPE_DRIVER_QUERY_TYPE_UINT64,
+ PIPE_DRIVER_QUERY_RESULT_TYPE_AVERAGE);
processed = TRUE;
}
}