diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-03-11 20:51:56 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-03-11 20:52:16 +0300 |
commit | 33c6b269d116856b045f1ed51081bed14c5ed1da (patch) | |
tree | 92bfe8e5d8288318462746530d16b4cb33f5c63a /source/blender | |
parent | 12e64e5ec14e257b61db225184328db1419f047a (diff) |
EEVEE: Fix test crashing
Probe counting now needs to have proper gl capabilities initialised to run
correctly.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_lightcache.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |