[Mesa-dev] radeonsi: hook up device/driver UUID queries v2

Submitted by Andres Rodriguez on July 13, 2017, 2:04 a.m.

Details

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

Not browsing as part of any series.

Commit Message

Andres Rodriguez July 13, 2017, 2:04 a.m.
v2: move from r600_common to radeonsi

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
---

This fixes a build error reported by haagch on #radeon.

I've updated the series on my repo to wip-mem-obj-v4

 src/gallium/drivers/radeonsi/si_pipe.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index bc0e38f..ed06adb 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -919,6 +919,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)
 {
@@ -934,6 +946,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);