etnaviv: add get_driver_query_group_info(..)
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Mon, 5 Mar 2018 22:26:43 +0000 (23:26 +0100)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Thu, 8 Mar 2018 19:44:04 +0000 (20:44 +0100)
This enables AMD_performance_monitor extension.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
src/gallium/drivers/etnaviv/etnaviv_query.c

index 9e897cd75a3eae313fa8bfd09911a77c5d266c39..2d257a9d34f99bbaa5a45d4930fd6547956c04a1 100644 (file)
@@ -110,6 +110,18 @@ etna_get_driver_query_info(struct pipe_screen *pscreen, unsigned index,
    return etna_sw_get_driver_query_info(pscreen, index, info);
 }
 
+static int
+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);
+
+   if (!info)
+      return nr_sw_groups;
+
+   return etna_sw_get_driver_query_group_info(pscreen, index, info);
+}
+
 static void
 etna_set_active_query_state(struct pipe_context *pipe, boolean enable)
 {
@@ -119,6 +131,7 @@ void
 etna_query_screen_init(struct pipe_screen *pscreen)
 {
    pscreen->get_driver_query_info = etna_get_driver_query_info;
+   pscreen->get_driver_query_group_info = etna_get_driver_query_group_info;
 }
 
 void