This commit adds a new pass that will transform all the storeOutput
instructions in the program. For each element in the output
signature we create an alloca to hold writes to the output.
We rewrite each storeOutput to store to the alloca'd location
instead. Then at each function return point we store to
each element in the output signature by reading the latest
value from the alloca'd location.
The above transformation provides the following properties
for outputs after it is run.
1. Remove all dynamic indexing on output writes
2. Remove multiple writes to same output location
3. Ensure all output locations in the signature are written
This commit updates the `IsPrecise` helper to also check for the fast math
flags on an instruction. Now, the function will return the correct value
for any instruction. Before it only worked for intrinsic calls.
We also added three helpers for working with fast math flags.
We provide getters and setters for precise fast math flags and
a helper to say if fast math flags are preserved through serialization
and deserialization.
Finally, we added a unit test for DxilModule that we can use to ensure
that the `IsPrecise` helper returns the correct value.
We can now expand the following intrinsics:
Acos
Asin
Atan
Hcos
Hsin
Htan
The expansion uses the same approximation algorithms used by the d3d compiler.
GoogleTest will be used for unit testing and codegen testing for
SPIR-V.
* Added SPIRV_BUILD_TESTS option in CMake to control building
of SPIR-V tests.
* Added "-spirvtest" into hctbuild to enable it.
* Added "spirv" and "spirv_only" targets for hcttest.
Running `hcttest spirv` will run ALL tests including SPIRV tests.
Running `hcttest spirv_only` will ONLY run SPIRV tests.
The default behavior of hctbuild and hcttest is not changed.
- bFinalStage indicates a non-PS stage is the final one and validation should be performed on direct outputs, rather than waiting for the next stage to merge outputs with inputs.
- Extra validation for PSV
- Treat tessfactors as dynamically indexed to prevent breaking them up
This change is to support enum types in HLSL 2017. Enum/enum class with fixed underlying type to match C+11 standard. Enum should only be enabled with -HV 2017 option on dxc.
1. Don't require entry function for flattenGlobal.
2. Don't check bForParam for flattenArgument.
3. Don't clone and remove return when replace return value with alloca.
- Update PSV data for GS multi stream out and other improvements
- Add ViewIDPipelineValidation.inl
- Refactor DxilSigPoint to .inl for easy external use
- Add Barycentrics feature flag
* Change to DxilProgramSigSemantic::Barycentrics for runtime alignment
* Integrate os change e4aba062897e
- fix in Hashing.h for thread unsafe static
* Change to DxilProgramSigSemantic::Barycentrics for runtime alignment
* Disable ViewID Debug output and initialize ViewID feature flag
* Clean up some CMakeLists.txt lib changes
This change adds execution tests for three wave intrinsics: WavePrefixCountBits, WavePrefixSum, and WavePrefixProduct. Like other wave intrinsics tests, these are not set to default hcttests yet.
1. Generate memcpy in EmitHLSLFlatConversionAggregateCopy if type is match.
2. If value is used as Src of memcpy, mark load instead of store.
3. Do not do replace on GEP and bitcast.
4. Delete inst instead of push into DeadInsts when safe.
This will prevent same inst added into DeadInsts more than once.
* Fix validation tests by removing viewIdState metadata
* ValidationTest: Enable optional replacement for viewIdState removal.
- Optional replacement is required to work around ViewIdState mismatches in ValidationTest, as it may not be present (when 1.0 validator is used).
* Make validator version a first-class citizen of DxilModule
* Add validator version checks to DxilContainerAssembler
- eliminates need to check validator version in dxcompilerobj.cpp
* Copy dynamic index mask and ViewID state to PSV data
- Make const version of DxilViewIDState::GetSerialized() that just returns serialized state
* 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