Skip to content
Permalink
Browse files

- Make HAVE_VULKAN an option so that it can be disabled

Had to compile on a Mac with no MoltenVK and no Vulkan SDK.
  • Loading branch information...
coelckers committed Jun 27, 2019
1 parent 77ea4a9 commit 3810d9beb363b1f5de46d7dec0ee67a622f969c4
Showing with 5 additions and 2 deletions.
  1. +1 −1 CMakeLists.txt
  2. +4 −1 src/posix/cocoa/i_video.mm
@@ -155,7 +155,7 @@ target_architecture(ZDOOM_TARGET_ARCH)

if( ${ZDOOM_TARGET_ARCH} MATCHES "x86_64" )
set( HAVE_VM_JIT ON )
set( HAVE_VULKAN ON )
option (HAVE_VULKAN "Enable Vulkan support" ON)
endif()

# no, we're not using external asmjit for now, we made too many modifications to our's.
@@ -355,8 +355,9 @@ void SetupOpenGLView(CocoaWindow* window)

~CocoaVideo()
{
#ifdef HAVE_VULKAN
delete m_vulkanDevice;

#endif
ms_window = nil;
}

@@ -367,6 +368,7 @@ void SetupOpenGLView(CocoaWindow* window)

SystemBaseFrameBuffer *fb = nullptr;

#ifdef HAVE_VULKAN
if (ms_isVulkanEnabled)
{
const NSRect contentRect = [ms_window contentRectForFrameRect:[ms_window frame]];
@@ -421,6 +423,7 @@ void SetupOpenGLView(CocoaWindow* window)
}
}
else
#endif
{
SetupOpenGLView(ms_window);
}

2 comments on commit 3810d9b

@alexey-lysiuk

This comment has been minimized.

Copy link
Collaborator

replied Jun 29, 2019

There is no dependency on MoltenVK nor Vulkan SDK in Cocoa backend. Travis CI has no issues with building on macOS without both. Did compilation fail for you?

@coelckers

This comment has been minimized.

Copy link
Owner Author

replied Jul 3, 2019

Please sign in to comment.
You can’t perform that action at this time.