Inject kSamplersYUV[] into Slang code
#1219
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: C/C++ CI | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| pull_request: | |
| branches: [ "**" ] | |
| # https://github.com/git-lfs/git-lfs/issues/5749 | |
| env: | |
| GIT_CLONE_PROTECTION_ACTIVE: false | |
| GIT_LFS_SKIP_SMUDGE: true | |
| jobs: | |
| build: | |
| name: "Android (Ubuntu)" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up NDK | |
| uses: nttld/[email protected] | |
| with: | |
| ndk-version: r28 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: 'oracle' | |
| - name: Install Ubuntu packages | |
| shell: bash | |
| run: | | |
| sudo sed -i 's/azure\.//' /etc/apt/sources.list | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-13 clang-16 xorg-dev libxinerama-dev libxcursor-dev libgles2-mesa-dev libegl1-mesa-dev libglfw3-dev libglew-dev libstdc++-12-dev extra-cmake-modules libxkbcommon-x11-dev wayland-protocols ninja-build | |
| sudo apt remove cmake -y | |
| sudo pip install cmake==4.0.0 | |
| which make | |
| cmake --version | |
| - name: Prepare Vulkan SDK | |
| uses: jakoch/[email protected] | |
| with: | |
| vulkan_version: 1.4.309.0 | |
| install_runtime: true | |
| cache: true | |
| stripdown: true | |
| - name: Generate Android projects | |
| shell: bash | |
| env: | |
| CC: "clang-16" | |
| CXX: "clang++-16" | |
| run: | | |
| cmake -G "Unix Makefiles" -S "${{ github.workspace }}" -B build -DLVK_WITH_SAMPLES_ANDROID=ON | |
| - name: Assemble 009_TriplanarMapping APK | |
| run: | | |
| cd build/android/009_TriplanarMapping | |
| chmod +x ./gradlew | |
| ./gradlew assembleDebug | |
| - name: Assemble Tiny_MeshLarge APK | |
| run: | | |
| cd build/android/Tiny_MeshLarge | |
| chmod +x ./gradlew | |
| ./gradlew assembleDebug | |
| - name: Assemble 003_RenderToCubeMapSinglePass APK | |
| run: | | |
| cd build/android/003_RenderToCubeMapSinglePass | |
| chmod +x ./gradlew | |
| ./gradlew assembleDebug | |
| cmake-build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { | |
| name: "Windows - MSVC 2022 (glslang)", | |
| os: windows-latest, | |
| build_type: "Debug", | |
| cc: "cl", | |
| cxx: "cl", | |
| generators: "Visual Studio 17 2022", | |
| cmake_args: "-DLVK_WITH_TRACY=ON -DLVK_WITH_TRACY_GPU=ON" | |
| } | |
| # - { | |
| # name: "Windows - MSVC 2022 (Slang)", | |
| # os: windows-latest, | |
| # build_type: "Debug", | |
| # cc: "cl", | |
| # cxx: "cl", | |
| # generators: "Visual Studio 17 2022", | |
| # cmake_args: "-DLVK_WITH_TRACY=ON -DLVK_WITH_SLANG=ON" | |
| # } | |
| - { | |
| name: "Ubuntu - Clang", | |
| os: ubuntu-latest, | |
| build_type: "Debug", | |
| cc: "clang-16", | |
| cxx: "clang++-16", | |
| generators: "Unix Makefiles", | |
| } | |
| - { | |
| name: "Ubuntu - Clang (Wayland)", | |
| os: ubuntu-latest, | |
| build_type: "Debug", | |
| cc: "clang-16", | |
| cxx: "clang++-16", | |
| generators: "Unix Makefiles", | |
| cmake_args: "-DLVK_WITH_WAYLAND=ON" | |
| } | |
| # - { | |
| # name: "Ubuntu - GCC", | |
| # os: ubuntu-latest, | |
| # build_type: "Debug", | |
| # cc: "gcc-13", | |
| # cxx: "g++-13", | |
| # generators: "Unix Makefiles" | |
| # } | |
| runs-on: ${{ matrix.config.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - if: startsWith(matrix.config.os, 'ubuntu') | |
| name: Install Ubuntu packages | |
| run: | | |
| sudo sed -i 's/azure\.//' /etc/apt/sources.list | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-13 clang-16 xorg-dev libxinerama-dev libxcursor-dev libgles2-mesa-dev libegl1-mesa-dev libglfw3-dev libglew-dev libstdc++-12-dev extra-cmake-modules libxkbcommon-x11-dev wayland-protocols | |
| sudo apt remove cmake -y | |
| sudo pip install cmake==4.0.0 | |
| - name: Prepare Vulkan SDK | |
| uses: jakoch/[email protected] | |
| with: | |
| vulkan_version: 1.4.309.0 | |
| install_runtime: true | |
| cache: true | |
| stripdown: true | |
| - name: Get the number of CPU cores | |
| uses: SimenB/github-actions-cpu-cores@v2 | |
| - name: Build | |
| shell: bash | |
| env: | |
| CC: ${{ matrix.config.cc }} | |
| CXX: ${{ matrix.config.cxx }} | |
| run: | | |
| cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build ${{ matrix.config.cmake_args }} | |
| cd build | |
| cmake --build . --parallel ${{ steps.cpu-cores.outputs.count }} | |
| cmake-build-macos: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { | |
| name: "macOS - Clang (Xcode)", | |
| os: macos-latest, | |
| build_type: "Debug", | |
| cc: "clang", | |
| cxx: "clang++", | |
| generators: "Xcode", | |
| cmake_args: "-DLVK_WITH_TRACY=OFF" | |
| } | |
| runs-on: ${{ matrix.config.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Vulkan SDK | |
| uses: jakoch/[email protected] | |
| with: | |
| vulkan_version: 1.4.309.0 | |
| install_runtime: true | |
| cache: true | |
| stripdown: true | |
| - name: Get the number of CPU cores | |
| uses: SimenB/github-actions-cpu-cores@v2 | |
| - name: Build | |
| shell: bash | |
| env: | |
| CC: ${{ matrix.config.cc }} | |
| CXX: ${{ matrix.config.cxx }} | |
| run: | | |
| cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build ${{ matrix.config.cmake_args }} | |
| cd build | |
| cmake --build . --parallel ${{ steps.cpu-cores.outputs.count }} | |
| cmake-test-ubuntu: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { | |
| name: "Ubuntu - Clang", | |
| os: ubuntu-latest, | |
| build_type: "Debug", | |
| cc: "clang-16", | |
| cxx: "clang++-16", | |
| generators: "Unix Makefiles", | |
| } | |
| runs-on: ${{ matrix.config.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Ubuntu packages | |
| shell: bash | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-13 clang-16 xorg-dev libxinerama-dev libxcursor-dev libgles2-mesa-dev libegl1-mesa-dev libglfw3-dev libglew-dev libstdc++-12-dev extra-cmake-modules libxkbcommon-x11-dev wayland-protocols ninja-build | |
| sudo apt-get install -y mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers | |
| sudo apt remove cmake -y | |
| sudo pip install cmake==4.0.0 | |
| which make | |
| cmake --version | |
| vulkaninfo | |
| - name: Install Vulkan SDK | |
| uses: jakoch/[email protected] | |
| with: | |
| vulkan_version: 1.4.309.0 | |
| install_runtime: true | |
| cache: true | |
| stripdown: true | |
| - name: Get the number of CPU cores | |
| uses: SimenB/github-actions-cpu-cores@v2 | |
| - name: Build | |
| shell: bash | |
| env: | |
| CC: ${{ matrix.config.cc }} | |
| CXX: ${{ matrix.config.cxx }} | |
| run: | | |
| cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build ${{ matrix.config.cmake_args }} -DCMAKE_BUILD_TYPE=Debug | |
| cd build | |
| cmake --build . --parallel ${{ steps.cpu-cores.outputs.count }} | |
| - name: Run tests | |
| run: | | |
| ls build/samples | |
| ./build/samples/001_HelloTriangle --headless --screenshot-frame 1 --screenshot-file 001_HelloTriangle.png --log-file 001_HelloTriangle.txt | |
| ./build/samples/005_MeshShaders --headless --screenshot-frame 1 --screenshot-file 005_MeshShaders.png --log-file 005_MeshShaders.txt | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: LogsAndScreenshots | |
| path: | | |
| 001_HelloTriangle.png | |
| 001_HelloTriangle.txt | |
| 005_MeshShaders.png | |
| 005_MeshShaders.txt | |
| if-no-files-found: error | |
| retention-days: 3 | |
| overwrite: true |