[Mesa-dev] [PATCH 11/15] nvc0: implement pipe_screen::get_driver_query_group_info

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Mar 9 14:09:19 PDT 2015


This enables GL_AMD_performance_monitor for nvc0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/gallium/drivers/nouveau/nvc0/nvc0_query.c  | 10 ++++++++++
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c |  1 +
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.h |  3 +++
 3 files changed, 14 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
index e20a0b7..919e1d6 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
@@ -24,6 +24,8 @@
 
 #define NVC0_PUSH_EXPLICIT_SPACE_CHECKING
 
+#include "util/u_query.h"
+
 #include "nvc0/nvc0_context.h"
 #include "nv_object.xml.h"
 #include "nvc0/nve4_compute.xml.h"
@@ -1449,6 +1451,14 @@ nvc0_screen_get_driver_query_info(struct pipe_screen *pscreen,
    return 0;
 }
 
+int
+nvc0_screen_get_driver_query_group_info(struct pipe_screen *pscreen,
+                                        unsigned id,
+                                        struct pipe_driver_query_group_info *info)
+{
+   return util_get_driver_query_group_info(id, NVC0_QUERY_DRV_STAT_COUNT, info);
+}
+
 void
 nvc0_init_query_functions(struct nvc0_context *nvc0)
 {
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 686d892..3817771 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -650,6 +650,7 @@ nvc0_screen_create(struct nouveau_device *dev)
    pscreen->get_shader_param = nvc0_screen_get_shader_param;
    pscreen->get_paramf = nvc0_screen_get_paramf;
    pscreen->get_driver_query_info = nvc0_screen_get_driver_query_info;
+   pscreen->get_driver_query_group_info = nvc0_screen_get_driver_query_group_info;
 
    nvc0_screen_init_resource_functions(pscreen);
 
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h
index 8a1991f..6bf43d9 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h
@@ -243,6 +243,9 @@ nvc0_screen(struct pipe_screen *screen)
 int nvc0_screen_get_driver_query_info(struct pipe_screen *, unsigned,
                                       struct pipe_driver_query_info *);
 
+int nvc0_screen_get_driver_query_group_info(struct pipe_screen *, unsigned,
+                                            struct pipe_driver_query_group_info *);
+
 boolean nvc0_blitter_create(struct nvc0_screen *);
 void nvc0_blitter_destroy(struct nvc0_screen *);
 
-- 
2.3.1



More information about the mesa-dev mailing list