This script will crank a supplied set of glslang test shaders through the spirv-val tool, reporting on the results. There are some important things to note: * Like 'runtests', this must be invoked from the 'Test' subdirectory. * This is mostly useful on the hlsl.* tests, although it is not strictly limited to those. The reason is that most of the glsl tests either contain validation error cases, and so fail to compile, or are not using a #version compatible with producing SPIR-V modules. * Some tests, such as negative tests, or most of the glsl tests, have intentional compilation errors. This script treats that as OK. Failures are successfully compiling shaders which proceed to fail spirv-val. * spirv-val is looked for in either the External directory, or if not found there, in a sibling directory of glslang, and if not found there either, in /usr/local/bin. * There are a bunch of command line options. ./validate-shaders.sh --help will describe them. Some examples to try: ./validate-shaders.sh hlsl.* # exercise all hlsl.* tests. ./validate-shaders.sh --terse hlsl.* # same, but tersely. # dump validator results for problems in something.frag: ./validate-shaders.sh --quiet --dump-val something.frag
8.3 KiB
Executable File
8.3 KiB
Executable File