aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2019-05-21 17:45:13 -0400
committerDavid Neto <dneto@google.com>2019-05-21 14:45:13 -0700
commit9d11af8005f5ae9568391e70ff6a2bb50861b0fe (patch)
tree71307a9b99935b058aea1e9eef32efefe7648c8c /CMakeLists.txt
parente5dc020a6f781aaa7c1dd61a59307e51437c114f (diff)
downloadamber-9d11af8005f5ae9568391e70ff6a2bb50861b0fe.tar.gz
Add support for building SwiftShader (#512)
* Build with swiftshader * Roll swiftshader
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80a0df7..e066727 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,9 @@ option(AMBER_SKIP_SHADERC
option(AMBER_SKIP_SAMPLES
"Skip building sample application" ${AMBER_SKIP_SAMPLES})
option(AMBER_USE_LOCAL_VULKAN "Build with vulkan in third_party" OFF)
+option(AMBER_ENABLE_SWIFTSHADER
+ "Build using SwiftShader" ${AMBER_ENABLE_SWIFTSHADER})
+option(AMBER_USE_LOCAL_VULKAN "Build with vulkan in third_party" OFF)
if (${AMBER_SKIP_SPIRV_TOOLS})
set(AMBER_ENABLE_SPIRV_TOOLS FALSE)
@@ -66,6 +69,11 @@ else()
set(AMBER_ENABLE_SAMPLES TRUE)
endif()
+if (${AMBER_ENABLE_SWIFTSHADER})
+ # Swiftshader requires the loader to be built.
+ set(AMBER_USE_LOCAL_VULKAN TRUE)
+endif()
+
if (${AMBER_USE_LOCAL_VULKAN})
message(STATUS "Using python3")
# vulkan-loaders requires python 3
@@ -76,6 +84,7 @@ message(STATUS "Amber enable SPIRV-Tools: ${AMBER_ENABLE_SPIRV_TOOLS}")
message(STATUS "Amber enable Shaderc: ${AMBER_ENABLE_SHADERC}")
message(STATUS "Amber enable tests: ${AMBER_ENABLE_TESTS}")
message(STATUS "Amber enable samples: ${AMBER_ENABLE_SAMPLES}")
+message(STATUS "Amber enable SwiftShader: ${AMBER_ENABLE_SWIFTSHADER}")
include_directories("${PROJECT_SOURCE_DIR}/include")
include_directories("${PROJECT_SOURCE_DIR}")