Module: Mesa
Branch: master
Commit: 9e802736935816d5456ff93c990d3a751c11a971
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e802736935816d5456ff93c990d3a751c11a971

Author: Christian Gmeiner <christian.gmei...@gmail.com>
Date:   Sun Mar 25 22:30:07 2018 +0200

etnaviv: expose perfmon query groups

Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com>
Tested-by: Chris Healy <cphe...@gmail.com>

---

 src/gallium/drivers/etnaviv/etnaviv_query.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_query.c 
b/src/gallium/drivers/etnaviv/etnaviv_query.c
index 00f87d22cb..b076e87e78 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query.c
@@ -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

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to