* Update PSV with ViewID data structures
* Update PSV with signature element data and gate PSV1 on SM 6.1
* Unwrap array on primitive when assigning semantic indexes
- fix semantic index assignment for matrix and primitives
- fix some tests
- disable two tests due to AssembleToContainer fail:
ValidationTest::SigOutOfRangeFail
ValidationTest::SimpleGs1Fail
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. Add ResourceToHandle pass to lower resource to handle.
2. Don't performPromotion in SROA_HLSL.
3. Add Option support for DynamicIndexingVectorToArray.
4. Fix bug in GetPassOption.
5. Replace GEP ptr, 0 with ptr in DynamicIndexingVectorToArray::ReplaceStaticIndexingOnVector.
6. Run mem2reg before DxilGenerationPass.
7.Legalize EvalOperations before change vector to array.
* [spirv] Add libclangSPIRV and skeleton FrontendAction for SPIR-V
* [spirv] Add -spirv into dxc for invoking EmitSPIRVAction
* [spirv] Build SPIR-V codegen conditionally
Added ENABLE_SPIRV_CODEGEN in CMake config to control the
building of SPIR-V component and wrap up SPIR-V code using it.
Also add -spirv to hctbuild to turn it on.
Currently the compiler crashes when we pass in matrix or vectors with reduced dimension from the original signature element for EvalAttribute functions. This change resolves this issue by replacing allocas before we translate these function calls from DXIR to DXIL and find LoadInputs to replace correctly.
Make DxcCreateInstance load validator from dxil.dll when available
Add DxcVersionInfoFlags_Internal flag to indicate internal validator
Add DxcValidatorFlags_ModuleOnly to indicate absense of full container for validation, requiring explicit use. This will not succeed when using dxil.dll validator.
Bump Validator version
Implement IDxcVersionInfo in DxcCompiler to indicate DXIL highest version supported and debug flag for compiler separately from validator
Refactor version detection code for tests, adding dxil and validator versions
Make SystemValueTest version aware
Add version check to AttributeAtVertex and SV_Barycentrics tests.
Fix line endings for HlslTestUtils.h
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
1. Try to propagate if the pointer is only write once by the memcpy.
2. Use correct size for memcpy created in AppendBuffer::Append.
3. Ignore unused Constant user of Matrix value.
4. Replace Constant with Inst on the Instruction version of Constant.
5. When match size of memcpy, go deeper if struct only has 1 element.
Doing this will leave memcpy be lowered at deeper level.
6. Do not replace when SimplePtrCopy, cannot decide replace is safe or not.
- 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
1. Keep major for matrix pointers.
2. Change matrix values to row major to match hlsl.
Only ColMatLoad, RowMatrixToColMatrix and col matrix value parameter for entry function are col major matrix value.
And should only used by ColMatStore and ColMatrixToRowMatrix.
This change adds execution unit tests for WaveActiveOp intrinsics.
For wave operations, there is no guarantee of how many lanes exist in a given wave. The test therefore has to manually compute the expected output by identifying different waves in shaders and group lanes by the waves they belong to. This can be done by providing different id's for each structured resource and call WaveReadLaneFirst() on each shader, and mimic what wave intrinsics to compute expected results.
Right now the test will not run on a default mode on hcttest because of known issue for WARP driver with handling flow control in compute shader. As soon as this is fixed we should enable this test by setting the priority of the test to 0.
This change also includes other fixes in ExecutionTests including
1)Have TableParameterHandler to read data driven table parameters and 2) fixing typos
1. Add resource attribute to FieldAnnotation.
2. Find resource arribute from Argument in FindCreateHandleResourceBase.
3. Remove limitation handle must be instruction.
4. Add HandleToResCast to help lower resource parameter to handle parameter.
1. Remove debug info when strip function parameter from entry function.
2. Set OptLevel to 0 for -Od.
3. If optimization is disabled, always load ReturnValue.
* Disable tests requiring name preservation on release builds.
* Fix reversal of DxcVersionInfoFlags_Debug
* Enable parallel execution for unit tests
* Add -verbose to preserve logging and remove /parallel
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