diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-23 19:05:23 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-23 19:05:23 -0800 |
| commit | a1827ee5e9b8088b23db3fa688b7bd62b7bbe9ac (patch) | |
| tree | eab251421b70f2ee64a0e420e270ed6295bd2987 /.github | |
| parent | 401d8cdb12ae69aeb216c80c9bb90240d8359649 (diff) | |
SPIRV Fixes. (#3622)
* Use SpvSourceLanguageSlang enum.
* Fix spirv entrypoint interface.
* Cleanup.
* Add error on unknown spirv opcode.
* Fix CI.
* Fix.
Diffstat (limited to '.github')
| -rw-r--r-- | .github/github_test.sh | 43 | ||||
| -rw-r--r-- | .github/workflows/linux-arm64.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/linux.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/macos.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/windows.yml | 1 |
5 files changed, 47 insertions, 3 deletions
diff --git a/.github/github_test.sh b/.github/github_test.sh new file mode 100644 index 000000000..ec6586114 --- /dev/null +++ b/.github/github_test.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + + +PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') +ARCHITECTURE=$(uname -m) + +# Darwin is actually macosx (for paths etc) +if [ "${PLATFORM}" == "darwin" ]; then + PLATFORM="macosx" + + # Modern OSX is only 64 bit, so assume that + if [ "${ARCHITECTURE}" == "i386" ]; then + ARCHITECTURE="x64" + fi +fi + +if [ "${ARCHITECTURE}" == "x86_64" ]; then + ARCHITECTURE="x64" +fi + +# CONFIGURATION=release or debug +if [ "${CC}" == "gcc" ] && [ "${CONFIGURATION}" == "release" ] && [ "${ARCHITECTURE}" == "x64" ] +then + SLANG_TEST_CATEGORY=full +else + SLANG_TEST_CATEGORY=smoke +fi + +TARGET=${PLATFORM}-${ARCHITECTURE} + +OUTPUTDIR=bin/${TARGET}/${CONFIGURATION}/ + +if [ "${ARCHITECTURE}" == "x64" -a "${PLATFORM}" != "macosx" ]; then + unzip vk_swiftshader_linux_x64.zip -d $OUTPUTDIR +fi + +SLANG_TEST=${OUTPUTDIR}slang-test + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OUTPUTDIR +export PATH=$PATH:${OUTPUTDIR} +export SLANG_RUN_SPIRV_VALIDATION=1 +export SLANG_USE_SPV_SOURCE_LANGUAGE_UNKNOWN=1 +${SLANG_TEST} -bindir ${OUTPUTDIR} -travis -category ${SLANG_TEST_CATEGORY} ${SLANG_TEST_FLAGS} -api all-vk -expected-failure-list tests/expected-failure-github.txt diff --git a/.github/workflows/linux-arm64.yml b/.github/workflows/linux-arm64.yml index 0c18ffe6b..a35672c5f 100644 --- a/.github/workflows/linux-arm64.yml +++ b/.github/workflows/linux-arm64.yml @@ -56,4 +56,4 @@ jobs: CC=${{matrix.compiler}} ARCH=${{matrix.platform}} PATH="${PATH:+${PATH}:}$(pwd)/external/slang-binaries/spirv-tools/$(uname -m)-linux/bin" - source ./github_test.sh + source .github/github_test.sh diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 427823f6b..8180965f9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -72,4 +72,4 @@ jobs: CC=${{matrix.compiler}} ARCH=${{matrix.platform}} PATH="${PATH:+${PATH}:}$(pwd)/external/slang-binaries/spirv-tools/$(uname -m)-linux/bin" - source ./github_test.sh + source .github/github_test.sh diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 11d54a247..30a3fe003 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -69,4 +69,4 @@ jobs: CONFIGURATION=${{matrix.configuration}} CC=${{matrix.compiler}} ARCH=${{matrix.targetPlatform}} - source ./github_test.sh + source .github/github_test.sh diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 91843d4dd..3dc4abfb5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -68,6 +68,7 @@ jobs: $spirvToolsBinDir = ".\external\slang-binaries\spirv-tools\windows-${{matrix.testPlatform}}\bin\"; $env:Path += ";$slangTestBinDir;$spirvToolsBinDir"; $env:SLANG_RUN_SPIRV_VALIDATION='1'; + $env:SLANG_USE_SPV_SOURCE_LANGUAGE_UNKNOWN='1'; Expand-Archive "vk_swiftshader_windows_${{matrix.testPlatform}}.zip" -DestinationPath $slangTestBinDir; & "$slangTestBinDir\slang-test.exe" -api all-dx12 -appveyor -bindir "$slangTestBinDir\" -platform ${{matrix.testPlatform}} -configuration ${{matrix.configuration}} -category ${{matrix.testCategory}} -expected-failure-list tests/expected-failure-github.txt 2>&1; |
