[Mesa-dev] [PATCH v7 08/35] nouveau: fix nir and TGSI shader cache collision

Karol Herbst kherbst at redhat.com
Mon Apr 16 13:25:48 UTC 2018


Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
 src/gallium/drivers/nouveau/nouveau_screen.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index 2598c78a45b..655d2d090f6 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -156,9 +156,13 @@ nouveau_disk_cache_create(struct nouveau_screen *screen)
                                          &mesa_timestamp)) {
       res = asprintf(&timestamp_str, "%u", mesa_timestamp);
       if (res != -1) {
+         uint64_t shader_debug_flags = 0;
+         if (screen->prefer_nir)
+            shader_debug_flags |= 1 << 0;
+
          screen->disk_shader_cache =
             disk_cache_create(nouveau_screen_get_name(&screen->base),
-                              timestamp_str, 0);
+                              timestamp_str, shader_debug_flags);
          free(timestamp_str);
       }
    }
-- 
2.14.3



More information about the mesa-dev mailing list