[Mesa-dev] [PATCH 10/15] radeon: implement pipe_screen::get_driver_query_group_info v3

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


This enables GL_AMD_performance_monitor for radeon.

V2:
 - s/pipe_context/pipe_screen in the commit msg

V3:
 - use util_get_driver_query_group_info

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/gallium/drivers/radeon/r600_pipe_common.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index bcddde1..8345acc 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -30,6 +30,7 @@
 #include "util/u_memory.h"
 #include "util/u_format_s3tc.h"
 #include "util/u_upload_mgr.h"
+#include "util/u_query.h"
 #include "vl/vl_decoder.h"
 #include "vl/vl_video_buffer.h"
 #include "radeon/radeon_video.h"
@@ -566,6 +567,13 @@ static int r600_get_driver_query_info(struct pipe_screen *screen,
 	return 1;
 }
 
+static int r600_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, 8, info);
+}
+
 static void r600_fence_reference(struct pipe_screen *screen,
 				 struct pipe_fence_handle **ptr,
 				 struct pipe_fence_handle *fence)
@@ -724,6 +732,7 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
 	rscreen->b.get_compute_param = r600_get_compute_param;
 	rscreen->b.get_paramf = r600_get_paramf;
 	rscreen->b.get_driver_query_info = r600_get_driver_query_info;
+	rscreen->b.get_driver_query_group_info = r600_get_driver_query_group_info;
 	rscreen->b.get_timestamp = r600_get_timestamp;
 	rscreen->b.fence_finish = r600_fence_finish;
 	rscreen->b.fence_reference = r600_fence_reference;
-- 
2.0.0



More information about the mesa-dev mailing list