Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
e1bb3bc
let's compile dxcompiler target as static library
AnastaZIuk Nov 10, 2022
ac9f2c1
fix bug for add_clang_library with libclang
AnastaZIuk Nov 11, 2022
6b2a1a7
don't force us to use WX with any config, it should depend on an exte…
AnastaZIuk Nov 29, 2022
58c4918
making dxcompiler static was a bad idea, we better create it shared a…
AnastaZIuk Dec 13, 2022
2ebc5ae
patch DXC CMakeLists.txt to support generating exact absolute paths t…
AnastaZIuk Dec 13, 2022
4877009
we need LLVMSupport as well
AnastaZIuk Dec 14, 2022
609ea0b
stop and fix the CMAKE_MSVC_RUNTIME_LIBRARY issue by setting CMP0091 …
AnastaZIuk Dec 14, 2022
d8ad66e
update main to microsoft
Erfan-Ahmadi Jan 5, 2023
c354bcb
Merge branch 'main' into devshFixes
Erfan-Ahmadi Jan 5, 2023
3e55f23
Fixed delay loading the DLL in non-Debug builds
devshgraphicsprogramming Feb 20, 2023
fc05d30
pull remote main branch and resolve conflicts
AnastaZIuk Sep 4, 2023
9abecc6
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler int…
AnastaZIuk Sep 8, 2023
2fd8cc3
use latest main on SPIRV-Tools with original remote
AnastaZIuk Sep 12, 2023
ee0762a
removed old original SPIRV-Tools submodule
AnastaZIuk Sep 12, 2023
71cfa91
add forked SPIRV-Tools
AnastaZIuk Sep 12, 2023
2cf6fa2
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler int…
AnastaZIuk Oct 12, 2023
77ee1cc
resolved conflicts, pulled from microsoft main
AnastaZIuk Oct 18, 2023
a0a43e2
update SPIRV-Tools fork
AnastaZIuk Oct 18, 2023
caf6915
Removed submodule
Przemog1 Oct 20, 2023
9519617
Added SPIRV-Headers fork
Przemog1 Oct 20, 2023
5adf0e3
Removed submodule
Przemog1 Oct 20, 2023
d1683da
Added SPIRV-Headers submodule
Przemog1 Oct 20, 2023
a0e1aea
Updated SPIRV-Headers submodule
Przemog1 Oct 20, 2023
29a5e12
Updated SPIRV-Headers submodule
Przemog1 Oct 20, 2023
0d8a809
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler
deprilula28 Oct 25, 2023
0f6ab8b
Merge branch 'main' into devshFixes
deprilula28 Oct 25, 2023
2ae9b2b
Merge pull request #1 from microsoft/main
devshgraphicsprogramming Oct 26, 2023
024c8a9
Update SPIR-V Headers and Tools
devshgraphicsprogramming Oct 26, 2023
3c5daf0
Update SPIRV-Headers
deprilula28 Jan 3, 2024
16fc909
Merge branch 'main' of https://github.com/microsoft/DirectXShaderComp…
deprilula28 Jan 3, 2024
e33460f
Update SPIRV-Tools
deprilula28 Jan 3, 2024
79bf3aa
Merge pull request #2 from Devsh-Graphics-Programming/update_nbl_dxc_…
devshgraphicsprogramming Jan 12, 2024
ba09ba7
merge upstream from Microsoft && Update SPIR-V Headers and Tools
devshgraphicsprogramming Feb 21, 2024
2438c44
update external/SPIRV-Headers & external/SPIRV-Tools to latest origin…
AnastaZIuk Apr 29, 2024
2a0f996
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler int…
AnastaZIuk Apr 29, 2024
f565dbb
Update SPIR-V Headers and Tools
Jun 26, 2024
e0d2b7c
merge upstream from Microsoft
Jun 26, 2024
a08b6cb
re-add the constexpr std::mutex STL workaround
Jun 26, 2024
5c04b77
Update SPIR-V Headers and Tools
AnastaZIuk Aug 13, 2024
bcedaf7
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler int…
AnastaZIuk Aug 13, 2024
7acfe6f
Update .gitmodules, to ssh submodule URLs
AnastaZIuk Sep 13, 2024
47c3d15
Update SPIR-V Headers and Tools
Nov 5, 2024
5adc27f
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler int…
Nov 5, 2024
8588665
build: ignore unused-function warning/error
alichraghi Nov 21, 2024
b8e1df1
Merge pull request #3 from Devsh-Graphics-Programming/ali_clang
alichraghi Nov 21, 2024
042b1b5
preprocessor tweak - use new Standard Conforming Preprocessor when bu…
AnastaZIuk Dec 19, 2024
c0e532f
Merge branch 'devshFixes' of github.com:Devsh-Graphics-Programming/Di…
AnastaZIuk Dec 19, 2024
8a281b7
pull upstream & resolve conflicts
AnastaZIuk Jan 9, 2025
5257df6
Merge pull request #4 from Devsh-Graphics-Programming/before_inout_break
devshgraphicsprogramming Feb 24, 2025
8614d1a
update SPIRV-Headers and SPIRV-Tools
Feb 24, 2025
d377e4e
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler int…
Feb 24, 2025
333bd2a
implement https://github.com/microsoft/DirectXShaderCompiler/issues/5675
Feb 24, 2025
66cb491
Update SPIR-V Headers and Tools
Mar 6, 2025
b2e7582
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler int…
Mar 6, 2025
96a5b5c
Make Event Tracing for Windows optional and allow to build dxcompiler…
AnastaZIuk Mar 28, 2025
49b89ae
Make dxcompiler target build with Clang 19.1.1 (ClangCL toolset, ship…
AnastaZIuk Apr 11, 2025
5ab4d36
resolve conflicts, pull upstream, update submodules
AnastaZIuk Apr 18, 2025
4621c70
Merge branch 'devshFixes' of github.com:Devsh-Graphics-Programming/Di…
AnastaZIuk Apr 18, 2025
3e9524a
Create main.yml, move from https://github.com/AnastaZIuk/DirectXShade…
AnastaZIuk Apr 22, 2025
6a4a188
Update main.yml, get rid of sanitizers from Clang-Release and turn of…
AnastaZIuk Apr 24, 2025
1088c23
Merge pull request #8 from Devsh-Graphics-Programming/etw-optional
AnastaZIuk Apr 25, 2025
2661dd0
Update CMakeLists.txt, /Zc:preprocessor only for CL not ClangCL
AnastaZIuk Apr 25, 2025
b92b7b6
Update main.yml, include PDB for both Release & Debug in the install …
AnastaZIuk May 5, 2025
71f2766
Merge pull request #7 from Devsh-Graphics-Programming/devshFixes_clan…
AnastaZIuk May 19, 2025
125a3ce
pull upstream resolve conflicts
AnastaZIuk Jul 24, 2025
7c15568
Update SPIR-V Headers and Tools
keptsecret Jul 31, 2025
36f5f6f
merge upstream from Microsoft
keptsecret Jul 31, 2025
6682612
update to latest upstream
keptsecret Jul 31, 2025
5f7a9e4
pull upstream, resolve conflicts
AnastaZIuk Sep 19, 2025
44f3ed7
fix baddie
AnastaZIuk Sep 19, 2025
dafad1d
exclude clang-foramt by default, turns out it doesn't work (or needs …
karimsayedre Nov 24, 2025
09edb1a
[SPIRV] Use desugared type when processing binary op
s-perron Nov 25, 2025
0bd2f04
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler int…
AnastaZIuk Nov 26, 2025
155f57a
Merge branch 'i7945' of github.com:s-perron/DirectXShaderCompiler int…
AnastaZIuk Nov 26, 2025
55dedd8
Add copying of dxc.exe to install directory
AnastaZIuk Nov 27, 2025
d0e3c4e
create unittests/Devsh/CMakeLists.txt & add unittests/Devsh/in/01-cpp…
AnastaZIuk Nov 27, 2025
0e5849d
add DevSH unit tests to CI
AnastaZIuk Nov 27, 2025
3e2dd30
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler
AnastaZIuk Nov 27, 2025
8be0439
update tools/clang/lib/SPIRV/DeclResultIdMapper.cpp, comment assert(f…
AnastaZIuk Nov 27, 2025
1e5414b
Merge branch 'main' of github.com:Devsh-Graphics-Programming/DirectXS…
AnastaZIuk Nov 27, 2025
0eb38c1
Add support for ulonglong and longlong types in const values handle
AnastaZIuk Dec 1, 2025
a8e8078
Update Release Notes
AnastaZIuk Dec 1, 2025
8d1ba8b
Add SPIR-V const-folding regression test for int64_t and uint64_t
AnastaZIuk Dec 1, 2025
ecd3f93
Modified the spv.constant-folding.template.int64.hlsl test
Przemog1 Dec 3, 2025
062a96b
Update clang-format-checker.yml
Przemog1 Dec 11, 2025
64eb5e6
Added option for disabling HLSL intrinsics
Przemog1 Dec 6, 2025
bf1e20a
CI: fetch format tools from fork
AnastaZIuk Dec 15, 2025
32a819e
Merge remote-tracking branch 'origin/devshFixes' into disable_hlsl_in…
AnastaZIuk Dec 15, 2025
826f1c0
CI: retrigger workflows
AnastaZIuk Dec 15, 2025
6860788
chore: autopublish 2025-12-15T21:36:31Z
github-actions[bot] Dec 15, 2025
620fcf4
CI: retrigger
AnastaZIuk Dec 15, 2025
26821e7
Merge pull request #12 from Devsh-Graphics-Programming/disable_hlsl_i…
AnastaZIuk Dec 15, 2025
ff2345c
Update SPIR-V Headers and Tools
Przemog1 Dec 20, 2025
d76c789
Resolved conflicts, merged microsoft/main
Przemog1 Dec 20, 2025
642ff68
Enabled type traits
Przemog1 Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/clang-format-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Fetch code formatting utils
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: microsoft/DirectXShaderCompiler
repository: ${{ github.repository }}
ref: ${{ github.base_ref }}
sparse-checkout: |
utils/git/requirements_formatting.txt
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- name: Fetch code formatting utils
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: microsoft/DirectXShaderCompiler
repository: ${{ github.repository }}
ref: ${{ github.base_ref }}
sparse-checkout: |
utils/git/requirements_formatting.txt
Expand Down
186 changes: 186 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
name: Devsh - Build & Deploy DXCompiler

on:
workflow_dispatch:
inputs:
COMMIT_SHA:
description: 'Commit SHA to build'
required: true

jobs:
windows:
name: Windows Build
runs-on: windows-2022
env:
HLSL_SRC_DIR: ${{ github.workspace }}
HLSL_BLD_DIR: "${{ github.workspace }}\\build"
platform: x64
os: windows-latest
COMMIT_SHA: ${{ github.event.inputs.COMMIT_SHA }}
strategy:
matrix:
configuration: [Release, Debug]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.COMMIT_SHA }}
clean: true
submodules: true

- name: Build
run: |
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
call utils\hct\hctbuild.cmd -${{ env.platform }} -${{ matrix.configuration }} -show-cmake-log -spirvtest
shell: cmd

- name: CMake Install DXCompiler
run: |
cmake --install build/include/dxc --prefix build/install --config ${{ matrix.configuration }}
cmake --install build/tools/clang/tools/dxcompiler --prefix build/install --config ${{ matrix.configuration }}
cmake -E copy build/${{ matrix.configuration }}/bin/dxcompiler.pdb build/install/lib/
cmake -E copy build/${{ matrix.configuration }}/bin/dxc.exe build/install/bin/
cmake -E copy include/dxc/WinAdapter.h build/install/include/dxc/
shell: cmd

- name: Archive Installed Directory
run: cmake -E tar czf ${{ github.event.inputs.COMMIT_SHA }}.tar.gz build/install
shell: cmd

- name: Upload Installed Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.os }}-${{ matrix.configuration }}-${{ github.event.inputs.COMMIT_SHA }}
path: ${{ github.event.inputs.COMMIT_SHA }}.tar.gz

nix:
name: Unix and macOS Build
strategy:
matrix:
include:
- os: ubuntu-latest
name: Linux_Clang_Release
configuration: Release
CC: clang-18
CXX: clang++-18
CMAKE_OPTS: "-DLLVM_ENABLE_WERROR=On -DLLVM_USE_LINKER=lld"
- os: ubuntu-latest
name: Linux_Clang_Debug
configuration: Debug
CC: clang
CXX: clang++
CMAKE_OPTS: "-DLLVM_ENABLE_WERROR=On -DLLVM_USE_LINKER=lld"
- os: macos-latest
name: MacOS_Clang_Release
configuration: Release
CC: clang
CXX: clang++
CMAKE_OPTS: "-DLLVM_ENABLE_WERROR=On"
- os: macos-latest
name: MacOS_Clang_Debug
configuration: Debug
CC: clang
CXX: clang++
CMAKE_OPTS: "-DLLVM_ENABLE_WERROR=On"
runs-on: ${{ matrix.os }}
env:
COMMIT_SHA: ${{ github.event.inputs.COMMIT_SHA }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.COMMIT_SHA }}
clean: true
submodules: true

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 18
sudo apt-get install -y libc++-18-dev
- name: Install dependencies on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew update
brew install ninja
ulimit -Sn 1024
- name: Configure with CMake
run: |
cmake -B build -G Ninja $GITHUB_WORKSPACE \
-DLLVM_LIT_ARGS="-v --xunit-xml-output=testresults.xunit.xml" \
-C $GITHUB_WORKSPACE/cmake/caches/PredefinedParams.cmake \
-DSPIRV_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=${{ matrix.configuration }} \
-DCMAKE_C_COMPILER=${{ matrix.CC }} \
-DCMAKE_CXX_COMPILER=${{ matrix.CXX }} \
${{ matrix.CMAKE_OPTS || '' }}
- name: Build
run: ninja -C build test-depends

- name: CMake Install DXCompiler
run: |
cmake --install build/include/dxc --prefix build/install --config ${{ matrix.configuration }}
cmake --install build/tools/clang/tools/dxcompiler --prefix build/install --config ${{ matrix.configuration }}
cmake -E copy include/dxc/WinAdapter.h build/install/include/dxc/
- name: Archive Installed Directory
run: cmake -E tar czf ${{ github.event.inputs.COMMIT_SHA }}.tar.gz build/install

- name: Upload Installed Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.configuration }}-${{ github.event.inputs.COMMIT_SHA }}
path: ${{ github.event.inputs.COMMIT_SHA }}.tar.gz

windows-tests:
name: Windows Devsh DXC smoke tests
needs: windows
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
env:
os: windows-latest
COMMIT_SHA: ${{ github.event.inputs.COMMIT_SHA }}

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.COMMIT_SHA }}
fetch-depth: 1
sparse-checkout: |
unittests

- name: Download DXCompiler artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.os }}-${{ matrix.configuration }}-${{ github.event.inputs.COMMIT_SHA }}
path: artifacts

- name: Unpack DXCompiler into unittests\Devsh\install
run: |
cmake -E tar xzf artifacts\${{ github.event.inputs.COMMIT_SHA }}.tar.gz
cmake -E make_directory unittests\Devsh\install
cmake -E copy_directory build\install unittests\Devsh\install
shell: cmd

- name: Configure Devsh unit tests
run: |
cmake -S unittests\Devsh -B unittests\Devsh\build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
shell: cmd

- name: Run Devsh DXC smoke tests
run: |
ctest -C ${{ matrix.configuration }} -VV -R dxc_smoke --output-on-failure
working-directory: unittests\Devsh\build
shell: cmd
16 changes: 8 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[submodule "external/SPIRV-Headers"]
path = external/SPIRV-Headers
url = https://github.com/KhronosGroup/SPIRV-Headers
[submodule "external/SPIRV-Tools"]
path = external/SPIRV-Tools
url = https://github.com/KhronosGroup/SPIRV-Tools
[submodule "external/googletest"]
path = external/googletest
url = https://github.com/google/googletest
url = git@github.com:google/googletest.git
[submodule "external/DirectX-Headers"]
path = external/DirectX-Headers
url = https://github.com/microsoft/DirectX-Headers.git
url = git@github.com:microsoft/DirectX-Headers.git
[submodule "external/SPIRV-Tools"]
path = external/SPIRV-Tools
url = git@github.com:Devsh-Graphics-Programming/SPIRV-Tools.git
[submodule "external/SPIRV-Headers"]
path = external/SPIRV-Headers
url = git@github.com:Devsh-Graphics-Programming/SPIRV-Headers.git
38 changes: 37 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# See docs/CMake.html for instructions about how to build LLVM with CMake.
cmake_minimum_required(VERSION 3.17.2) # HLSL Change - Require CMake 3.17.2.


cmake_minimum_required(VERSION 3.17.2) # HLSL Change - Require CMake 3.17.2.
cmake_policy(SET CMP0091 NEW)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Expand Down Expand Up @@ -98,11 +100,26 @@ mark_as_advanced(DXC_DISABLE_ALLOCATOR_OVERRIDES)
option(DXC_CODEGEN_EXCEPTIONS_TRAP "An exception in code generation generates a trap, ending the compiler process" OFF)
mark_as_advanced(DXC_CODEGEN_EXCEPTIONS_TRAP)

option(DXC_ENABLE_ETW "Compile with ETW Tracing" ON)
mark_as_advanced(DXC_ENABLE_ETW)

if(DXC_ENABLE_ETW)
add_compile_definitions(DXC_ENABLE_ETW)
endif()

# adjust link option to enable debugging from kernel mode; not compatible with incremental linking
if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND MSVC AND NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64EC")
add_link_options(/DEBUGTYPE:CV,FIXUP,PDATA /INCREMENTAL:NO)
endif()

if(MSVC)
# use new Standard Conforming Preprocessor
# https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview?view=msvc-170
if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_options(/Zc:preprocessor)
endif()
endif()

# enable control flow guard
if(WIN32)
if(MSVC)
Expand All @@ -111,6 +128,7 @@ if(WIN32)
else()
add_compile_options(-fcf-protection)
endif()
add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
endif(WIN32)

# Enable CET Shadow Stack
Expand Down Expand Up @@ -644,6 +662,7 @@ endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
# use export_executable_symbols(target).
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")


# enable warnings as errors for debug build
if (MSVC)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /WX")
Expand Down Expand Up @@ -833,3 +852,20 @@ endif (HLSL_OFFICIAL_BUILD)
if (NOT "${DXC_CMAKE_ENDS_INCLUDE}" STREQUAL "")
include(${DXC_CMAKE_ENDS_INCLUDE})
endif()

set(NBL_DXC_DEBUG
"string(APPEND NBL_DXC_DEBUG_INCLUDE_DIRECTORIES \"$<TARGET_PROPERTY:dxcompiler,INCLUDE_DIRECTORIES>\")\n\
set(NBL_DXC_DEBUG_DLL \"$<TARGET_FILE:dxcompiler>\")\n\
set(NBL_DXC_DEBUG_LIB \"$<TARGET_LINKER_FILE:dxcompiler>;$<TARGET_LINKER_FILE:LLVMSupport>\")"
)

file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/nbl/generate/dxc/config/debug.cmake" CONTENT "${NBL_DXC_DEBUG}" CONDITION $<CONFIG:Debug>)

set(NBL_DXC_RELEASE
"string(APPEND NBL_DXC_RELEASE_INCLUDE_DIRECTORIES \"$<TARGET_PROPERTY:dxcompiler,INCLUDE_DIRECTORIES>\")\n\
set(NBL_DXC_RELEASE_DLL \"$<TARGET_FILE:dxcompiler>\")\n\
set(NBL_DXC_RELEASE_LIB \"$<TARGET_LINKER_FILE:dxcompiler>;$<TARGET_LINKER_FILE:LLVMSupport>\")"
)

file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/nbl/generate/dxc/config/release.cmake" CONTENT "${NBL_DXC_RELEASE}" CONDITION $<CONFIG:Release>)

Loading
Loading