This CL updates the build scripts to only install to glslang/SPIRV
instead of also installing to the SPIRV/ folder. The deprecation notice
is also removed.
Note, this may cause downstream build issues if include directories have
not been updated
Fixes#1964#2216
This should enable glslang to be used as a dependency of other projects
that target WebAssembly, instead of assuming "EMSCRIPTEN" => "Want
glslang.js".
Allows building non-min-size builds with Emscripten.
Adds ENABLE_GLSLANG_WEB_DEVEL.
Moves the glslang.js files to OSDependent/Web.
Small cleanups and docs update.
You may need to install python 3.x and also
[windows users] may need to get it in your path in front of python 2.7.x.
If you don't need the external projects (i.e., SPIRV-Tools) and don't want
to upgrade to python 3, don't create the External subdirectory and CMake
won't require python 3. (CMake has a bug that makes it find the wrong one
on a first pass if the top level does not require the version needed by
lower levels.)
- Mention that the instructions are written for Bash.
- Quote the CMAKE_INSTALL_PREFIX to handle spaces in $(pwd).
- Remove SSH clone instructions. Instructions on how to clone are for
those unfamiliar with GitHub, so fewer options are better and SSH
requires additional configuration to make work.
- Replace ninja with make, because more people are familiar with it and
we probably don't need to explain how to install it. Fixes#956.
- Remove the section mentioning cygwin, as it's unclear and doesn't
seem necessary.
- Mention minimum language version in the Dependencies section.
- Move `cd $BUILD_DIR` out of the Linux configuration section because
it's needed on both platforms. Add a line about creating the build
directory, too.
Also added known-good mechanism to fetch latest validated spirv-tools.
Also added -Od and -Os to disable optimizer and optimize for size.
Fetching spirv-tools is optional for both glsl and hlsl. Legalization
of hlsl is done by default if spirv-opt is present at cmake time.
Optimization for glsl is currently done through the option -Os.
Legalization testing is currently only done on four existing shaders.
A separate baseLegalResults directory holds those results. All previous
testing is done with the optimizer disabled.
The existing test harness is a homemade shell script. All the tests
and the expected results are written in plain text files. The harness
just reads in a test, invoke the glslangValidator binary on it, and
compare the result with the golden file. All tests are kinda
integration tests.
This patch add Google Test as an external project, which provides a
new harness for reading shader source files, compile to SPIR-V, and
then compare with the expected output.