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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-03-29 13:18:07 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-03-29 13:18:07 +0300
commit0cbf747ffaa64e8e91f7b919d463382aee490169 (patch)
treeb9854f9db20761c33a9ae75f51eaa8c790f7c42f /source/blender/draw/engines/eevee/eevee_motion_blur.c
parent317702310412454bdad8a942f4e02e1ff93c6aa1 (diff)
Draw manager: Make evaluation context a part of context state
This way we don't have to re-initialize the full evaluation context in every area we need it.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_motion_blur.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_motion_blur.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_motion_blur.c b/source/blender/draw/engines/eevee/eevee_motion_blur.c
index 5a562cc49e0..9b19163c8d7 100644
--- a/source/blender/draw/engines/eevee/eevee_motion_blur.c
+++ b/source/blender/draw/engines/eevee/eevee_motion_blur.c
@@ -59,7 +59,6 @@ static void eevee_motion_blur_camera_get_matrix_at_time(
float time,
float r_mat[4][4])
{
- EvaluationContext eval_ctx;
float obmat[4][4];
/* HACK */
@@ -68,19 +67,9 @@ static void eevee_motion_blur_camera_get_matrix_at_time(
memcpy(&camdata_cpy, camera->data, sizeof(camdata_cpy));
cam_cpy.data = &camdata_cpy;
- /* NOTE: Mode corresponds to old usage of eval_ctx from viewport (which was
- * actually coming from bmain). It was always DAG_EVAL_VIEWPORT. For F12
- * render this should be DAG_EVAL_RENDER, but the whole hack is to be
- * reconsidered first anyway.
- */
const DRWContextState *draw_ctx = DRW_context_state_get();
- DEG_evaluation_context_init_from_scene(
- &eval_ctx,
- scene,
- draw_ctx->view_layer,
- draw_ctx->engine_type,
- draw_ctx->object_mode,
- DAG_EVAL_VIEWPORT);
+ /* We will be modifying time, so we create copy of eval_ctx. */
+ EvaluationContext eval_ctx = draw_ctx->eval_ctx;
eval_ctx.ctime = time;
/* Past matrix */