Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-03-11 20:51:56 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-03-11 20:52:16 +0300
commit33c6b269d116856b045f1ed51081bed14c5ed1da (patch)
tree92bfe8e5d8288318462746530d16b4cb33f5c63a
parent12e64e5ec14e257b61db225184328db1419f047a (diff)
EEVEE: Fix test crashing
Probe counting now needs to have proper gl capabilities initialised to run correctly.
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.c6
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);