spirv: Fix glsl type assert in spir2nir.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 1 Jan 2020 13:56:26 +0000 (14:56 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 4 Jan 2020 15:53:24 +0000 (15:53 +0000)
Fixes: 624789e3708 "compiler/glsl: handle case where we have multiple users for types"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/compiler/spirv/spirv2nir.c

index 0ab86442bfe0ce5b077f5febd32b52e32889eef6..72c607c458d98fde2507e4a286816dadf08b37f0 100644 (file)
@@ -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;
 }