mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 19:20:15 +00:00
Only check for enabled JIT in Setup() to avoid race conditions
This commit is contained in:
parent
2796552790
commit
9db801c3db
@ -107,6 +107,8 @@ void ShaderSetup::Setup() {
|
|||||||
jit_shader = shader;
|
jit_shader = shader;
|
||||||
shader_map[cache_key] = std::move(shader);
|
shader_map[cache_key] = std::move(shader);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
jit_shader.reset();
|
||||||
}
|
}
|
||||||
#endif // ARCHITECTURE_x86_64
|
#endif // ARCHITECTURE_x86_64
|
||||||
}
|
}
|
||||||
@ -130,8 +132,8 @@ void ShaderSetup::Run(UnitState<false>& state, const InputVertex& input, int num
|
|||||||
state.conditional_code[1] = false;
|
state.conditional_code[1] = false;
|
||||||
|
|
||||||
#ifdef ARCHITECTURE_x86_64
|
#ifdef ARCHITECTURE_x86_64
|
||||||
if (VideoCore::g_shader_jit_enabled)
|
if (auto shader = jit_shader.lock())
|
||||||
jit_shader.lock().get()->Run(*this, state, config.main_offset);
|
shader.get()->Run(*this, state, config.main_offset);
|
||||||
else
|
else
|
||||||
RunInterpreter(*this, state, config.main_offset);
|
RunInterpreter(*this, state, config.main_offset);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user