Commit 2d9cd810 authored by Timur Kristóf's avatar Timur Kristóf
Browse files

workaround random llvm compilation

parent fb1100d7
Pipeline #300665 waiting for manual action with stages
......@@ -121,7 +121,9 @@ static void si_create_compute_state_async(void *job, int thread_index)
assert(thread_index < ARRAY_SIZE(sscreen->compiler));
compiler = &sscreen->compiler[thread_index];
if (!compiler->passes)
if (compiler->passes)
ac_destroy_llvm_compiler(compiler);
si_init_compiler(sscreen, compiler);
assert(program->ir_type == PIPE_SHADER_IR_NIR);
......
......@@ -886,7 +886,9 @@ static bool si_shader_select_prim_discard_cs(struct si_context *sctx,
sctx->cs_prim_discard_state.cso = sctx->shader.vs.cso;
sctx->cs_prim_discard_state.current = NULL;
if (!sctx->compiler.passes)
if (sctx->compiler.passes)
ac_destroy_llvm_compiler(&sctx->compiler);
si_init_compiler(sctx->screen, &sctx->compiler);
struct si_compiler_ctx_state compiler_state;
......
......@@ -2105,7 +2105,9 @@ static void si_build_shader_variant(struct si_shader *shader, int thread_index,
compiler = shader->compiler_ctx_state.compiler;
}
if (!compiler->passes)
if (compiler->passes)
ac_destroy_llvm_compiler(compiler);
si_init_compiler(sscreen, compiler);
if (unlikely(!si_create_shader_variant(sscreen, compiler, shader, debug))) {
......@@ -2455,7 +2457,9 @@ static void si_init_shader_selector_async(void *job, int thread_index)
assert(thread_index < ARRAY_SIZE(sscreen->compiler));
compiler = &sscreen->compiler[thread_index];
if (!compiler->passes)
if (compiler->passes)
ac_destroy_llvm_compiler(compiler);
si_init_compiler(sscreen, compiler);
/* Serialize NIR to save memory. Monolithic shader variants
......@@ -3970,7 +3974,9 @@ bool si_update_shaders(struct si_context *sctx)
old_ps ? old_ps->key.part.ps.epilog.spi_shader_col_format : 0;
int r;
if (!sctx->compiler.passes)
if (sctx->compiler.passes)
ac_destroy_llvm_compiler(&sctx->compiler);
si_init_compiler(sctx->screen, &sctx->compiler);
compiler_state.compiler = &sctx->compiler;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment