This enables GL_AMD_performance_monitor for freedreno. Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> Reviewed-by: Rob Clark <robcl...@freedesktop.org> --- 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.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev