radeonsi: hook up device/driver UUID queries
authorAndres Rodriguez <andresx7@gmail.com>
Thu, 13 Jul 2017 02:04:15 +0000 (22:04 -0400)
committerTimothy Arceri <tarceri@itsqueeze.com>
Sun, 6 Aug 2017 02:42:07 +0000 (12:42 +1000)
v2: move from r600_common to radeonsi

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_pipe.c

index 395853c7d9f3940cb9982cd2732eba33772381a9..f08cfcb5cdf1456072d0bf4cf7743b3c93be28bc 100644 (file)
@@ -967,6 +967,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,
                                           const struct pipe_screen_config *config)
 {
@@ -983,6 +995,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
        sscreen->b.b.get_param = si_get_param;
        sscreen->b.b.get_shader_param = si_get_shader_param;
        sscreen->b.b.get_compiler_options = si_get_compiler_options;
+       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);