Fix VulkanPlatform compiling and linking on OSX
authorDzmitry Malyshau <dmalyshau@mozilla.com>
Wed, 9 May 2018 18:15:26 +0000 (14:15 -0400)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 22 May 2018 09:36:24 +0000 (05:36 -0400)
There where 2 problems with the code:
  1. it broke upon the change to vk::Library interface,
since OSX is not yet CI tested
  2. it didn't link against OpenGL library for Default target,
which appears to be required for anything on OSX

The latter was always an issue, but one we could work around locally.
I believe the proposed upstream patch is clean enough to avoid our hacks.

Change-Id: I9b570e3700031d92367a815baf5b32f751e248b3
Components: Framework

framework/platform/osx/tcuOSXVulkanPlatform.cpp
targets/default/default.cmake

index b65def1..41b8d56 100644 (file)
@@ -48,11 +48,16 @@ public:
        {
        }
 
-       const vk::PlatformInterface& getPlatformInterface (void) const
+       const vk::PlatformInterface&    getPlatformInterface    (void) const
        {
                return m_driver;
        }
 
+       const tcu::FunctionLibrary&             getFunctionLibrary              (void) const
+       {
+               return m_library;
+       }
+
 private:
        const DynamicFunctionLibrary    m_library;
        const vk::PlatformDriver                m_driver;
index 08470a9..588bbde 100644 (file)
@@ -79,3 +79,10 @@ endif ()
 if (DE_OS_IS_WIN32)
        set(DEQP_SUPPORT_WGL ON)
 endif ()
+
+# MacOS?
+if (DE_OS_IS_OSX)
+       find_package(OpenGL REQUIRED)
+       set(DEQP_PLATFORM_LIBRARIES ${OPENGL_LIBRARIES})
+       include_directories(${OPENGL_INCLUDE_DIRS})
+endif()