[Bf-blender-cvs] [96d200775a6] master: Fix T62997 Eevee: visual artifacts during irradiance volume baking

Clément Foucault noreply at git.blender.org
Wed Mar 27 19:15:37 CET 2019


Commit: 96d200775a69a86fb491841ef171d2131841442f
Author: Clément Foucault
Date:   Wed Mar 27 19:15:23 2019 +0100
Branches: master
https://developer.blender.org/rB96d200775a69a86fb491841ef171d2131841442f

Fix T62997 Eevee: visual artifacts during irradiance volume baking

Seems to be a problem with Nvidia drivers. glFlush does not work but
glFinish does ensure correct multithreading.

===================================================================

M	source/blender/draw/intern/draw_manager.c

===================================================================

diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index f8438742ed8..9f956717fb2 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -2008,6 +2008,12 @@ void DRW_custom_pipeline(
 	GPU_viewport_free(DST.viewport);
 	GPU_framebuffer_restore();
 
+	/* The use of custom pipeline in other thread using the same
+	 * resources as the main thread (viewport) may lead to data
+	 * races and undefined behavior on certain drivers. Using
+	 * GPU_finish to sync seems to fix the issue. (see T62997) */
+	GPU_finish();
+
 #ifdef DEBUG
 	/* Avoid accidental reuse. */
 	drw_state_ensure_not_reused(&DST);



More information about the Bf-blender-cvs mailing list