[Mesa-dev,21/27] radeonsi: hook up device/driver UUID queries

Submitted by Andres Rodriguez on July 12, 2017, 10:45 p.m.

Details

Message ID 20170712224532.1307-22-andresx7@gmail.com
State New
Headers show
Series "Initial support for EXT_external_objects v3" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Andres Rodriguez July 12, 2017, 10:45 p.m.
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
---
 src/gallium/drivers/radeon/r600_pipe_common.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index fd67d9a..c14d4eb 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -895,6 +895,18 @@  static const char* r600_get_name(struct pipe_screen* pscreen)
 	return rscreen->renderer_string;
 }
 
+static void r600_get_driver_uuid(struct pipe_screen *pscreen, char *uuid)
+{
+	ac_compute_driver_uuid(uuid, PIPE_UUID_SIZE);
+}
+
+static void r600_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);
+}
+
 static float r600_get_paramf(struct pipe_screen* pscreen,
 			     enum pipe_capf param)
 {
@@ -1355,6 +1367,8 @@  bool r600_common_screen_init(struct r600_common_screen *rscreen,
 	rscreen->b.get_name = r600_get_name;
 	rscreen->b.get_vendor = r600_get_vendor;
 	rscreen->b.get_device_vendor = r600_get_device_vendor;
+	rscreen->b.get_device_uuid = r600_get_device_uuid;
+	rscreen->b.get_driver_uuid = r600_get_driver_uuid;
 	rscreen->b.get_disk_shader_cache = r600_get_disk_shader_cache;
 	rscreen->b.get_compute_param = r600_get_compute_param;
 	rscreen->b.get_paramf = r600_get_paramf;