nouveau: use build-id when available for disk cache
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 19 Sep 2018 01:56:37 +0000 (11:56 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 2 Oct 2018 23:49:21 +0000 (09:49 +1000)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/nouveau/nouveau_screen.c

index c97b707955cdfe97158db782c78be34559365f9d..eb184d3559b8fea1fc882d3b150fa5a112bd15c8 100644 (file)
@@ -148,18 +148,18 @@ nouveau_screen_bo_get_handle(struct pipe_screen *pscreen,
 static void
 nouveau_disk_cache_create(struct nouveau_screen *screen)
 {
-   uint32_t mesa_timestamp;
-   char *timestamp_str;
+   uint32_t mesa_id;
+   char *mesa_id_str;
    int res;
 
-   if (disk_cache_get_function_timestamp(nouveau_disk_cache_create,
-                                         &mesa_timestamp)) {
-      res = asprintf(&timestamp_str, "%u", mesa_timestamp);
+   if (disk_cache_get_function_identifier(nouveau_disk_cache_create,
+                                          &mesa_id)) {
+      res = asprintf(&mesa_id_str, "%u", mesa_id);
       if (res != -1) {
          screen->disk_shader_cache =
             disk_cache_create(nouveau_screen_get_name(&screen->base),
-                              timestamp_str, 0);
-         free(timestamp_str);
+                              mesa_id_str, 0);
+         free(mesa_id_str);
       }
    }
 }