diff options
author | Samuel Pitoiset <[email protected]> | 2016-03-09 21:13:22 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2016-03-10 18:20:26 +0100 |
commit | 41fb87249aba2810a8ab5313402af5927ddb0377 (patch) | |
tree | d1fa3f4790ecedd98faad799059269342f072c8b /src/gallium/drivers/nouveau/nvc0/nvc0_query.c | |
parent | 7b29188a3fd26f5bab484c0e5955e0cf68244f3a (diff) |
nvc0: rework the MP counters infrastructure
This mainly improves how we define the different list of queries.
Signed-off-by: Samuel Pitoiset <[email protected]>
Acked-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0/nvc0_query.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c index d2acce7d5be..f9f2bbe633f 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c @@ -204,10 +204,7 @@ nvc0_screen_get_driver_query_group_info(struct pipe_screen *pscreen, if (screen->base.drm->version >= 0x01000101) { if (screen->compute) { - if (screen->base.class_3d == NVE4_3D_CLASS) { - count += 2; - } else - if (screen->base.class_3d < NVE4_3D_CLASS) { + if (screen->base.class_3d <= NVE4_3D_CLASS) { count += 2; } } @@ -227,15 +224,8 @@ nvc0_screen_get_driver_query_group_info(struct pipe_screen *pscreen, * currently only used by AMD_performance_monitor. */ info->max_active_queries = 1; - - if (screen->base.class_3d == NVE4_3D_CLASS) { - info->num_queries = NVE4_HW_SM_QUERY_COUNT; - return 1; - } else - if (screen->base.class_3d < NVE4_3D_CLASS) { - info->num_queries = NVC0_HW_SM_QUERY_COUNT; - return 1; - } + info->num_queries = nvc0_hw_sm_get_num_queries(screen); + return 1; } } else if (id == NVC0_HW_METRIC_QUERY_GROUP) { |