etnaviv: expose perfmon query groups
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Sun, 25 Mar 2018 20:30:07 +0000 (22:30 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Sun, 8 Apr 2018 20:23:45 +0000 (22:23 +0200)
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Chris Healy <cphealy@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_query.c

index 00f87d22cb13bcfc9999d81407a0c1ac11bfaa28..b076e87e78245f90e4faa626873b14e736d54781 100644 (file)
@@ -122,11 +122,15 @@ etna_get_driver_query_group_info(struct pipe_screen *pscreen, unsigned index,
                                  struct pipe_driver_query_group_info *info)
 {
    int nr_sw_groups = etna_sw_get_driver_query_group_info(pscreen, 0, NULL);
+   int nr_pm_groups = etna_pm_get_driver_query_group_info(pscreen, 0, NULL);
 
    if (!info)
-      return nr_sw_groups;
+      return nr_sw_groups + nr_pm_groups;
 
-   return etna_sw_get_driver_query_group_info(pscreen, index, info);
+   if (index < nr_sw_groups)
+      return etna_sw_get_driver_query_group_info(pscreen, index, info);
+
+   return etna_pm_get_driver_query_group_info(pscreen, index, info);
 }
 
 static void