Draw Manager: Fix lazy compilation on certain hardware.
authorGermano <germano.costa@ig.com.br>
Tue, 10 Apr 2018 14:03:15 +0000 (11:03 -0300)
committerGermano <germano.costa@ig.com.br>
Tue, 10 Apr 2018 14:03:15 +0000 (11:03 -0300)
Before, the drawing functions sometimes froze with `AMD Radeon HD 7570M`.

source/blender/draw/intern/draw_manager_shader.c

index 5b4971f073057a452ecd97582a638bb71a44ebbd..760d3a359fe2a75fc75d6c2890eccbe002baa6d0 100644 (file)
@@ -137,6 +137,7 @@ static void drw_deferred_shader_compilation_exec(void *custom_data, short *stop,
                *progress = (float)comp->shaders_done / (float)total;
                *do_update = true;
 
+               glFinish();
                BLI_mutex_unlock(&comp->compilation_lock);
 
                drw_deferred_shader_free(comp->mat_compiling);