mesa/st: don't use serialized_nir for cached shaders

serialized_nir doesn't exist here, so just use the cached nir

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11051

Fixes: 5eb0136a3c ("mesa/st: when creating draw shader variants, use the base nir and skip driver opts")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28857>
This commit is contained in:
Mike Blumenkrantz 2024-04-22 09:22:07 -04:00 committed by Marge Bot
parent dc85832c35
commit ef0c9231a7
1 changed files with 1 additions and 1 deletions

View File

@ -646,7 +646,7 @@ get_nir_shader(struct st_context *st, struct gl_program *prog, bool is_draw)
const struct nir_shader_compiler_options *options =
is_draw ? &draw_nir_options : st_get_nir_compiler_options(st, prog->info.stage);
if (is_draw) {
if (is_draw && (!prog->shader_program || prog->shader_program->data->LinkStatus != LINKING_SKIPPED)) {
assert(prog->base_serialized_nir);
blob_reader_init(&blob_reader, prog->base_serialized_nir, prog->base_serialized_nir_size);
} else {