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.
This commit is contained in:
Clément Foucault 2019-03-27 19:15:23 +01:00
parent 6d1921dd81
commit 96d200775a
Notes: blender-bot 2023-02-14 03:13:20 +01:00
Referenced by issue #62997, Eevee - visual artifacts during irradiance volume baking
1 changed files with 6 additions and 0 deletions

View File

@ -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);