st/pbo: fix MESA_COMPUTE_PBO=spec crash on shutdown

the nir here has already been freed by the driver

Fixes: b8c82b50f7 ("mesa/st: add MESA_COMPUTE_PBO env var")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29998>
This commit is contained in:
Mike Blumenkrantz
2024-07-02 12:26:47 -04:00
committed by Marge Bot
parent 2a3b983728
commit 753d253df7

View File

@@ -931,6 +931,7 @@ download_texture_compute(struct st_context *st,
.ir.nir = spec->nir,
};
cs = spec->cs = st_create_nir_shader(st, &state);
spec->nir = NULL;
}
cb.buffer_size = 2 * sizeof(uint32_t);
} else if (!st->force_compute_based_texture_transfer && screen->driver_thread_add_job) {
@@ -986,6 +987,7 @@ download_texture_compute(struct st_context *st,
.ir.nir = spec->nir,
};
cs = spec->cs = st_create_nir_shader(st, &state);
spec->nir = NULL;
cb.buffer_size = 2 * sizeof(uint32_t);
} else {
nir_shader *nir = create_conversion_shader(st, view_target, num_components);