Previously for an entry function, we decompose its parameters and
return value and create stage input/output/builtin variables from
them directly. This is fine for simple shaders, but it will have
problems for shaders using structs to group stage variables.
Accessing paramters and return values (using operator. and return)
needs special handling for entry functions, which is nasty.
With the wrapper function, we can handle entry functions just like
normal functions. Stage variable handling are all done in the
wrapper funtion.
Also added the translation for `loop` and `unroll` attributes.
Similar to for loops, the current implementation does not support
early exits, or early returns.
* [spirv] Translate vector truncation and splatting
* Also added tests for vector<|type|, |count|> format.
* [spirv] Remove duplicated vector splatting tests
Although they appear as binary operator tests, they are essentially
testing vector splatting, which we already have dedicated tests.
The translation supports dot product of vectors of floats using
SPIR-V's OpDot.
The translation also supports dot product of vectros of integers
using multiplication and addition.
* [spirv] Translate vector types and handle variable initializers
* Translated vector types and operations on vector types
* +, -, *, /, % on vector <op> vector and vector <op> scalar
* Prefix increment on vectors
* < on vector <op> vector and vector <op> scalar
* Covered both constant initializer and variable initializer
* Applied constant modifier to variables
* [spirv] Translate all comparision operators
* Covers <, <=, >, >=, ==, !=
* For both scalars and vectors
* Also update docs about arithmetic and comparison operators
This change is to support preserve denorm operations. We do this by creating dxc options and propagate them all the way to dxil metadata so that drivers can see how it should handle floats.
Currently we support three modes: any(default), preserve, and ftz
Denorm option will be of per function flag. We store this information at function annotation metadata. This means that for DXIL 1.2 we have a new structure for function annotation. The change in structure is documented on DXIL.rst
unlike other system value semantics, pixel shader is allowed to declare at most two input attributes with SV_Barycentrics, with one declaration uses perspective interpolation type while other one uses noperspective interpolation type.
* Add documentation with source-level debugging with HLSL and DXIL.
* Fix trailing underscore in generate .rst documentation.
* Add container support for debug name part.
* Bump validator version to 1.1.
* Implement debug stripping in dxc, including /Fd dir-named behavior.
* Implement IDxcCompiler2 and CompileWithDebug.
1. Adding SV_Barycentric and removing barycentric intrinsics/dxilops
2. GetAttributeAtVertex only thakes no_interpolation attribute
3. SV_Barycentric can take any interpolation modifier except nointerpolation
4. SV_Barycentric can only have float3 type
- Add SV_ViewID loaded from intrinsic in Dxil,
for input to all graphics shader stages
- hctdb: rename shader_models to shader_stages,
add shader_model for min required shader model
- Validator: validate dxil version required for shader model
- DxilModule: Add GetDxilVersion
- Set Barycentric intrinsics to SM 6.1
- Update SystemValueTest for SM 6.1
This change is the initial step to support Barycentric coordinates for shader model 6.1 / DXIL 1.1
- Add GetBarycentrics, GetAttributeAtVertex intrinsics and their corresponding dxil ops
- Lowering intrinsics to dxil ops
- Adding codegen tests for these operations
This change is to add another execution test case for partial derivative operations specific to pixel shaders.
The way we did this is by passing in the texture resource to the shader and taking the partial derivatives of these texture values.
Test is assuming the arithmetic precision of 1 ulp for derivative operations.
This change also has some changes on existing execution test
- enable passing in Texture2D resource type as a default heap
- reading primitive topology from XML file
- clean up data driven tests: use DirectX Math structures and removing unused structures
This change is to add execution tests for individual DXIL arithmetic operations.
Using TAEF's data-driven model to group operations by the type/number of operands for each instructions. (unary/binary operators for float/int/uint types)
Updating DXIL.rst for these instructions.
Update hctdb.py to enable internal links for DXIL instructions.
- Implement and centralize container validation components in DxilValidation
- Strip RootSignature from module metadata before serializing to container
- Use existing DxilModule when serializing rather than constructing new one
- Add DxilModule::TryGetDxilModule for capturing diagnostics on metadata load
- Expose DxilPartWriters/DxilContainerWriter for use elsewhere (such as in validation)
Fix#30: Revert license text in banner comments to original llvm verbage
This commit removes the Microsoft-specific copyright in llvm files
and reverts the copyright wording to the original llvm wording.
We used the following method to find the files to change:
1. Find all files in DirectXShaderCompiler that are also in llvm 3.7
2. For those files that have the Microsoft-specific copyright, revert
it to the original llvm copyright as present in llvm 3.7
3. Revert the copyright in a few files that are not in llvm, but are
mostly copies of files in llvm:
lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp
lib\Transforms\Scalar\Reg2MemHLSL.cpp
Leave the Microsoft-specific copyright header in files not present
in stock llvm:
include\dxc\*
lib\HLSL\*
lib\DxcSupport\*
tools\clang\test\HLSL\*
tools\clang\test\CodeGenHLSL\*
tools\clang\unittests\HLSL\*
tools\clang\unittests\HLSLHost\*
tools\clang\tools\dxcompiler\*
tools\clang\tools\dxa\*
tools\clang\tools\dxc\*
tools\clang\tools\dxopt\*
tools\clang\tools\dxr\*
tools\clang\tools\dxv\*
tools\clang\tools\dotnetc\*
utils\hct\*
CONTRIBUTING.md
COPYRIGHT
LICENSE-MIT
README.md
cmake\modules\FindD3D12.cmake
cmake\modules\FindDiaSDK.cmake
cmake\modules\FindTAEF.cmake
docs\DXIL.rst
docs\HLSLChanges.rst
docs\_themes\dxc-theme\layout.html
docs\_themes\dxc-theme\theme.conf
docs\_themes\dxc-theme\static\dxc-theme.css
include\llvm\llvm_assert\assert.h
include\llvm\llvm_assert\cassert
include\llvm\Support\MSFileSystem.h
include\llvm\Support\OacrIgnoreCond.h
lib\MSSupport\CMakeLists.txt
lib\MSSupport\MSFileSystemImpl.cpp
lib\Support\assert.cpp
lib\Support\MSFileSystemBasic.cpp
lib\Support\Windows\MSFileSystem.inc.cpp
lib\Transforms\Scalar\Reg2MemHLSL.cpp
lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp
tools\clang\docs\UsingDxc.rst
tools\clang\include\clang\AST\HlslTypes.h
tools\clang\include\clang\Basic\BuiltinsDXIL.def
tools\clang\include\clang\Basic\LangOptions.fixed.def
tools\clang\include\clang\Parse\ParseHLSL.h
tools\clang\include\clang\Sema\SemaHLSL.h
tools\clang\lib\AST\ASTContextHLSL.cpp
tools\clang\lib\AST\HlslTypes.cpp
tools\clang\lib\CodeGen\CGHLSLMS.cpp
tools\clang\lib\CodeGen\CGHLSLRuntime.cpp
tools\clang\lib\CodeGen\CGHLSLRuntime.h
tools\clang\lib\Frontend\Rewrite\FrontendActions_rewrite.cpp
tools\clang\lib\Parse\HLSLRootSignature.cpp
tools\clang\lib\Parse\HLSLRootSignature.h
tools\clang\lib\Parse\ParseHLSL.cpp
tools\clang\lib\Sema\gen_intrin_main_tables_15.h
tools\clang\lib\Sema\SemaHLSL.cpp
tools\clang\tools\d3dcomp\CMakeLists.txt
tools\clang\tools\d3dcomp\d3dcomp.cpp
tools\clang\tools\d3dcomp\d3dcomp.def
tools\clang\tools\libclang\dxcisenseimpl.cpp
tools\clang\tools\libclang\dxcisenseimpl.h
tools\clang\tools\libclang\dxcrewriteunused.cpp
tools\clang\tools\libclang\libclang.rc
tools\dxexp\CMakeLists.txt
tools\dxexp\dxexp.cpp
tools\dxexp\LLVMBuild.txt
- Add DxilSignatureAllocator for signature packing
- Fix signature validation. Add more validation.
- Fix and add validation tests.
- Fix codegen for inout params with SV like SV_Coverage
- fix m_SemanticStartIndex on DxilSignatureElement::Initialize
- fix DxilSignatureElement::GetColsAsMask for start col == 2
- Add diags for signature allocation failures
- Use Regex in ValidationTest