From 96c9483ccf5bc9116f7b754a0ccbc09097275083 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Wed, 1 Jan 2020 14:56:26 +0100 Subject: [PATCH] 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 --- src/compiler/spirv/spirv2nir.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.30.2