summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/hud
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2014-07-04 11:41:46 +0200
committerMartin Peres <[email protected]>2015-05-06 00:03:35 +0300
commitb620829b5e4364e9d5ed30e8603de41087ff454f (patch)
tree8ca84bfcd78932202f369400a3aafd2484691b03 /src/gallium/auxiliary/hud
parentf137f5c691f5bd97a8b7f881f1f6837bff0ebc7a (diff)
gallium: add new fields to pipe_driver_query_info
According to the spec of GL_AMD_performance_monitor, valid type values returned are UNSIGNED_INT, UNSIGNED_INT64_AMD, PERCENTAGE_AMD, FLOAT. This also introduces the new field group_id in order to categorize queries into groups. v2: add PIPE_DRIVER_QUERY_TYPE_BYTES v3: fix incorrect query type for radeon and svga drivers Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/hud')
-rw-r--r--src/gallium/auxiliary/hud/hud_driver_query.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/hud/hud_driver_query.c b/src/gallium/auxiliary/hud/hud_driver_query.c
index 53771fcae9d..1c8c485bb2f 100644
--- a/src/gallium/auxiliary/hud/hud_driver_query.c
+++ b/src/gallium/auxiliary/hud/hud_driver_query.c
@@ -187,6 +187,7 @@ hud_driver_query_install(struct hud_pane *pane, struct pipe_context *pipe,
struct pipe_screen *screen = pipe->screen;
struct pipe_driver_query_info query;
unsigned num_queries, i;
+ boolean uses_byte_units;
boolean found = FALSE;
if (!screen->get_driver_query_info)
@@ -205,7 +206,8 @@ hud_driver_query_install(struct hud_pane *pane, struct pipe_context *pipe,
if (!found)
return FALSE;
+ uses_byte_units = query.type == PIPE_DRIVER_QUERY_TYPE_BYTES;
hud_pipe_query_install(pane, pipe, query.name, query.query_type, 0,
- query.max_value, query.uses_byte_units);
+ query.max_value, uses_byte_units);
return TRUE;
}