nine: only enable tgsi disk cache if the driver supports it

this crashes otherwise

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11471>
This commit is contained in:
Mike Blumenkrantz 2021-06-18 12:56:43 -04:00 committed by Marge Bot
parent 977355c6e5
commit f91ffe1349
1 changed files with 1 additions and 1 deletions

View File

@ -3866,7 +3866,7 @@ static void
nine_pipe_nir_shader_state_from_tgsi(struct pipe_shader_state *state, const struct tgsi_token *tgsi_tokens,
struct pipe_screen *screen)
{
struct nir_shader *nir = tgsi_to_nir(tgsi_tokens, screen, true);
struct nir_shader *nir = tgsi_to_nir(tgsi_tokens, screen, screen->get_disk_shader_cache != NULL);
if (unlikely(nine_shader_get_debug_flag(NINE_SHADER_DEBUG_OPTION_DUMP_NIR))) {
nir_print_shader(nir, stdout);