GPU: Metal: Fix background render crash
GHOST_CreateSystemBackground was not being followed by the now mandatory GPU_backend_ghost_system_set
This commit is contained in:
@@ -46,6 +46,7 @@ void ShaderBuilder::init_system()
|
||||
{
|
||||
CLG_init();
|
||||
ghost_system_ = GHOST_CreateSystemBackground();
|
||||
GPU_backend_ghost_system_set(ghost_system_);
|
||||
}
|
||||
|
||||
bool ShaderBuilder::init_context()
|
||||
|
||||
@@ -167,6 +167,7 @@ void GPU_compilation_subprocess_run(const char *subprocess_name)
|
||||
|
||||
GHOST_SystemHandle ghost_system = GHOST_CreateSystemBackground();
|
||||
BLI_assert(ghost_system);
|
||||
GPU_backend_ghost_system_set(ghost_system);
|
||||
GHOST_GPUSettings gpu_settings = {0};
|
||||
gpu_settings.context_type = GHOST_kDrawingContextTypeOpenGL;
|
||||
GHOST_ContextHandle ghost_context = GHOST_CreateGPUContext(ghost_system, gpu_settings);
|
||||
|
||||
@@ -1930,6 +1930,7 @@ void wm_ghost_init_background()
|
||||
GHOST_SetBacktraceHandler((GHOST_TBacktraceFn)BLI_system_backtrace);
|
||||
|
||||
g_system = GHOST_CreateSystemBackground();
|
||||
GPU_backend_ghost_system_set(g_system);
|
||||
|
||||
GHOST_Debug debug = {0};
|
||||
if (G.debug & G_DEBUG_GHOST) {
|
||||
|
||||
Reference in New Issue
Block a user