VL doesn't initialize the type systen, but creates shaders in TGSI.
When these are translated to NIR and then compiled in the driver
we need to have a reference to the glsl type system.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7453
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19883>
goto error;
}
} else {
+ glsl_type_singleton_init_or_ref();
+
if (sel->ir_type == PIPE_SHADER_IR_TGSI) {
if (sel->nir)
ralloc_free(sel->nir);
nir_tgsi_scan_shader(sel->nir, &sel->info, true);
r = r600_shader_from_nir(rctx, shader, &key);
+
+ glsl_type_singleton_decref();
+
if (r) {
fprintf(stderr, "--Failed shader--------------------------------------------------\n");