diff --git a/.github/workflows/build-dxc.yaml b/.github/workflows/build-dxc.yaml index 9a6abe5..59a3b0b 100644 --- a/.github/workflows/build-dxc.yaml +++ b/.github/workflows/build-dxc.yaml @@ -5,7 +5,7 @@ jobs: runs-on: macos-15-xlarge steps: - uses: actions/checkout@v6 - - run: git clone https://github.com/microsoft/DirectXShaderCompiler.git dxc --revision=$(cat commit-hash) --recurse-submodules + - run: git clone https://github.com/Traverse-Research/DirectXShaderCompiler.git dxc --revision=$(cat commit-hash) --recurse-submodules - run: cmake -Bbuild -GNinja -C cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_WERROR=OFF working-directory: dxc - run: cmake --build dxc/build -t dxcompiler @@ -20,7 +20,7 @@ jobs: steps: - run: sudo apt-get install -y ninja-build - uses: actions/checkout@v6 - - run: git clone https://github.com/microsoft/DirectXShaderCompiler.git dxc --revision=$(cat commit-hash) --recurse-submodules + - run: git clone https://github.com/Traverse-Research/DirectXShaderCompiler.git dxc --revision=$(cat commit-hash) --recurse-submodules - run: cmake -Bbuild -GNinja -C cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_WERROR=OFF working-directory: dxc - run: cmake --build dxc/build -t dxcompiler @@ -33,7 +33,7 @@ jobs: runs-on: windows-2025 steps: - uses: actions/checkout@v6 - - run: git clone https://github.com/microsoft/DirectXShaderCompiler.git dxc --revision=$(cat commit-hash) --recurse-submodules + - run: git clone https://github.com/Traverse-Research/DirectXShaderCompiler.git dxc --revision=$(cat commit-hash) --recurse-submodules - run: > cmake -Bbuild -G "Visual Studio 17 2022" -C cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=OFF -DLLVM_ENABLE_WERROR=OFF diff --git a/README.md b/README.md index 14f8bdf..8472322 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,14 @@ # How to use +This repo builds `libdxcompiler.{dylib,so,dll}` from +[Traverse-Research/DirectXShaderCompiler][fork] (our fork of microsoft/DirectXShaderCompiler) so we can ship our patches — currently the +SPIR-V `-fspv-allow-import` flag for Import linkage in `lib_*` targets. + 1. Check out the repo -2. Update [`commit-hash`](./commit-hash) to point to the right dxc commit hash -3. Download the build artifacts +2. Update [`commit-hash`](./commit-hash) to point to the desired commit on + the fork's `main` (or any branch HEAD if you're testing a topic branch) +3. Download the build artifacts from the workflow run 4. Unzip all artifacts into the right directories in `breda` (`crates/breda-shader-compiler/dxc//`) 5. When on macOS, issue `xattr -d com.apple.quarantine libdxcompiler.dylib` to de-quarantine the library (your browser will quarantine executable files, we'll need to tell macOS) + +[fork]: https://github.com/Traverse-Research/DirectXShaderCompiler diff --git a/commit-hash b/commit-hash index 80f8897..44adfd7 100644 --- a/commit-hash +++ b/commit-hash @@ -1 +1 @@ -4a9886749be01825e3bb161e6ea6e01fd70e9024 +c99070ed9164fb96b2afa0765294a3396adf36eb