bgfx/3rdparty/spirv-cross/test_shaders.sh

25 lines
1.2 KiB
Bash
Raw Normal View History

2019-01-10 06:23:47 +03:00
#!/bin/bash
2019-04-15 07:53:50 +03:00
if [ -z "$SPIRV_CROSS_PATH" ]; then
echo "Building spirv-cross"
make -j$(nproc)
SPIRV_CROSS_PATH="./spirv-cross"
fi
2019-01-10 06:23:47 +03:00
export PATH="./external/glslang-build/output/bin:./external/spirv-tools-build/output/bin:.:$PATH"
echo "Using glslangValidation in: $(which glslangValidator)."
echo "Using spirv-opt in: $(which spirv-opt)."
2019-04-15 07:53:50 +03:00
echo "Using SPIRV-Cross in: \"$SPIRV_CROSS_PATH\"."
2019-01-10 06:23:47 +03:00
2019-04-15 07:53:50 +03:00
./test_shaders.py shaders --spirv-cross "$SPIRV_CROSS_PATH" || exit 1
./test_shaders.py shaders --opt --spirv-cross "$SPIRV_CROSS_PATH" || exit 1
./test_shaders.py shaders-no-opt --spirv-cross "$SPIRV_CROSS_PATH" || exit 1
./test_shaders.py shaders-msl --msl --spirv-cross "$SPIRV_CROSS_PATH" || exit 1
./test_shaders.py shaders-msl --msl --opt --spirv-cross "$SPIRV_CROSS_PATH" || exit 1
./test_shaders.py shaders-msl-no-opt --msl --spirv-cross "$SPIRV_CROSS_PATH" || exit 1
./test_shaders.py shaders-hlsl --hlsl --spirv-cross "$SPIRV_CROSS_PATH" || exit 1
./test_shaders.py shaders-hlsl --hlsl --opt --spirv-cross "$SPIRV_CROSS_PATH" || exit 1
./test_shaders.py shaders-hlsl-no-opt --hlsl --spirv-cross "$SPIRV_CROSS_PATH" || exit 1
./test_shaders.py shaders-reflection --reflect --spirv-cross "$SPIRV_CROSS_PATH" || exit 1
2019-01-10 06:23:47 +03:00