struct mesa_sha1 ctx;
unsigned char sha1[20];
char cache_id[20 * 2 + 1];
+ uint64_t driver_flags = 0;
_mesa_sha1_init(&ctx);
if (!disk_cache_get_function_identifier(nouveau_disk_cache_create,
_mesa_sha1_final(&ctx, sha1);
disk_cache_format_hex_id(cache_id, sha1, 20 * 2);
+ if (screen->prefer_nir)
+ driver_flags |= NOUVEAU_SHADER_CACHE_FLAGS_IR_NIR;
+ else
+ driver_flags |= NOUVEAU_SHADER_CACHE_FLAGS_IR_TGSI;
+
screen->disk_shader_cache =
disk_cache_create(nouveau_screen_get_name(&screen->base),
- cache_id, 0);
+ cache_id, driver_flags);
}
int