From: Bas Nieuwenhuizen Date: Wed, 1 Jan 2020 13:56:26 +0000 (+0100) Subject: spirv: Fix glsl type assert in spir2nir. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96c9483ccf5bc9116f7b754a0ccbc09097275083;p=mesa.git spirv: Fix glsl type assert in spir2nir. Fixes: 624789e3708 "compiler/glsl: handle case where we have multiple users for types" Reviewed-by: Caio Marcelo de Oliveira Filho Reviewed-by: Lionel Landwerlin --- diff --git a/src/compiler/spirv/spirv2nir.c b/src/compiler/spirv/spirv2nir.c index 0ab86442bfe..72c607c458d 100644 --- a/src/compiler/spirv/spirv2nir.c +++ b/src/compiler/spirv/spirv2nir.c @@ -72,6 +72,8 @@ int main(int argc, char **argv) return 1; } + glsl_type_singleton_init_or_ref(); + struct spirv_to_nir_options spirv_opts = {0}; nir_shader *nir = spirv_to_nir(map, word_count, NULL, 0, @@ -79,5 +81,7 @@ int main(int argc, char **argv) &spirv_opts, NULL); nir_print_shader(nir, stderr); + glsl_type_singleton_decref(); + return 0; }