From 33c6b269d116856b045f1ed51081bed14c5ed1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 11 Mar 2020 18:51:56 +0100 Subject: [PATCH] EEVEE: Fix test crashing Probe counting now needs to have proper gl capabilities initialised to run correctly. --- source/blender/draw/engines/eevee/eevee_lightcache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c index ae4c7dec1e1..35a45cc97f4 100644 --- a/source/blender/draw/engines/eevee/eevee_lightcache.c +++ b/source/blender/draw/engines/eevee/eevee_lightcache.c @@ -1262,6 +1262,12 @@ void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float lbake->do_update = do_update; lbake->progress = progress; + if (G.background) { + /* Make sure to init GL capabilities before counting probes. */ + eevee_lightbake_context_enable(lbake); + eevee_lightbake_context_disable(lbake); + } + /* Count lightprobes */ eevee_lightbake_count_probes(lbake);