GPU: Cleanup: Replace glFlush by GPU_flush

This commit is contained in:
Clément Foucault 2018-12-05 04:23:45 +01:00
parent a7712e8594
commit d59c4c9d61
3 changed files with 5 additions and 5 deletions

@ -1518,7 +1518,7 @@ void DRW_draw_render_loop_ex(
#ifdef __APPLE__
/* Fix 3D view being "laggy" on macos. (See T56996) */
glFlush();
GPU_flush();
#endif
/* annotations - temporary drawing buffer (3d space) */
@ -2668,7 +2668,7 @@ void DRW_opengl_context_disable_ex(bool restore)
#ifdef __APPLE__
/* Need to flush before disabling draw context, otherwise it does not
* always finish drawing and viewport can be empty or partially drawn */
glFlush();
GPU_flush();
#endif
if (BLI_thread_is_main() && restore) {
@ -2705,7 +2705,7 @@ void DRW_opengl_render_context_enable(void *re_gl_context)
void DRW_opengl_render_context_disable(void *re_gl_context)
{
glFlush();
GPU_flush();
WM_opengl_context_release(re_gl_context);
/* TODO get rid of the blocking. */
BLI_ticket_mutex_unlock(DST.gl_context_mutex);

@ -131,7 +131,7 @@ static void drw_deferred_shader_compilation_exec(void *custom_data, short *stop,
*progress = (float)comp->shaders_done / (float)total;
*do_update = true;
glFlush();
GPU_flush();
BLI_mutex_unlock(&comp->compilation_lock);
BLI_spin_lock(&comp->list_lock);

@ -391,7 +391,7 @@ void ED_screen_draw_edges(wmWindow *win)
if (GPU_type_matches(GPU_DEVICE_INTEL_UHD, GPU_OS_UNIX, GPU_DRIVER_ANY)) {
/* For some reason, on linux + Intel UHD Graphics 620 the driver
* hangs if we don't flush before this. (See T57455) */
glFlush();
GPU_flush();
}
GPU_scissor(scissor_rect.xmin,