[Bf-blender-cvs] [7211f3ab5bf] temp-ghost-vulkan: Merge branch 'master' into temp-ghost-vulkan

Jeroen Bakker noreply at git.blender.org
Fri Nov 18 11:45:31 CET 2022


Commit: 7211f3ab5bf2ad44305544ae9d10f471b9d75b5a
Author: Jeroen Bakker
Date:   Fri Nov 18 11:04:32 2022 +0100
Branches: temp-ghost-vulkan
https://developer.blender.org/rB7211f3ab5bf2ad44305544ae9d10f471b9d75b5a

Merge branch 'master' into temp-ghost-vulkan

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



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

diff --cc intern/ghost/intern/GHOST_SystemWayland.cpp
index b990681ce25,285fbbd3b6c..4f6627310ca
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@@ -5709,35 -6014,14 +6018,39 @@@ static GHOST_Context *createOffscreenCo
    return nullptr;
  }
  
 -GHOST_IContext *GHOST_SystemWayland::createOffscreenContext(GHOST_GLSettings /*glSettings*/)
 +GHOST_IContext *GHOST_SystemWayland::createOffscreenContext(GHOST_GLSettings glSettings)
  {
+ #ifdef USE_EVENT_BACKGROUND_THREAD
+   std::lock_guard lock_server_guard{*server_mutex};
+ #endif
+ 
    /* Create new off-screen window. */
    wl_surface *wl_surface = wl_compositor_create_surface(wl_compositor());
 +
 +#ifdef WITH_VULKAN_BACKEND
 +  const bool debug_context = (glSettings.flags & GHOST_glDebugContext) != 0;
 +
 +  if (glSettings.context_type == GHOST_kDrawingContextTypeVulkan) {
 +    GHOST_Context *context = new GHOST_ContextVK(false,
 +                                                 GHOST_kVulkanPlatformWayland,
 +                                                 0,
 +                                                 NULL,
 +                                                 wl_surface,
 +                                                 display_->wl_display,
 +                                                 1,
 +                                                 0,
 +                                                 debug_context);
 +
 +    if (!context->initializeDrawingContext()) {
 +      delete context;
 +      return nullptr;
 +    }
 +    return context;
 +  }
 +#else
 +  (void)glSettings;
 +#endif
 +
    wl_egl_window *egl_window = wl_surface ? wl_egl_window_create(wl_surface, 1, 1) : nullptr;
  
    GHOST_Context *context = createOffscreenContext_impl(this, display_->wl_display, egl_window);



More information about the Bf-blender-cvs mailing list