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:
authorJeroen Bakker <j.bakker@atmind.nl>2019-05-24 17:21:21 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-05-24 17:33:59 +0300
commit5986160dd0f11ce0e5302d7bcf7d386925164de6 (patch)
tree18b60b48831c179a8e5243ea2ec20eb0402fe43f /source/blender/draw/engines/eevee/eevee_effects.c
parentd8f096406b27cb1d24a633546e777de3a35434f5 (diff)
EEVEE: Volumetrics
When viewport samples are set to 1 simple scenes with volumetrics crash. EEVEE volumetrics needs to init the post processing buffers. With recent changes the need for post processing buffers are known after the cache init. But they are constructed before the cache init. This lead to null pointers. Reviewed By: fclem Maniphest Tasks: T64922 Differential Revision: https://developer.blender.org/D4942
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_effects.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_effects.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c
index 3562afc9134..8b176f8e5b2 100644
--- a/source/blender/draw/engines/eevee/eevee_effects.c
+++ b/source/blender/draw/engines/eevee/eevee_effects.c
@@ -175,16 +175,6 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata,
}
/**
- * Ping Pong buffer
- */
- if ((effects->enabled_effects & EFFECT_POST_BUFFER) != 0) {
- SETUP_BUFFER(txl->color_post, fbl->effect_fb, fbl->effect_color_fb);
- }
- else {
- CLEANUP_BUFFER(txl->color_post, fbl->effect_fb, fbl->effect_color_fb);
- }
-
- /**
* MinMax Pyramid
*/
const bool half_res_hiz = true;
@@ -385,6 +375,16 @@ void EEVEE_effects_draw_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *ve
else {
CLEANUP_BUFFER(txl->color_double_buffer, fbl->double_buffer_fb, fbl->double_buffer_color_fb);
}
+
+ /**
+ * Ping Pong buffer
+ */
+ if ((effects->enabled_effects & EFFECT_POST_BUFFER) != 0) {
+ SETUP_BUFFER(txl->color_post, fbl->effect_fb, fbl->effect_color_fb);
+ }
+ else {
+ CLEANUP_BUFFER(txl->color_post, fbl->effect_fb, fbl->effect_color_fb);
+ }
}
#if 0 /* Not required for now */