diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-17 16:36:47 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-17 16:55:21 +0300 |
commit | 6cad7984c699e7ac1681c1351eb33ce68aac5b4d (patch) | |
tree | 7f2dc597c22e85e0136fa2a06773eaca4259eb07 /source/blender/draw/intern/draw_manager_shader.c | |
parent | fa708261679e08ed4f2a099ce0b53989922317a4 (diff) |
Fix missing shader compilation progress bar.
Diffstat (limited to 'source/blender/draw/intern/draw_manager_shader.c')
-rw-r--r-- | source/blender/draw/intern/draw_manager_shader.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_manager_shader.c b/source/blender/draw/intern/draw_manager_shader.c index 7aa40b0ce04..2730a9f518e 100644 --- a/source/blender/draw/intern/draw_manager_shader.c +++ b/source/blender/draw/intern/draw_manager_shader.c @@ -37,6 +37,8 @@ #include "BKE_global.h" #include "BKE_main.h" +#include "DEG_depsgraph_query.h" + #include "GPU_shader.h" #include "GPU_material.h" @@ -173,7 +175,9 @@ static void drw_deferred_shader_add(GPUMaterial *mat, bool deferred) BLI_assert(DST.draw_ctx.evil_C); wmWindowManager *wm = CTX_wm_manager(DST.draw_ctx.evil_C); wmWindow *win = CTX_wm_window(DST.draw_ctx.evil_C); - Scene *scene = DST.draw_ctx.scene; + + /* Use original scene ID since this is what the jobs template tests for. */ + Scene *scene = (Scene *)DEG_get_original_id(&DST.draw_ctx.scene->id); /* Get the running job or a new one if none is running. Can only have one job per type & owner. */ wmJob *wm_job = WM_jobs_get(wm, win, scene, "Shaders Compilation", @@ -215,6 +219,7 @@ static void drw_deferred_shader_add(GPUMaterial *mat, bool deferred) void DRW_deferred_shader_remove(GPUMaterial *mat) { Scene *scene = GPU_material_scene(mat); + scene = (Scene *)DEG_get_original_id(&DST.draw_ctx.scene->id); for (wmWindowManager *wm = G_MAIN->wm.first; wm; wm = wm->id.next) { if (WM_jobs_test(wm, scene, WM_JOB_TYPE_SHADER_COMPILATION) == false) { |