[Mesa-dev] [PATCH 08/15] svga: implement pipe_screen::get_driver_query_group_info
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon Mar 9 14:09:16 PDT 2015
This enables GL_AMD_performance_monitor for svga.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/gallium/drivers/svga/svga_context.h | 1 +
src/gallium/drivers/svga/svga_screen.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h
index a75f2a8..67f1816 100644
--- a/src/gallium/drivers/svga/svga_context.h
+++ b/src/gallium/drivers/svga/svga_context.h
@@ -45,6 +45,7 @@
/** Non-GPU queries for gallium HUD */
+#define SVGA_QUERY_COUNT 3
#define SVGA_QUERY_DRAW_CALLS (PIPE_QUERY_DRIVER_SPECIFIC + 0)
#define SVGA_QUERY_FALLBACKS (PIPE_QUERY_DRIVER_SPECIFIC + 1)
#define SVGA_QUERY_MEMORY_USED (PIPE_QUERY_DRIVER_SPECIFIC + 2)
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 6036549..44eddce 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -28,6 +28,7 @@
#include "util/u_inlines.h"
#include "util/u_string.h"
#include "util/u_math.h"
+#include "util/u_query.h"
#include "svga_winsys.h"
#include "svga_public.h"
@@ -582,6 +583,15 @@ svga_get_driver_query_info(struct pipe_screen *screen,
}
+static int
+svga_get_driver_query_group_info(struct pipe_screen *screen,
+ unsigned index,
+ struct pipe_driver_query_group_info *info)
+{
+ return util_get_driver_query_group_info(index, SVGA_QUERY_COUNT, info);
+}
+
+
static void
svga_destroy_screen( struct pipe_screen *screen )
{
@@ -642,6 +652,7 @@ svga_screen_create(struct svga_winsys_screen *sws)
screen->fence_signalled = svga_fence_signalled;
screen->fence_finish = svga_fence_finish;
screen->get_driver_query_info = svga_get_driver_query_info;
+ screen->get_driver_query_group_info = svga_get_driver_query_group_info;
svgascreen->sws = sws;
svga_init_screen_resource_functions(svgascreen);
--
2.3.1
More information about the mesa-dev
mailing list