[Bf-blender-cvs] [a248c2001a0] blender2.8: GPU: Add glFlush and glFinish wrapper

Clément Foucault noreply at git.blender.org
Wed Oct 31 12:32:22 CET 2018


Commit: a248c2001a0a037b921355a6caaa161c270c762f
Author: Clément Foucault
Date:   Wed Oct 31 12:28:59 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBa248c2001a0a037b921355a6caaa161c270c762f

GPU: Add glFlush and glFinish wrapper

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

M	source/blender/draw/engines/eevee/eevee_render.c
M	source/blender/gpu/GPU_state.h
M	source/blender/gpu/intern/gpu_state.c

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

diff --git a/source/blender/draw/engines/eevee/eevee_render.c b/source/blender/draw/engines/eevee/eevee_render.c
index 06479588017..86c20ee54da 100644
--- a/source/blender/draw/engines/eevee/eevee_render.c
+++ b/source/blender/draw/engines/eevee/eevee_render.c
@@ -40,6 +40,7 @@
 
 #include "GPU_framebuffer.h"
 #include "GPU_glew.h"
+#include "GPU_state.h"
 
 #include "RE_pipeline.h"
 
@@ -551,7 +552,7 @@ void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl
 		EEVEE_draw_effects(sldata, vedata);
 
 		/* XXX Seems to fix TDR issue with NVidia drivers on linux. */
-		glFinish();
+		GPU_finish();
 
 		RE_engine_update_progress(engine, (float)(render_samples++) / (float)tot_sample);
 	}
diff --git a/source/blender/gpu/GPU_state.h b/source/blender/gpu/GPU_state.h
index 4c8ad7406df..057caffd17d 100644
--- a/source/blender/gpu/GPU_state.h
+++ b/source/blender/gpu/GPU_state.h
@@ -61,4 +61,7 @@ void GPU_scissor_get_i(int coords[4]);
 void GPU_viewport_size_get_f(float coords[4]);
 void GPU_viewport_size_get_i(int coords[4]);
 
+void GPU_flush(void);
+void GPU_finish(void);
+
 #endif  /* __GPU_STATE_H__ */
diff --git a/source/blender/gpu/intern/gpu_state.c b/source/blender/gpu/intern/gpu_state.c
index c7761d43548..0f07b2debc3 100644
--- a/source/blender/gpu/intern/gpu_state.c
+++ b/source/blender/gpu/intern/gpu_state.c
@@ -160,3 +160,13 @@ void GPU_viewport_size_get_i(int coords[4])
 {
 	glGetIntegerv(GL_VIEWPORT, coords);
 }
+
+void GPU_flush(void)
+{
+	glFlush();
+}
+
+void GPU_finish(void)
+{
+	glFinish();
+}
\ No newline at end of file



More information about the Bf-blender-cvs mailing list