Skip to content

Commit ba09ba7

Browse files
merge upstream from Microsoft && Update SPIR-V Headers and Tools
2 parents 79bf3aa + 22bb078 commit ba09ba7

File tree

311 files changed

+14119
-2639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

311 files changed

+14119
-2639
lines changed

.github/workflows/clang-format-checker.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
code_formatter:
1010
if: github.event_name == 'pull_request_target'
1111
runs-on: ubuntu-latest
12-
permissions:
13-
pull-requests: write
12+
permissions:
13+
pull-requests: write
1414
steps:
1515
- name: Fetch LLVM sources
1616
uses: actions/checkout@v4
@@ -19,13 +19,14 @@ jobs:
1919

2020
- name: Get changed files
2121
id: changed-files
22-
uses: tj-actions/changed-files@v39
22+
uses: tj-actions/changed-files@v41
2323
with:
2424
separator: ","
2525
fetch_depth: 100 # Fetches only the last 10 commits
2626

2727
- name: "Listed files"
28-
env: LISTED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
28+
env:
29+
LISTED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
2930
run: |
3031
echo "Formatting files:"
3132
echo "$LISTED_FILES"

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
# DirectX Shader Compiler
22

3-
[![Build status](https://ci.appveyor.com/api/projects/status/6sx47j66g4dbyem9/branch/main?svg=true)](https://ci.appveyor.com/project/dnovillo/directxshadercompiler/branch/main)
4-
53
The DirectX Shader Compiler project includes a compiler and related tools used to compile High-Level Shader Language (HLSL) programs into DirectX Intermediate Language (DXIL) representation. Applications that make use of DirectX for graphics, games, and computation can use it to generate shader programs.
64

75
For more information, see the [Wiki](https://github.com/microsoft/DirectXShaderCompiler/wiki).
86

97
Visit the [DirectX Landing Page](https://devblogs.microsoft.com/directx/landing-page/) for more resources for DirectX developers.
108

11-
## Downloads
12-
You can download the latest successful build's artifacts (built by Appveyor) for the main branch:
13-
| Downloads | |
14-
|-----------|--------|
15-
| Windows | [](https://ci.appveyor.com/api/projects/dnovillo/directxshadercompiler/artifacts/build%2FRelease%2Fdxc-artifacts.zip?branch=main&pr=false&job=image%3A%20Visual%20Studio%202022) |
16-
| Ubuntu | [](https://ci.appveyor.com/api/projects/dnovillo/directxshadercompiler/artifacts/build%2Fdxc-artifacts.tar.gz?branch=main&pr=false&job=image%3A%20Ubuntu) |
17-
189
## Features and Goals
1910

2011
The starting point of the project is a fork of the [LLVM](http://llvm.org/) and [Clang](http://clang.llvm.org/) projects, modified to accept HLSL and emit a validated container that can be consumed by GPU drivers.
@@ -35,7 +26,7 @@ The goal of the project is to allow the broader community of shader developers t
3526

3627
### Pre-built Releases
3728

38-
Binary packages containing the output of this project are available from appveyor. Development kits containing only the dxc.exe driver app, the dxcompiler.dll, and the dxil.dll signing binary are available [here](https://github.com/microsoft/DirectXShaderCompiler/wiki/Releases), or in the [releases tab](https://github.com/microsoft/DirectXShaderCompiler/releases).
29+
Development kits containing only the dxc.exe driver app, the dxcompiler.dll, and the dxil.dll signing binary are available [here](https://github.com/microsoft/DirectXShaderCompiler/wiki/Releases), or in the [releases tab](https://github.com/microsoft/DirectXShaderCompiler/releases).
3930

4031
### SPIR-V CodeGen
4132

appveyor.yml

Lines changed: 0 additions & 75 deletions
This file was deleted.

cmake/modules/HCT.cmake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,15 @@ function(add_hlsl_hctgen mode)
117117
COMMENT "Updating ${ARG_OUTPUT}..."
118118
)
119119
endif()
120-
add_custom_target(${mode} ${verification} DEPENDS ${output})
120+
121+
add_custom_command(OUTPUT ${temp_output}.stamp
122+
COMMAND ${verification}
123+
COMMAND ${CMAKE_COMMAND} -E touch ${temp_output}.stamp
124+
DEPENDS ${output}
125+
COMMENT "Verifying clang-format results...")
126+
127+
add_custom_target(${mode}
128+
DEPENDS ${temp_output}.stamp)
129+
121130
add_dependencies(HCTGen ${mode})
122131
endfunction()

docs/DXIL.rst

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,8 +1411,8 @@ Texture1DArray 2 (c0, c1 = array slice) 1 (o0)
14111411
Texture2D 2 (c0, c1) 2 (o0, o1)
14121412
Texture2DArray 3 (c0, c1, c2 = array slice) 2 (o0, o1)
14131413
Texture3D 3 (c0, c1, c2) 3 (o0, o1, o2)
1414-
TextureCUBE 3 (c0, c1, c2) 3 (o0, o1, o2)
1415-
TextureCUBEArray 4 (c0, c1, c2, c3 = array slice) 3 (o0, o1, o2)
1414+
TextureCUBE 3 (c0, c1, c2) 0
1415+
TextureCUBEArray 4 (c0, c1, c2, c3 = array slice) 0
14161416
=================== ================================ ===================
14171417

14181418
SampleBias
@@ -1435,7 +1435,7 @@ The following signature shows the operation syntax::
14351435
float, ; bias: in [-16.f,15.99f]
14361436
float) ; clamp
14371437

1438-
Valid resource types and active components/offsets are the same as for the sample operation.
1438+
Valid resource types and active coordinates/offsets are the same as for the sample operation.
14391439

14401440
SampleLevel
14411441
~~~~~~~~~~~
@@ -1456,7 +1456,7 @@ The following signature shows the operation syntax::
14561456
i32, ; offset o2
14571457
float) ; LOD
14581458

1459-
Valid resource types and active components/offsets are the same as for the sample operation.
1459+
Valid resource types and active coordinates/offsets are the same as for the sample operation.
14601460

14611461
SampleGrad
14621462
~~~~~~~~~~
@@ -1483,7 +1483,17 @@ The following signature shows the operation syntax::
14831483
float, ; ddy2
14841484
float) ; clamp
14851485

1486-
Valid resource types and active components and offsets are the same as for the sample operation. Valid active ddx and ddy are the same as offsets.
1486+
=================== ================================ =================== ====================================
1487+
Valid resource type # of active coordinates # of active offsets # of active gradients
1488+
=================== ================================ =================== ====================================
1489+
Texture1D 1 (c0) 1 (o0) 1 (ddx0/ddy0)
1490+
Texture1DArray 2 (c0, c1 = array slice) 1 (o0) 1 (ddx0/ddy0)
1491+
Texture2D 2 (c0, c1) 2 (o0, o1) 2 (ddx0/ddy0, ddx1/ddy1)
1492+
Texture2DArray 3 (c0, c1, c2 = array slice) 2 (o0, o1) 2 (ddx0/ddy0, ddx1/ddy1)
1493+
Texture3D 3 (c0, c1, c2) 3 (o0, o1, o2) 3 (ddx0/ddy0, ddx1/ddy1, ddx2,ddy2)
1494+
TextureCUBE 3 (c0, c1, c2) 0 3 (ddx0/ddy0, ddx1/ddy1, ddx2,ddy2)
1495+
TextureCUBEArray 4 (c0, c1, c2, c3 = array slice) 0 3 (ddx0/ddy0, ddx1/ddy1, ddx2,ddy2)
1496+
=================== ================================ =================== ====================================
14871497

14881498
SampleCmp
14891499
~~~~~~~~~
@@ -1512,8 +1522,8 @@ Texture1D 1 (c0) 1 (o0)
15121522
Texture1DArray 2 (c0, c1 = array slice) 1 (o0)
15131523
Texture2D 2 (c0, c1) 2 (o0, o1)
15141524
Texture2DArray 3 (c0, c1, c2 = array slice) 2 (o0, o1)
1515-
TextureCUBE 3 (c0, c1, c2) 3 (o0, o1, o2)
1516-
TextureCUBEArray 4 (c0, c1, c2, c3 = array slice) 3 (o0, o1, o2)
1525+
TextureCUBE 3 (c0, c1, c2) 0
1526+
TextureCUBEArray 4 (c0, c1, c2, c3 = array slice) 0
15171527
=================== ================================ ===================
15181528

15191529
SampleCmpLevelZero
@@ -1535,7 +1545,7 @@ The following signature shows the operation syntax::
15351545
i32, ; offset o2
15361546
float) ; compare value
15371547

1538-
Valid resource types and active components/offsets are the same as for the sampleCmp operation.
1548+
Valid resource types and active coordinates/offsets are the same as for the sampleCmp operation.
15391549

15401550
TextureLoad
15411551
~~~~~~~~~~~
@@ -1679,7 +1689,7 @@ The following signature shows the operation syntax::
16791689
i32, ; channel, constant in {0=red,1=green,2=blue,3=alpha}
16801690
float) ; compare value
16811691

1682-
Valid resource types and active components/offsets are the same as for the textureGather operation.
1692+
Valid resource types and active coordinates/offsets are the same as for the textureGather operation.
16831693

16841694
Texture2DMSGetSamplePosition
16851695
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -3053,6 +3063,7 @@ INSTR.BARRIERMODEFORNONCS sync in a non-Compute/Amplification/Me
30533063
INSTR.BARRIERMODENOMEMORY sync must include some form of memory barrier - _u (UAV) and/or _g (Thread Group Shared Memory). Only _t (thread group sync) is optional.
30543064
INSTR.BARRIERMODEUSELESSUGROUP sync can't specify both _ugroup and _uglobal. If both are needed, just specify _uglobal.
30553065
INSTR.BARRIERNONCONSTANTFLAGARGUMENT Memory type, access, or sync flag is not constant
3066+
INSTR.BARRIERREQUIRESNODE sync in a non-Node Shader must not sync node record memory.
30563067
INSTR.BUFFERUPDATECOUNTERONRESHASCOUNTER BufferUpdateCounter valid only when HasCounter is true.
30573068
INSTR.BUFFERUPDATECOUNTERONUAV BufferUpdateCounter valid only on UAV.
30583069
INSTR.CALLOLOAD Call to DXIL intrinsic must match overload signature
@@ -3069,6 +3080,8 @@ INSTR.EVALINTERPOLATIONMODE Interpolation mode on %0 used with eva
30693080
INSTR.EXTRACTVALUE ExtractValue should only be used on dxil struct types and cmpxchg.
30703081
INSTR.FAILTORESLOVETGSMPOINTER TGSM pointers must originate from an unambiguous TGSM global variable.
30713082
INSTR.HANDLENOTFROMCREATEHANDLE Resource handle should returned by createHandle.
3083+
INSTR.ILLEGALDXILOPCODE DXILOpCode must be [0..%0]. %1 specified.
3084+
INSTR.ILLEGALDXILOPFUNCTION '%0' is not a DXILOpFuncition for DXILOpcode '%1'.
30723085
INSTR.IMMBIASFORSAMPLEB bias amount for sample_b must be in the range [%0,%1], but %2 was specified as an immediate.
30733086
INSTR.INBOUNDSACCESS Access to out-of-bounds memory is disallowed.
30743087
INSTR.MINPRECISIONNOTPRECISE Instructions marked precise may not refer to minprecision values.
@@ -3124,6 +3137,7 @@ INSTR.SAMPLERMODEFORSAMPLEC sample_c_*/gather_c instructions requi
31243137
INSTR.SIGNATUREOPERATIONNOTINENTRY Dxil operation for input output signature must be in entryPoints.
31253138
INSTR.STATUS Resource status should only be used by CheckAccessFullyMapped.
31263139
INSTR.STRUCTBITCAST Bitcast on struct types is not allowed.
3140+
INSTR.SVCONFLICTINGLAUNCHMODE Input system values are compatible with node shader launch mode.
31273141
INSTR.TEXTUREOFFSET offset texture instructions must take offset which can resolve to integer literal in the range -8 to 7.
31283142
INSTR.TGSMRACECOND Race condition writing to shared memory detected, consider making this write conditional.
31293143
INSTR.UNDEFINEDVALUEFORUAVSTORE Assignment of undefined values to UAV.
@@ -3251,8 +3265,18 @@ SM.TRIOUTPUTPRIMITIVEMISMATCH Hull Shader declared with Tri Domain m
32513265
SM.UNDEFINEDOUTPUT Not all elements of output %0 were written.
32523266
SM.VALIDDOMAIN Invalid Tessellator Domain specified. Must be isoline, tri or quad.
32533267
SM.VIEWIDNEEDSSLOT ViewID requires compatible space in pixel shader input signature
3254-
SM.WAVESIZENEEDSDXIL16PLUS WaveSize is valid only for DXIL version 1.6 and higher.
3255-
SM.WAVESIZEVALUE Declared WaveSize %0 outside valid range [%1..%2], or not a power of 2.
3268+
SM.WAVESIZEALLZEROWHENUNDEFINED WaveSize Max and Preferred must be 0 when Min is 0
3269+
SM.WAVESIZEEXPECTSONEPARAM WaveSize tag expects exactly 1 parameter.
3270+
SM.WAVESIZEMAXANDPREFERREDZEROWHENNORANGE WaveSize Max and Preferred must be 0 to encode min==max
3271+
SM.WAVESIZEMAXGREATERTHANMIN WaveSize Max must greater than Min
3272+
SM.WAVESIZENEEDSCONSTANTOPERANDS WaveSize metadata operands must be constant values.
3273+
SM.WAVESIZENEEDSSM66OR67 WaveSize is valid only for Shader Model 6.6 and 6.7.
3274+
SM.WAVESIZEONCOMPUTEORNODE WaveSize only allowed on compute or node shaders
3275+
SM.WAVESIZEPREFERREDINRANGE WaveSize Preferred must be within Min..Max range
3276+
SM.WAVESIZERANGEEXPECTSTHREEPARAMS WaveSize Range tag expects exactly 3 parameters.
3277+
SM.WAVESIZERANGENEEDSSM68PLUS WaveSize Range is valid only for Shader Model 6.8 and higher.
3278+
SM.WAVESIZETAGDUPLICATE WaveSize or WaveSizeRange tag may only appear once per entry point.
3279+
SM.WAVESIZEVALUE WaveSize value must be a power of 2 in range [4..128]
32563280
SM.ZEROHSINPUTCONTROLPOINTWITHINPUT When HS input control point count is 0, no input signature should exist.
32573281
TYPES.DEFINED Type must be defined based on DXIL primitives
32583282
TYPES.I8 I8 can only be used as immediate value for intrinsic or as i8* via bitcast by lifetime intrinsics.

0 commit comments

Comments
 (0)