Граф коммитов

1185 Коммитов

Автор SHA1 Сообщение Дата
Xiang Li 1d0da57987 Make sure no short circuiting. (#336) 2017-05-30 16:06:36 -07:00
Xiang Li 338da2aab4 Support memcpy to self. (#337) 2017-05-30 13:27:44 -07:00
David Peixotto 0ea6620342 Add pass to preserve all outputs (#326)
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
2017-05-30 09:41:54 -07:00
David Peixotto 2afe446dae Update helpers for working with precise (#333)
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.
2017-05-26 12:08:13 -07:00
yurido1 ff050a9f18 Update DXIL.rst 2017-05-24 16:22:46 -07:00
Marcelo Lopez Ruiz 4f4315cb6e Trim build instructions and link to Wiki 2017-05-24 16:21:13 -07:00
yurido1 9bb44240f7 Update DXIL.rst 2017-05-23 17:21:39 -07:00
Xiang Li 29bc498300 Remove metadata for Validation_1_0. (#330) 2017-05-23 17:06:31 -07:00
David Peixotto 99470ad061 Make precise helper function take const pointer (#329) 2017-05-23 13:09:04 -07:00
David Peixotto 489147d88c Add support for expanding trig intrinsics (#325)
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.
2017-05-23 08:15:59 -07:00
Marcelo Lopez Ruiz 4b834beaf9 Add support for external libraries to dxopt. (#324)
Adds support for external and external-fn arguments.
Adds support for a pf file with the pass configuration.
2017-05-22 21:21:23 -07:00
David Peixotto 16a3f0a881 Add helper functions for working with precise (#323)
- Get/Set precise on in instruction in DxilMDHelper
    - Get precise based on instruction/global flags in DxilModule
2017-05-22 17:16:44 -07:00
Lei Zhang 3c6537a7d5 [spirv] Add GoogleTest as an external dependency (#285)
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.
2017-05-22 12:02:23 -07:00
Marcelo Lopez Ruiz 9da0b2afbf Add support for external libraries to dndxc. (#317) 2017-05-22 11:45:57 -07:00
David Peixotto ab643b8345 Add getters for all ShaderFlags properties (#322) 2017-05-22 11:18:00 -07:00
Tex Riddell ec827b29a0 Add bFinalStage to ViewIDPipelineValidation (#320)
- 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
2017-05-19 18:55:17 -07:00
Tex Riddell b4fa7bc4cc Convert DoBasicQueryInterface* functions to single variadic template (#304) 2017-05-19 18:52:52 -07:00
Tex Riddell 27e4938ba0 Skip enum and ViewID 6.1 tests on validator 1.0 (#315) 2017-05-19 17:54:56 -07:00
yurido1 8fd85f16d5 Changed DS to use LoadInput instead of LoadOutputControlPoint 2017-05-19 17:25:57 -07:00
yurido1 2882dfac11 More ViewID tests. Support LoadInput in DS. (#316)
Closes #318.
2017-05-19 16:43:58 -07:00
Tex Riddell ace430ff41 Remove extra 'dxc smoke.hlsl' from hcttestcmds that will always fail (#313) 2017-05-19 11:17:27 -07:00
Tex Riddell da1ad75f27 Remove <memory> dependency from DxilPipelineStateValidation.h (#314) 2017-05-19 11:17:10 -07:00
Young Kim 4857166d1e Support for Enum in HLSL 2017 (#309)
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.
2017-05-19 09:44:07 -07:00
Tex Riddell 3e446c89d7 Merge pull request #312 from tex3d/psv-work
Update ViewID for multiple streams and implement ViewID pipeline validation
2017-05-18 18:47:57 -07:00
Xiang Li 9ff112ceda Code cleanup. (#311)
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.
2017-05-18 18:38:35 -07:00
Tex Riddell 0b5ab5c87a Implement ViewIDPipelineValidation
- 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
2017-05-18 18:00:59 -07:00
Yuri Dotsenko ff86b6b211 Support ViewID state for GS multiple streams
New serialization/deserialization for ViewID state
2017-05-18 17:59:44 -07:00
yurido1 1397b9e000 ViewID tests and fix for constants in Phi nodes. (#310) 2017-05-18 10:12:00 -07:00
Tex Riddell 261c3f8819 Add NumOpCodes_Dxil_1_1 and ComputeViewIdState pass to hctdb (#300)
Note: changed viewid_state to viewid-state for consistency
2017-05-18 02:00:17 -07:00
Tex Riddell 5234d42be1 Merge fixes from os integration 486b3dc5abee (#306)
* 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
2017-05-17 18:13:44 -07:00
Young Kim e168e0c711 Fix bad merge conflict for WaveActiveAllEqual Execution Test (#308) 2017-05-17 17:30:58 -07:00
Tex Riddell 877bc18366 DxilValidation accept more legal component types in signatures (#305)
- Fixes SV_Position must be float4 #89
- Needs additional testing and comparison of flexibility with fxc.
2017-05-17 14:35:45 -07:00
Xiang Li e5ef77995c Lower static global into allocas. (#299) 2017-05-17 10:45:48 -07:00
Tex Riddell 5e70ea6d8f Merge pull request #302 from tex3d/refactor-packing
Refactor DxilSignatureAllocator for easier use without Dxil/LLVM dependencies
2017-05-16 22:17:41 -07:00
Tex Riddell 8419a9abce Complete move to DxilSignatureAllocator.inl 2017-05-16 21:33:30 -07:00
Tex Riddell 2bedc332fb Move DxilSignatureAllocator.cpp to include/dxc/HLSL as .inl 2017-05-16 21:31:38 -07:00
Tex Riddell c7212ee216 Refactor DxilSignatureAllocator to remove DxilSignature dependencies 2017-05-16 20:13:03 -07:00
Young Kim 4161865264 Add WavePrefix execution tests for signed/unsigned integers. (#278)
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.
2017-05-16 17:45:54 -07:00
Tex Riddell c2d2cef73f Merge pull request #295 from Microsoft/dxil-v1.1
Merge ViewID, PSV data, and validator updates
2017-05-16 13:38:41 -07:00
Xiang Li 6cca464f51 Remove copy be replace dst with src. (#296)
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.
2017-05-16 12:37:40 -07:00
Tex Riddell 87a939aa50 Fix validation tests by removing viewIdState metadata (#298)
* 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).
2017-05-15 17:46:51 -07:00
yurido1 ea746d6c3c Fixed unordered_set union logic. (#297) 2017-05-12 16:51:51 -07:00
Xiang Li 7e5a340e67 Delete code to remove unused functions which is done by ASTContext::DeclMustBeEmitted (#294) 2017-05-12 15:32:10 -07:00
yurido1 8e029bce40 Fixed OOB bug indxcdia.cpp (#293) 2017-05-12 14:39:59 -07:00
Tex Riddell c95244404a Copy ViewID state to PSV data and select PSV version based on validator (#291)
* 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
2017-05-12 14:27:22 -07:00
yurido1 35f727ac33 Added support for functions without arguments. (#292) 2017-05-12 12:46:01 -07:00
Xiang Li 8ce48081cf Add a pass to eliminate dynamic indexing on output. (#287)
1. Add a pass to eliminate dynamic indexing on output.
2. Fix issue in AllocateSemanticIndex where argIdx should only udpate for leaf node.
2017-05-12 11:10:58 -07:00
Young Kim 80b5648342 Fix WaveActiveAllEqual test (#288) 2017-05-11 10:31:41 -07:00
Tex Riddell 5cb5131b32 Update PSV data structures with ViewID dependency data and Dxil Signatures (#289)
* 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
2017-05-10 18:17:04 -07:00
yurido1 df132d59b4 Initial implementation of ViewId state analysis. (#290) 2017-05-10 18:14:43 -07:00