From 77f60a09310dad0cb41e2e2ec4a71f9bdb762e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 8 Sep 2020 00:10:37 +0200 Subject: GPUState: Encapsulate glFlush and glFinish inside the GLContext Part of the Vulkan task T68990 Isolate the few remaining gl functions. --- source/blender/gpu/intern/gpu_context_private.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/gpu/intern/gpu_context_private.hh') diff --git a/source/blender/gpu/intern/gpu_context_private.hh b/source/blender/gpu/intern/gpu_context_private.hh index 3d92b4eb587..5344cc6fb87 100644 --- a/source/blender/gpu/intern/gpu_context_private.hh +++ b/source/blender/gpu/intern/gpu_context_private.hh @@ -76,6 +76,12 @@ struct GPUContext { virtual void activate(void) = 0; virtual void deactivate(void) = 0; + + /* Will push all pending commands to the GPU. */ + virtual void flush(void) = 0; + /* Will wait until the GPU has finished executing all command. */ + virtual void finish(void) = 0; + virtual void memory_statistics_get(int *total_mem, int *free_mem) = 0; bool is_active_on_thread(void); -- cgit v1.2.3