[Mesa-dev] [PATCH 20/24] radeonsi: hook up device/driver UUID queries

Timothy Arceri tarceri at itsqueeze.com
Wed Jul 26 11:47:00 UTC 2017


From: Andres Rodriguez <andresx7 at gmail.com>

v2: move from r600_common to radeonsi

Signed-off-by: Andres Rodriguez <andresx7 at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
 src/gallium/drivers/radeonsi/si_pipe.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index b2863ac..1c46ef9 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -926,6 +926,18 @@ static void si_test_vmfault(struct si_screen *sscreen)
 	exit(0);
 }
 
+static void radeonsi_get_driver_uuid(struct pipe_screen *pscreen, char *uuid)
+{
+	ac_compute_driver_uuid(uuid, PIPE_UUID_SIZE);
+}
+
+static void radeonsi_get_device_uuid(struct pipe_screen *pscreen, char *uuid)
+{
+	struct r600_common_screen *rscreen = (struct r600_common_screen *)pscreen;
+
+	ac_compute_device_uuid(&rscreen->info, uuid, PIPE_UUID_SIZE);
+}
+
 struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
 					   unsigned flags)
 {
@@ -941,6 +953,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
 	sscreen->b.b.destroy = si_destroy_screen;
 	sscreen->b.b.get_param = si_get_param;
 	sscreen->b.b.get_shader_param = si_get_shader_param;
+	sscreen->b.b.get_device_uuid = radeonsi_get_device_uuid;
+	sscreen->b.b.get_driver_uuid = radeonsi_get_driver_uuid;
 	sscreen->b.b.resource_create = r600_resource_create_common;
 
 	si_init_screen_state_functions(sscreen);
-- 
2.9.4



More information about the mesa-dev mailing list