GPU: Add glFlush and glFinish wrapper
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user