From 5c2ac8520e070db2085b7d95d9d232b567edb247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 7 Sep 2020 23:52:55 +0200 Subject: GPUQuery: GL Backend isolation This is part of the Vulkan task T68990. This introduce a new GLQueryPool for managing queries in an implementation agnostic manner. This modify the GPU selection query to use this new object. This also make use of blender::Vector for better code quality. No real functionnal change. --- source/blender/gpu/opengl/gl_context.hh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/gpu/opengl/gl_context.hh') diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh index f05029c7075..8bce0d2e345 100644 --- a/source/blender/gpu/opengl/gl_context.hh +++ b/source/blender/gpu/opengl/gl_context.hh @@ -68,13 +68,13 @@ class GLContext : public GPUContext { static bool unused_fb_slot_workaround; static float derivative_signs[2]; + /** VBO for missing vertex attrib binding. Avoid undefined behavior on some implementation. */ + GLuint default_attr_vbo_; + /** Used for debugging purpose. Bitflags of all bound slots. */ uint16_t bound_ubo_slots; - /* TODO(fclem) these needs to become private. */ - public: - /** VBO for missing vertex attrib binding. Avoid undefined behavior on some implementation. */ - GLuint default_attr_vbo_; + private: /** * GPUBatch & GPUFramebuffer have references to the context they are from, in the case the * context is destroyed, we need to remove any reference to it. @@ -112,12 +112,12 @@ class GLContext : public GPUContext { static void buf_free(GLuint buf_id); static void tex_free(GLuint tex_id); - /* TODO(fclem) these needs to become private. */ - public: - static void orphans_add(Vector &orphan_list, std::mutex &list_mutex, GLuint id); - void orphans_clear(void); void vao_cache_register(GLVaoCache *cache); void vao_cache_unregister(GLVaoCache *cache); + + private: + static void orphans_add(Vector &orphan_list, std::mutex &list_mutex, GLuint id); + void orphans_clear(void); }; } // namespace gpu -- cgit v1.2.3