"a18233c99e1dc59a256180e6871d9305a42e91b3f98799b3ceb98e87e9ec5e31",
"libpng",
postExtract = postExtractLibpng),
+ GitRepo(
+ "git@gitlab.khronos.org:spirv/spirv-tools.git",
+ "8a64b76360d2050908ce42e1c7b4d1d6297e82f5",
+ "spirv-tools"),
+ GitRepo(
+ "https://github.com/KhronosGroup/glslang",
+ "b9cd3996c7a67687b0a1fe5066c92e43a820de1e",
+ "glslang"),
]
def parseArgs ():
message(FATAL_ERROR "Include Defs.cmake")
endif ()
-# Assume build inside Android source tree
-set(DEFAULT_GLSLANG_SRC_PATH "../glslang")
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/SPIRV/GlslangToSpv.cpp")
+ set(DEFAULT_GLSLANG_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src)
+else ()
+ set(DEFAULT_GLSLANG_SRC_PATH "../glslang")
+endif ()
set(GLSLANG_SRC_PATH ${DEFAULT_GLSLANG_SRC_PATH} CACHE STRING "Path to glslang source tree")
-#cmake file for spirv-tools
+# cmake file for spirv-tools
if (NOT DE_DEFS)
message(FATAL_ERROR "Include Defs.cmake")
endif ()
-# Assume build inside Android source tree
-set(DEFAULT_SPIRV_TOOLS_SRC_PATH "../spirv-tools")
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/include/libspirv/libspirv.h")
+ set(DEFAULT_SPIRV_TOOLS_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src)
+else ()
+ set(DEFAULT_SPIRV_TOOLS_SRC_PATH "../spirv-tools")
+endif ()
set(SPIRV_TOOLS_SRC_PATH ${DEFAULT_SPIRV_TOOLS_SRC_PATH} CACHE STRING "Path to spirv-tools source tree")
if (IS_ABSOLUTE ${SPIRV_TOOLS_SRC_PATH})
set(DEQP_HAVE_SPIRV_TOOLS ON PARENT_SCOPE)
set(SPIRV_SKIP_EXECUTABLES ON)
add_subdirectory(${SPIRV_TOOLS_ABS_PATH} spirv-tools)
-else()
+else ()
message(STATUS "spirv-tools not found; SPIR-V assembly not available")
set(DEQP_HAVE_SPIRV_TOOLS OFF PARENT_SCOPE)
-endif()
+endif ()
Building
--------
-To build dEQP, you need first to download sources for zlib, libpng, and glslang.
+To build dEQP, you need first to download sources for zlib, libpng, glslang,
+and spirv-tools.
-To download zlib and libpng, run:
+To download sources, run:
$ python external/fetch_sources.py
-Glslang is optional, but enables GLSL to SPIR-V compilation. Check out glslang
-from the official repository to directory next to 'deqp':
-
-$ cd .. # assuming you were in 'deqp' source directory
-$ git clone https://github.com/KhronosGroup/glslang.git glslang
-
-spirv-tools is optional, but enables SPIRV assembly. Check out spirv-tools
-from the google branch of the gitlab repository next to 'deqp':
-
-$ cd .. # assuming you were in 'deqp' source directory
-$ git clone -b google https://gitlab.khronos.org/spirv/spirv-tools.git
-
-I.e the final directory structure should look like this:
-
-src/
- deqp/
- glslang/
- spirv-tools/
-
-After downloading all dependencies, please follow instructions at
-http://source.android.com/devices/graphics/build-tests.html
+You may need to re-run fetch_sources.py to update to the latest glslang and
+spirv-tools revisions occasionally.
NOTE: glslang integration is not yet available on Android due to a toolchain
bug, so pre-compiled SPIR-V binaries must be used. See instructions below.