[Bf-blender-cvs] [c72e6c25d76] tmp-vulkan: GHOST: X11: Enable debug context for vulkan in offscreen contexts

Clément Foucault noreply at git.blender.org
Wed Sep 16 22:05:42 CEST 2020


Commit: c72e6c25d76fc7428da55ed10563700d90677d9b
Author: Clément Foucault
Date:   Wed Sep 16 22:03:22 2020 +0200
Branches: tmp-vulkan
https://developer.blender.org/rBc72e6c25d76fc7428da55ed10563700d90677d9b

GHOST: X11: Enable debug context for vulkan in offscreen contexts

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

M	intern/ghost/intern/GHOST_SystemX11.cpp

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

diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index f9e3018c7c8..709f471ac18 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -401,13 +401,12 @@ GHOST_IWindow *GHOST_SystemX11::createWindow(const char *title,
 GHOST_IContext *GHOST_SystemX11::createOffscreenContext(GHOST_TDrawingContextType type,
                                                         GHOST_GLSettings glSettings)
 {
+  const bool debug_context = (glSettings.flags & GHOST_glDebugContext) != 0;
+
 #if defined(WITH_VULKAN)
   if (type == GHOST_kDrawingContextTypeVulkan) {
-    /* Vulkan port
-     *   try vulkan
-     *   fallback to OGL */
-    /* TODO debug context. */
-    GHOST_Context *context = new GHOST_ContextVK(false, (Window)NULL, m_display, 1, 0, false);
+    GHOST_Context *context = new GHOST_ContextVK(
+        false, (Window)NULL, m_display, 1, 0, debug_context);
 
     if (context->initializeDrawingContext()) {
       return context;
@@ -424,8 +423,6 @@ GHOST_IContext *GHOST_SystemX11::createOffscreenContext(GHOST_TDrawingContextTyp
     //   try 3.3 core profile
     //   no fallbacks
 
-    const bool debug_context = (glSettings.flags & GHOST_glDebugContext) != 0;
-
 #if defined(WITH_GL_PROFILE_CORE)
     {
       const char *version_major = (char *)glewGetString(GLEW_VERSION_MAJOR);



More information about the Bf-blender-cvs mailing list