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

Samuel Pitoiset samuel.pitoiset at gmail.com
Wed Jul 9 07:34:45 PDT 2014


This enables GL_AMD_performance_monitor for nvc0.

V2:
 - use util_get_driver_query_group_info

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 7bf592c..16e2a9d 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"
@@ -1440,6 +1442,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, 29, 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 dc9b143..63924b4 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -620,6 +620,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 4802057..be9b1c8 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h
@@ -245,6 +245,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.0.0



More information about the mesa-dev mailing list