- Make HAVE_VULKAN an option so that it can be disabled

Had to compile on a Mac with no MoltenVK and no Vulkan SDK.
This commit is contained in:
Christoph Oelckers 2019-06-27 09:10:20 +02:00
parent 77ea4a9fb7
commit 3810d9beb3
2 changed files with 5 additions and 2 deletions

View File

@ -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.

View File

@ -355,8 +355,9 @@ public:
~CocoaVideo()
{
#ifdef HAVE_VULKAN
delete m_vulkanDevice;
#endif
ms_window = nil;
}
@ -367,6 +368,7 @@ public:
SystemBaseFrameBuffer *fb = nullptr;
#ifdef HAVE_VULKAN
if (ms_isVulkanEnabled)
{
const NSRect contentRect = [ms_window contentRectForFrameRect:[ms_window frame]];
@ -421,6 +423,7 @@ public:
}
}
else
#endif
{
SetupOpenGLView(ms_window);
}