diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_engine.c | 3 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_private.h | 2 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_render.c | 7 |
3 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index 3337cbcc59d..f8e68156aa8 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -421,9 +421,8 @@ static void eevee_render_to_image(void *vedata, const rcti *rect) { const DRWContextState *draw_ctx = DRW_context_state_get(); - EEVEE_render_init(vedata, engine, draw_ctx->depsgraph); - if (RE_engine_test_break(engine)) { + if (!EEVEE_render_init(vedata, engine, draw_ctx->depsgraph)) { return; } diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index db29e103226..7e93892ab3b 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -1168,7 +1168,7 @@ void EEVEE_draw_effects(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata); void EEVEE_effects_free(void); /* eevee_render.c */ -void EEVEE_render_init(EEVEE_Data *vedata, +bool EEVEE_render_init(EEVEE_Data *vedata, struct RenderEngine *engine, struct Depsgraph *depsgraph); void EEVEE_render_cache(void *vedata, diff --git a/source/blender/draw/engines/eevee/eevee_render.c b/source/blender/draw/engines/eevee/eevee_render.c index 9b20f006387..3a5d9e96b80 100644 --- a/source/blender/draw/engines/eevee/eevee_render.c +++ b/source/blender/draw/engines/eevee/eevee_render.c @@ -46,7 +46,8 @@ #include "eevee_private.h" -void EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, struct Depsgraph *depsgraph) +/* Return true if init properly. */ +bool EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, struct Depsgraph *depsgraph) { EEVEE_Data *vedata = (EEVEE_Data *)ved; EEVEE_StorageList *stl = vedata->stl; @@ -106,7 +107,7 @@ void EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, struct Depsgraph * max_dim); RE_engine_set_error_message(engine, error_msg); G.is_break = true; - return; + return false; } /* XXX overriding viewport size. Simplify things but is not really 100% safe. */ @@ -168,6 +169,8 @@ void EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, struct Depsgraph * EEVEE_subsurface_cache_init(sldata, vedata); EEVEE_temporal_sampling_cache_init(sldata, vedata); EEVEE_volumes_cache_init(sldata, vedata); + + return true; } /* Used by light cache. in this case engine is NULL. */ |