[Mesa-dev] [PATCH 09/15] freedreno: implement pipe_screen::get_driver_query_group_info
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon Mar 9 14:09:17 PDT 2015
This enables GL_AMD_performance_monitor for freedreno.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/gallium/drivers/freedreno/freedreno_query.c | 9 +++++++++
src/gallium/drivers/freedreno/freedreno_query.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/src/gallium/drivers/freedreno/freedreno_query.c b/src/gallium/drivers/freedreno/freedreno_query.c
index db2683c..13973a8 100644
--- a/src/gallium/drivers/freedreno/freedreno_query.c
+++ b/src/gallium/drivers/freedreno/freedreno_query.c
@@ -28,6 +28,7 @@
#include "pipe/p_state.h"
#include "util/u_memory.h"
+#include "util/u_query.h"
#include "freedreno_query.h"
#include "freedreno_query_sw.h"
@@ -104,10 +105,18 @@ fd_get_driver_query_info(struct pipe_screen *pscreen,
return 1;
}
+static int
+fd_get_driver_query_group_info(struct pipe_screen *pscreen,
+ unsigned index, struct pipe_driver_query_group_info *info)
+{
+ return util_get_driver_query_group_info(index, FD_QUERY_COUNT, info);
+}
+
void
fd_query_screen_init(struct pipe_screen *pscreen)
{
pscreen->get_driver_query_info = fd_get_driver_query_info;
+ pscreen->get_driver_query_group_info = fd_get_driver_query_group_info;
}
void
diff --git a/src/gallium/drivers/freedreno/freedreno_query.h b/src/gallium/drivers/freedreno/freedreno_query.h
index c2c71da..9cee989 100644
--- a/src/gallium/drivers/freedreno/freedreno_query.h
+++ b/src/gallium/drivers/freedreno/freedreno_query.h
@@ -56,6 +56,7 @@ fd_query(struct pipe_query *pq)
return (struct fd_query *)pq;
}
+#define FD_QUERY_COUNT 6
#define FD_QUERY_DRAW_CALLS (PIPE_QUERY_DRIVER_SPECIFIC + 0)
#define FD_QUERY_BATCH_TOTAL (PIPE_QUERY_DRIVER_SPECIFIC + 1) /* total # of batches (submits) */
#define FD_QUERY_BATCH_SYSMEM (PIPE_QUERY_DRIVER_SPECIFIC + 2) /* batches using system memory (GMEM bypass) */
--
2.3.1
More information about the mesa-dev
mailing list