summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga/svga_screen.c')
-rw-r--r--src/gallium/drivers/svga/svga_screen.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 49059a5d294..bd1b03fc66c 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -492,6 +492,27 @@ svga_fence_finish(struct pipe_screen *screen,
}
+static int
+svga_get_driver_query_info(struct pipe_screen *screen,
+ unsigned index,
+ struct pipe_driver_query_info *info)
+{
+ static const struct pipe_driver_query_info queries[] = {
+ {"draw-calls", SVGA_QUERY_DRAW_CALLS, 0, FALSE},
+ {"fallbacks", SVGA_QUERY_FALLBACKS, 0, FALSE}
+ };
+
+ if (!info)
+ return Elements(queries);
+
+ if (index >= Elements(queries))
+ return 0;
+
+ *info = queries[index];
+ return 1;
+}
+
+
static void
svga_destroy_screen( struct pipe_screen *screen )
{
@@ -551,6 +572,7 @@ svga_screen_create(struct svga_winsys_screen *sws)
screen->fence_reference = svga_fence_reference;
screen->fence_signalled = svga_fence_signalled;
screen->fence_finish = svga_fence_finish;
+ screen->get_driver_query_info = svga_get_driver_query_info;
svgascreen->sws = sws;
svga_init_screen_resource_functions(svgascreen);