diff options
author | Samuel Pitoiset <[email protected]> | 2014-07-04 11:41:46 +0200 |
---|---|---|
committer | Martin Peres <[email protected]> | 2015-05-06 00:03:35 +0300 |
commit | b620829b5e4364e9d5ed30e8603de41087ff454f (patch) | |
tree | 8ca84bfcd78932202f369400a3aafd2484691b03 /src/gallium/drivers/nouveau | |
parent | f137f5c691f5bd97a8b7f881f1f6837bff0ebc7a (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/drivers/nouveau')
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c index f21deeacfbc..5be150ea11c 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c @@ -1419,7 +1419,8 @@ nvc0_screen_get_driver_query_info(struct pipe_screen *pscreen, info->name = nvc0_drv_stat_names[id]; info->query_type = NVC0_QUERY_DRV_STAT(id); info->max_value = 0; - info->uses_byte_units = !!strstr(info->name, "bytes"); + if (strstr(info->name, "bytes")) + info->type = PIPE_DRIVER_QUERY_TYPE_BYTES; return 1; } else #endif @@ -1428,14 +1429,12 @@ nvc0_screen_get_driver_query_info(struct pipe_screen *pscreen, info->name = nve4_pm_query_names[id - NVC0_QUERY_DRV_STAT_COUNT]; info->query_type = NVE4_PM_QUERY(id - NVC0_QUERY_DRV_STAT_COUNT); info->max_value = (id < NVE4_PM_QUERY_METRIC_MP_OCCUPANCY) ? 0 : 100; - info->uses_byte_units = FALSE; return 1; } else if (screen->compute) { info->name = nvc0_pm_query_names[id - NVC0_QUERY_DRV_STAT_COUNT]; info->query_type = NVC0_PM_QUERY(id - NVC0_QUERY_DRV_STAT_COUNT); info->max_value = 0; - info->uses_byte_units = FALSE; return 1; } } @@ -1443,7 +1442,6 @@ nvc0_screen_get_driver_query_info(struct pipe_screen *pscreen, info->name = "this_is_not_the_query_you_are_looking_for"; info->query_type = 0xdeadd01d; info->max_value = 0; - info->uses_byte_units = FALSE; return 0; } |