vulkan: Initial Vulkan support!

This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.

--HG--
extra : rebase_source : cb3bb332146125366b5242c0d7444f44638733d9
extra : amend_source : c72ebb6d3a92efc3fdd085ce3b6d4b1d7f573cc9
This commit is contained in:
Ryan C. Gordon 2017-08-27 22:15:57 -04:00
parent 0ff15ac41b
commit a566435db1
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