[Bf-blender-cvs] [bdeca237ff4] tmp-vulkan: Merge branch 'master' into tmp-vulkan

Clément Foucault noreply at git.blender.org
Sun Sep 13 00:44:35 CEST 2020


Commit: bdeca237ff4ca210666f369dd39165e070f6611a
Author: Clément Foucault
Date:   Sat Sep 12 19:05:59 2020 +0200
Branches: tmp-vulkan
https://developer.blender.org/rBbdeca237ff4ca210666f369dd39165e070f6611a

Merge branch 'master' into tmp-vulkan

# Conflicts:
#	CMakeLists.txt
#	intern/ghost/GHOST_C-api.h
#	intern/ghost/GHOST_ISystem.h
#	intern/ghost/intern/GHOST_C-api.cpp
#	intern/ghost/intern/GHOST_System.h
#	intern/ghost/intern/GHOST_SystemCocoa.h
#	intern/ghost/intern/GHOST_SystemCocoa.mm
#	intern/ghost/intern/GHOST_SystemNULL.h
#	intern/ghost/intern/GHOST_SystemSDL.cpp
#	intern/ghost/intern/GHOST_SystemSDL.h
#	intern/ghost/intern/GHOST_SystemWayland.cpp
#	intern/ghost/intern/GHOST_SystemWayland.h
#	intern/ghost/intern/GHOST_SystemWin32.cpp
#	intern/ghost/intern/GHOST_SystemWin32.h
#	intern/ghost/intern/GHOST_SystemX11.cpp
#	intern/ghost/intern/GHOST_SystemX11.h
#	source/blender/blenkernel/BKE_global.h
#	source/blender/windowmanager/intern/wm_window.c

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



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

diff --cc CMakeLists.txt
index 47345ef27e0,5f1e84dd6df..d855c372605
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -520,7 -545,24 +548,24 @@@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_C
          [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows
          [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows
        )
+     elseif(APPLE)
 -      execute_process(COMMAND ${CMAKE_CXX_COMPILER} 
 -        -print-file-name=lib 
++      execute_process(COMMAND ${CMAKE_CXX_COMPILER}
++        -print-file-name=lib
+         OUTPUT_VARIABLE CLANG_LIB_DIR
+       )
+       string(STRIP "${CLANG_LIB_DIR}" CLANG_LIB_DIR)
+       find_library(
+         COMPILER_ASAN_LIBRARY NAMES libclang_rt.asan_osx_dynamic.dylib
 -        PATHS 
++        PATHS
+         "${CLANG_LIB_DIR}/darwin/"
+       )
+       unset(CLANG_LIB_DIR)
+     else()
+       find_library(
+         COMPILER_ASAN_LIBRARY asan ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}
+       )
      endif()
+ 
      mark_as_advanced(COMPILER_ASAN_LIBRARY)
    endif()
  endif()
@@@ -1574,6 -1608,12 +1622,12 @@@ endif(
  
  if(MSVC)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
+   # Make MSVC properly report the value of the __cplusplus preprocessor macro
+   # Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless
 -  # of the C++ standard chosen above 
++  # of the C++ standard chosen above
+   if(MSVC_VERSION GREATER 1913)
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
+   endif()
  elseif(
    CMAKE_COMPILER_IS_GNUCC OR
    CMAKE_C_COMPILER_ID MATCHES "Clang" OR
diff --cc intern/ghost/GHOST_C-api.h
index 555e0435b7c,2046b55c97f..7b251490a4b
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@@ -204,7 -203,7 +203,8 @@@ extern GHOST_WindowHandle GHOST_CreateD
   * \return A handle to the new context ( == NULL if creation failed).
   */
  extern GHOST_ContextHandle GHOST_CreateOpenGLContext(GHOST_SystemHandle systemhandle,
-                                                      GHOST_TDrawingContextType type);
++                                                     GHOST_TDrawingContextType type,
+                                                      GHOST_GLSettings glSettings);
  
  /**
   * Dispose of a context.
diff --cc intern/ghost/GHOST_ISystem.h
index 2264a76f367,63018a9cee8..ffd64b9eeb6
--- a/intern/ghost/GHOST_ISystem.h
+++ b/intern/ghost/GHOST_ISystem.h
@@@ -266,7 -265,7 +265,8 @@@ class GHOST_ISystem 
     * Never explicitly delete the context, use disposeContext() instead.
     * \return  The new context (or 0 if creation failed).
     */
-   virtual GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType type) = 0;
 -  virtual GHOST_IContext *createOffscreenContext(GHOST_GLSettings glSettings) = 0;
++  virtual GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType type,
++                                                 GHOST_GLSettings glSettings) = 0;
  
    /**
     * Dispose of a context.
diff --cc intern/ghost/intern/GHOST_C-api.cpp
index 56a5dce4674,e4bb908fec8..71eb4f0e64b
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@@ -136,11 -136,11 +136,12 @@@ void GHOST_GetAllDisplayDimensions(GHOS
  }
  
  GHOST_ContextHandle GHOST_CreateOpenGLContext(GHOST_SystemHandle systemhandle,
-                                               GHOST_TDrawingContextType type)
++                                              GHOST_TDrawingContextType type,
+                                               GHOST_GLSettings glSettings)
  {
    GHOST_ISystem *system = (GHOST_ISystem *)systemhandle;
  
-   return (GHOST_ContextHandle)system->createOffscreenContext(type);
 -  return (GHOST_ContextHandle)system->createOffscreenContext(glSettings);
++  return (GHOST_ContextHandle)system->createOffscreenContext(type, glSettings);
  }
  
  GHOST_TSuccess GHOST_DisposeOpenGLContext(GHOST_SystemHandle systemhandle,
diff --cc intern/ghost/intern/GHOST_System.h
index 2713671913b,d5b23d76016..a4ed26d604b
--- a/intern/ghost/intern/GHOST_System.h
+++ b/intern/ghost/intern/GHOST_System.h
@@@ -116,7 -115,7 +115,8 @@@ class GHOST_System : public GHOST_ISyst
     * Never explicitly delete the context, use disposeContext() instead.
     * \return  The new context (or 0 if creation failed).
     */
-   virtual GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType type) = 0;
 -  virtual GHOST_IContext *createOffscreenContext(GHOST_GLSettings glSettings) = 0;
++  virtual GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType type,
++                                                 GHOST_GLSettings glSettings) = 0;
  
    /**
     * Returns whether a window is valid.
diff --cc intern/ghost/intern/GHOST_SystemCocoa.h
index bb035573355,b89edf8835d..4d199e41b53
--- a/intern/ghost/intern/GHOST_SystemCocoa.h
+++ b/intern/ghost/intern/GHOST_SystemCocoa.h
@@@ -117,7 -116,7 +116,8 @@@ class GHOST_SystemCocoa : public GHOST_
     * Never explicitly delete the context, use disposeContext() instead.
     * \return  The new context (or 0 if creation failed).
     */
-   GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType type);
 -  GHOST_IContext *createOffscreenContext(GHOST_GLSettings glSettings);
++  GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType type,
++                                         GHOST_GLSettings glSettings);
  
    /**
     * Dispose of a context.
diff --cc intern/ghost/intern/GHOST_SystemCocoa.mm
index 25d7d4f0c1b,8e9be626684..5a4dfba25b0
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@@ -765,7 -765,7 +765,8 @@@ GHOST_IWindow *GHOST_SystemCocoa::creat
   * Never explicitly delete the context, use #disposeContext() instead.
   * \return  The new context (or 0 if creation failed).
   */
- GHOST_IContext *GHOST_SystemCocoa::createOffscreenContext(GHOST_TDrawingContextType /* type */)
 -GHOST_IContext *GHOST_SystemCocoa::createOffscreenContext(GHOST_GLSettings glSettings)
++GHOST_IContext *GHOST_SystemCocoa::createOffscreenContext(GHOST_TDrawingContextType /* type */,
++                                                          GHOST_GLSettings glSettings)
  {
    GHOST_Context *context = new GHOST_ContextCGL(false, NULL, NULL, NULL);
    if (context->initializeDrawingContext())
diff --cc intern/ghost/intern/GHOST_SystemNULL.h
index daa1f5f6c9d,faeffffed9e..e45ff62a605
--- a/intern/ghost/intern/GHOST_SystemNULL.h
+++ b/intern/ghost/intern/GHOST_SystemNULL.h
@@@ -82,7 -81,7 +81,8 @@@ class GHOST_SystemNULL : public GHOST_S
    void getAllDisplayDimensions(GHOST_TUns32 &width, GHOST_TUns32 &height) const
    { /* nop */
    }
-   GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType /* type */)
 -  GHOST_IContext *createOffscreenContext(GHOST_GLSettings glSettings)
++  GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType /* type */,
++                                         GHOST_GLSettings glSettings)
    {
      return NULL;
    }
diff --cc intern/ghost/intern/GHOST_SystemSDL.cpp
index 63f857ce327,1769c432d96..561dcf1535d
--- a/intern/ghost/intern/GHOST_SystemSDL.cpp
+++ b/intern/ghost/intern/GHOST_SystemSDL.cpp
@@@ -139,7 -139,7 +139,8 @@@ GHOST_TUns8 GHOST_SystemSDL::getNumDisp
    return SDL_GetNumVideoDisplays();
  }
  
- GHOST_IContext *GHOST_SystemSDL::createOffscreenContext(GHOST_TDrawingContextType /* type */)
 -GHOST_IContext *GHOST_SystemSDL::createOffscreenContext(GHOST_GLSettings glSettings)
++GHOST_IContext *GHOST_SystemSDL::createOffscreenContext(GHOST_TDrawingContextType /* type */,
++                                                        GHOST_GLSettings glSettings)
  {
    GHOST_Context *context = new GHOST_ContextSDL(0,
                                                  NULL,
diff --cc intern/ghost/intern/GHOST_SystemSDL.h
index 958ec385f2c,1c92762ea01..ca16d96fc16
--- a/intern/ghost/intern/GHOST_SystemSDL.h
+++ b/intern/ghost/intern/GHOST_SystemSDL.h
@@@ -73,7 -72,7 +72,8 @@@ class GHOST_SystemSDL : public GHOST_Sy
  
    void getMainDisplayDimensions(GHOST_TUns32 &width, GHOST_TUns32 &height) const;
  
-   GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType type);
 -  GHOST_IContext *createOffscreenContext(GHOST_GLSettings glSettings);
++  GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType type,
++                                         GHOST_GLSettings glSettings);
  
    GHOST_TSuccess disposeContext(GHOST_IContext *context);
  
diff --cc intern/ghost/intern/GHOST_SystemWayland.cpp
index 05a908f9376,81d9824ed26..d19cc961ec1
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@@ -1481,7 -1481,7 +1481,8 @@@ void GHOST_SystemWayland::getAllDisplay
    getMainDisplayDimensions(width, height);
  }
  
- GHOST_IContext *GHOST_SystemWayland::createOffscreenContext(GHOST_TDrawingContextType /* type */)
 -GHOST_IContext *GHOST_SystemWayland::createOffscreenContext(GHOST_GLSettings glSettings)
++GHOST_IContext *GHOST_SystemWayland::createOffscreenContext(GHOST_TDrawingContextType /* type */,
++                                                            GHOST_GLSettings glSettings)
  {
    /* Create new off-screen window. */
    wl_surface *os_surface = wl_compositor_create_surface(compositor());
diff --cc intern/ghost/intern/GHOST_SystemWayland.h
index bb0c3f49543,10b9ef6bd62..c066ed4c580
--- a/intern/ghost/intern/GHOST_SystemWayland.h
+++ b/intern/ghost/intern/GHOST_SystemWayland.h
@@@ -63,7 -62,7 +62,8 @@@ class GHOST_SystemWayland : public GHOS
  
    void getAllDisplayDimensions(GHOST_TUns32 &width, GHOST_TUns32 &height) const override;
  
-   GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType type) override;
 -  GHOST_IContext *createOffscreenContext(GHOST_GLSettings glSettings) override;
++  GHOST_IContext *createOffscreenContext(GHOST_TDrawingContextType type,
++                                         GHOST_GLSettings glSettings) override;
  
    GHOST_TSuccess disposeContext(GHOST_IContext *context) override;
  
diff --cc intern/ghost/intern/GHOST_SystemWin32.cpp
index 1ec0898da87,f784d100db2..067f5de6d76
--- a/intern/ghost/inter

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list