vulkan: Initial Vulkan support!

This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.
This commit is contained in:
Ryan C. Gordon
2017-08-27 22:15:57 -04:00
parent 8e7998e19d
commit 25e3a1ec90
60 changed files with 5456 additions and 80 deletions

View File

@@ -1153,6 +1153,25 @@ macro(CheckRPI)
endif(VIDEO_RPI)
endmacro(CheckRPI)
macro(CheckVulkanHeaders)
if(VIDEO_VULKAN)
# ${VULKAN_SDK} could be unset during the first configure run with
# cmake-gui resulting in vulkan.h not being found. If it's been
# subsequently changed, unset is necessary to ensure check is run again.
unset(HAVE_VULKAN_H CACHE)
# Prefer ${VULKAN_SDK} header
set(CMAKE_REQUIRED_INCLUDES "${VULKAN_SDK}/include")
check_include_file("vulkan/vulkan.h" HAVE_VULKAN_H)
if(HAVE_VULKAN_H)
list(APPEND EXTRA_CFLAGS "-I${VULKAN_SDK}/include")
else()
# Check system includes.
unset(HAVE_VULKAN_H CACHE)
check_include_file("vulkan/vulkan.h" HAVE_VULKAN_H)
endif()
endif()
endmacro(CheckVulkanHeaders)
# Requires:
# - EGL
# - PkgCheckModules