[Bf-blender-cvs] [117bc96ce88] blender2.8: Eevee: Fix dot corruption on intel HD5xx/6xx series
Clément Foucault
noreply at git.blender.org
Wed Oct 31 12:32:24 CET 2018
Commit: 117bc96ce88474d3c6b28e669e6ee339441051fb
Author: Clément Foucault
Date: Wed Oct 31 12:32:09 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB117bc96ce88474d3c6b28e669e6ee339441051fb
Eevee: Fix dot corruption on intel HD5xx/6xx series
It is caused by some sync issue apparently. Adding glFlush in these
two places fixes it.
Caveat: it might have a small perf impact (did not measure it).
The fix is limited to the affected driver/operating systems.
===================================================================
M source/blender/draw/engines/eevee/eevee_effects.c
M source/blender/draw/engines/eevee/eevee_occlusion.c
===================================================================
diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c
index 2978ea38d19..c7c3adeffc2 100644
--- a/source/blender/draw/engines/eevee/eevee_effects.c
+++ b/source/blender/draw/engines/eevee/eevee_effects.c
@@ -34,6 +34,7 @@
#include "eevee_private.h"
#include "GPU_texture.h"
#include "GPU_extensions.h"
+#include "GPU_state.h"
static struct {
/* Downsample Depth */
@@ -470,6 +471,13 @@ void EEVEE_create_minmax_buffer(EEVEE_Data *vedata, GPUTexture *depth_src, int l
/* Restore */
GPU_framebuffer_bind(fbl->main_fb);
+
+ if (GPU_mip_render_workaround()) {
+ /* Fix dot corruption on intel HD5XX/HD6XX series.
+ * It seems affected drivers are the same that needs
+ * GPU_mip_render_workaround. */
+ GPU_flush();
+ }
}
/**
diff --git a/source/blender/draw/engines/eevee/eevee_occlusion.c b/source/blender/draw/engines/eevee/eevee_occlusion.c
index 8ede22cda5a..03aee102136 100644
--- a/source/blender/draw/engines/eevee/eevee_occlusion.c
+++ b/source/blender/draw/engines/eevee/eevee_occlusion.c
@@ -37,6 +37,9 @@
#include "eevee_private.h"
+#include "GPU_extensions.h"
+#include "GPU_state.h"
+
static struct {
/* Ground Truth Ambient Occlusion */
struct GPUShader *gtao_sh;
@@ -250,6 +253,13 @@ void EEVEE_occlusion_compute(
DRW_draw_pass(psl->ao_horizon_search);
}
+ if (GPU_mip_render_workaround()) {
+ /* Fix dot corruption on intel HD5XX/HD6XX series.
+ * It seems affected drivers are the same that needs
+ * GPU_mip_render_workaround. */
+ GPU_flush();
+ }
+
/* Restore */
GPU_framebuffer_bind(fbl->main_fb);
More information about the Bf-blender-cvs
mailing list