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

125 Коммитов

Автор SHA1 Сообщение Дата
Xiang Li cf8e34ec11 Support write mask for typed buf. (#126) 2017-03-09 17:09:29 -08:00
Xiang Li 7cdfa0f6a2 Support select on resource. (#124) 2017-03-08 21:01:07 -08:00
Xiang Li fc2d2154cd For vector writemask, create gep + store instead of load + shuffle + store. (#120) 2017-03-07 18:58:46 -08:00
Xiang Li d5dbc051f3 Replace uses of phi which has same operand for all path with the operand. (#115) 2017-03-02 12:49:48 -08:00
Xiang Li 38586597b9 Support -T rootsig_1_0/rootsig_1_1. (#112) 2017-03-01 17:00:45 -08:00
Xiang Li 843b64b320 Check exist function match dxil operation function when refresh operation fucntion cache. (#108) 2017-02-27 16:32:41 -08:00
Xiang Li 19952dbf73 Avoid iterate on map which use point as key to make sure output is the same. (#104) 2017-02-24 10:10:32 -08:00
Xiang Li 2ab6ca4359 Support static global resource. (#105) 2017-02-23 16:49:38 -08:00
Xiang Li 4cf8d75cee Use lt instead of le for clip. (#103) 2017-02-23 12:42:30 -08:00
Xiang Li 6153e6dd01 Not create phi for resClass and resID of createHandle when all operands is the same. (#101) 2017-02-23 12:42:09 -08:00
Xiang Li 73b6f95a40 Legalize sample offset when optimization is disabled. (#97) 2017-02-18 00:46:17 -08:00
Xiang Li 726c754221 Only promote local resource when has store of handle. (#87)
* Only promote local resource when has store of handle.

* Report error when cannot map local resource usage to global resource.

* Promote static resource when optimization is disabled too.

* Take care PHINode on local resource.
2017-02-15 18:16:30 -08:00
Tex Riddell 51898662c9 Close #75 - Pack prefix-stable by default (#90)
* Implement prefix-stable packing and make this the default.
* Add signature packing options -pack_prefix_stable and -pack_optimized.
2017-02-14 18:22:54 -08:00
Xiang Li fa22112d1a Use i32 for GEP index. (#85) 2017-02-14 16:57:33 -08:00
Xiang Li 9ea3e5f44b Enable SampleCmpLevelZero for all shader profiles. 2017-02-10 11:43:30 -08:00
Tex Riddell b8594d7ddc Fix build break from automatic merge. 2017-02-09 19:03:47 -08:00
Tex Riddell a6433c18f8 Merge pull request #76 from tex3d/integration
Integrate validation, dxc option, and other changes
2017-02-09 17:33:45 -08:00
yurido1 f9fd30a62b Added verification of root signature against shader resources. (#11)
Fixed root signature range containment bug.
Added verification of root signature against shader resources.
2017-02-08 11:51:15 -08:00
Xiang Li cb0ba446c1 Fix validation bugs. (#10) 2017-02-07 22:18:10 -08:00
Xiang Li 4fcc616d9b Keep rowIdx for array of gs input. (#72) 2017-02-07 17:47:05 -08:00
yurido1 edfe849282 Changed intrinsic opcode attributes for DXIL. (#9) 2017-02-07 16:59:38 -08:00
Tex Riddell 627763e563 Add tests and fix bugs with container and root signature validation (#5)
* Fix ValidateDxilBitcode PSV generation for Root Signature validation.
- also fix validation for empty patch constant signature.
* Test container and root signature validation.
* Fix DXASSERT when PC in/out patch sig mismatch HS.
2017-02-07 16:57:07 -08:00
Tex Riddell f6d4581fc6 Merge branch 'integration' into val 2017-02-07 13:03:53 -08:00
Tex Riddell 74049c5852 Integrate: Fix to CATCH_CPP_ASSIGN_HRESULT and validation of named metadata 2017-02-07 13:02:37 -08:00
Xiang Li 5091d4f189 Add default for switch to avoid warnings. (#70) 2017-02-07 11:34:34 -08:00
Tex Riddell a3e0b5828d ContainerAssembler and Validation fixes.
- zero DxilProgramSignatureElement to prevent garbage in signature
- rewrite bitcode when stripping root signature
- use correct part when reading debug module in ValidateDxilContainer
- report general error message when signature validation fails
2017-02-03 19:04:02 -08:00
Xiang Li 7b998429f3 Disable race condition check (#3)
* Write thread group uniform value will not cause race condition.

* Only report race condition when know the data is not uniform.

* Disable race condition check.
2017-02-03 15:37:57 -08:00
Tex Riddell 3e0e6e5e23 Fix break in HLModule. 2017-02-03 15:04:17 -08:00
Tex Riddell 0647154af0 Move Signature metadata to named node and some other cleanup. 2017-02-03 14:28:21 -08:00
Tex Riddell 2444ae3b10 Add DxcValidatorFlags_RootSignatureOnly. 2017-02-03 12:28:57 -08:00
Tex Riddell 4fbd33a449 Merge pull request #60 from tex3d/integration
Merge opcode and dxc options changes to dxil-v1.0
2017-02-03 10:58:57 -08:00
Tex Riddell 7c2c2c5d54 More RootSignature validation fixes.
- Implement RootSignatureHandle::Deserialize()
- Fix/clean up validation usage
2017-02-03 00:08:08 -08:00
Tex Riddell 6de3365aa2 Fix RootSignature Validation bugs. 2017-02-02 20:54:35 -08:00
Tex Riddell 7beaa7ba54 Implement DXIL Container validation
- 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)
2017-02-02 19:59:13 -08:00
Yuri Dotsenko b0936e9395 Before Tex's rebase. 2017-02-02 19:58:03 -08:00
Xiang Li f43f396598 Use i32 to fake 64bit for buffer load/store. (#63) 2017-02-02 17:48:43 -08:00
Xiang Li 199aa5a0b5 Keep debug info for handle created by local resource. (#61)
* Keep debug info for handle created by local resource.

* Add IsResourceAlloc to share code.
2017-02-02 17:00:39 -08:00
Yuri Dotsenko 67af2429a4 Partially ported RootSignatureVerifier::VerifyShader and VerifyRootSignatureWithShaderPSV 2017-02-02 16:08:35 -08:00
Yuri Dotsenko 66ba69688e Adding root signature deserialization 2017-02-01 20:09:19 -08:00
Tex Riddell 9c3fd76579 Fix break in DxilOperations from merge. 2017-02-01 16:12:27 -08:00
Tex Riddell c18ed9133e Merge remote-tracking branch 'ms/dxil-v1.0' into integration 2017-02-01 15:43:43 -08:00
Tex Riddell 797548781c Integrate final opcode changes for DXIL v1.0
- Removes IAddc and ISubc
- Renames USubc to USubb
- Compacts opcodes
2017-02-01 15:22:29 -08:00
Xiang Li 3c7734c7da Support vector indexing on output. (#55) 2017-02-01 10:55:26 -08:00
Xiang Li aa3313c767 Fix checkin issue. (#56) 2017-01-31 12:42:45 -08:00
Xiang Li 54bb69d607 Use metadata for precise on function call. (#51) 2017-01-30 18:41:33 -08:00
Xiang Li cf6f8beb4b Check Race Condition for TGSM (#48) 2017-01-30 16:09:31 -08:00
Xiang Li 06624f8991 Only allow dxil struct on ExtractVal. (#49) 2017-01-30 14:56:00 -08:00
Xiang Li ac228c5aa4 Translate AddUint64. (#47) 2017-01-30 12:30:25 -08:00
Tex Riddell 3bcc42ff10 Merge branch 'master' into dxil-v1.0 2017-01-27 17:18:24 -08:00
Tex Riddell af6b2a552f fixes #37 - License cleanup. 2017-01-27 16:48:08 -08:00
Xiang Li 86b7e6ef9d Struct for normal buf (#43)
* Support sturct in none-struct buffer.

* More tests for sturct in none-struct buffer.

* Simplify the test and use them.
2017-01-27 14:42:35 -08:00
Xiang Li e1f6fdbc19 Put createHandle for CBuffer to entry block when possible. (#42) 2017-01-26 18:09:50 -08:00
Tex Riddell e2f5d022bb Merge pull request #27 from tex3d/integration
Integrate internal changes
- link dump methods when compiled with _DEBUG or DBG
- d3d12warp to d3d10warp in hcttest-samples.py
2017-01-25 12:36:51 -08:00
Xiang Li 7c91399069 Use undef to save type for type annotation. (#35) 2017-01-25 10:40:58 -08:00
Xiang Li 664c0b6436 Change bool to i32 instead of i8. (#28) 2017-01-23 17:54:09 -08:00
David Peixotto 0f3789fb0d Support extension intrinsics on resources (#24)
This commit adds support for extension intrinsics that work as
methods on resources. For example, we could have an extension
on buffers called `MyBufferOp`

    Buffer<float2> buf;
    float2 val = buf.MyBufferOp(int2(1, 2))

To support extension methods we add a new resource lowering strategy
that does three transformations to the intrinsic call

1. Expand vectors in place in the call arguments.
2. Convert non-void return value to dx.types.ResRet.
3. Convert resource parameter to dx.types.Handle value.

For example, assuming that MyBufferOp has opcode 138. The resource
lowering strategy would convert the call as HL-dxil to dxil as
follows

    call <2 x float> MyBufferOp(i32 138, %class.Buffer %3, <2 x i32> <1 , 2> )
    ==>
    call %dx.types.ResRet.f32 MyBufferOp(i32 138, %dx.types.Handle %buf, i32 1, i32 2 )
2017-01-23 17:54:02 -08:00
Tex Riddell a96eea8581 Integrate internal changes
- link dump methods when compiled with _DEBUG or DBG
- d3d12warp to d3d10warp in hcttest-samples.py
2017-01-23 16:40:48 -08:00
Tex Riddell 220f78a557 Merge 'master' into dxil-v1.0 2017-01-20 14:11:27 -08:00
Xiang Li 5623234187 Strip function parameter for entry and patch constant function. (#20)
Strip function parameter for entry and patch constant function

* Update error message for ValidationTest::MultiDimArray

* Merge remote-tracking branch 'origin/master'

# Conflicts:
#	lib/HLSL/DxilValidation.cpp
#	tools/clang/unittests/HLSL/ValidationTest.cpp

* Update error message for ValidationTest::MultiDimArray

Update error message for ValidationTest::MultiDimArray

* Fix merge error. (#3)

* Delete local file (#4)

* Fix merge error.

* Delete local file

* Strip function parameter for entry and patch constant function. (#5)
2017-01-19 19:00:17 -08:00
Young Kim 43aebafa62 Add functions for DxilContainer (#19)
- Add function to get dxilpart by type
- Add function to get ProgramHeader given a DxilContainer
- Add unit test for functions in dxilcontainer.cpp
2017-01-19 18:10:37 -08:00
Tex Riddell 2d3ce8ef22 Merge remote-tracking branch 'upstream/master' into integration 2017-01-19 11:21:59 -08:00
David Peixotto b4f49bb41d Improve support for hlsl extensions (#14)
This commit improves the support for intrinsics added through
the IDxcIntrinsicTable interface:

- Only rewrite unsigned opcode for builtin intrinsics
- Allow replication to work when only vector is return value
2017-01-19 09:23:52 -08:00
Tex Riddell 4b532ceff9 Merge branch 'master' into integration 2017-01-18 19:43:07 -08:00
Tex Riddell 69d8d3209b Integrate change to DXIL Version 1.0 2017-01-18 19:18:55 -08:00
Tex Riddell c27cd89141 Restrict shader models accepted by DxCompiler API to 6.0 (#15)
- upconvert to 6.0 in dxc.exe and d3dcompiler_dxc_bridge
  - restrict to 6.0 in dxcompiler API
  - restrict to 6.0 in DxilValidator
  - allow loading of SM < 6.0 for now on DXIL 0.7
2017-01-18 17:45:26 -08:00
Tex Riddell 55ba393c2c Signature packing, codegen fixes, and validation fixes and additions.
- 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
2017-01-17 18:10:16 -08:00
David Peixotto 9451f2c0b3 Add initial support for extension intrinsics and defines (#5)
This commit adds initial support for extension intrinsics and defines, including:

-Support for recognizing hlsl extensions as new intrinsic functions.
-Support for requesting lowering of extensions.
-Support for preserving semantic defines.
-Support for validating semantic defines.

This commit adds support for hlsl extensions in the form of additional
intrisic functions and semantic defines.

We now allow a dxcompiler instance to register that it can handle
additional intrinsic functions beyond the standard hlsl intrinsics. These
new intrinsics are called extensions.  For each extension, the compiler
supplies a lowering strategy that is used by the dxcompiler to translate
from the source level intrinsic to a high-level dxil intrinsic.

We initially support the two lowering strategies: replicate and pack.
The replicate strategy will scalarize the vector elements in the call
and replicate the function call once for each element in the vector.
The pack strategy changes the vector arguments into literal struct
arguments.

We also now include support for "semantic defines". A semantic define is
a source level define whose value is preserved in the final dxil as
metatdata. The source level define can come as either a #define in
the hlsl source or a /D define from the command line.

We provide a hook to validate that a semantic define has a legal value
(for example to ensure that the value is an integer). Validation failures
can produce warnings and errors that will be emitted through the standard
clang diagnostic mechanism.

This code was originally written by marcelolr and modified by dmpots to
support packed lowering of intriniscs and validation of semantic defines.
2017-01-17 17:51:13 -08:00
Xiang Li ee0e81b047 Disable multi-dim array type and function call. (#12) 2017-01-17 13:30:42 -08:00
Xiang Li 96c0eb50ef Cleanup more Validation TODOs. 2017-01-12 17:59:37 -08:00
Xiang Li 03149de76f Cleanup more validation TODOs. 2017-01-11 10:42:48 -08:00
Xiang Li 8eb801f1fd Clean more validation TODOs. 2017-01-10 16:24:10 -08:00
Xiang Li 245a771a85 1. Clean more validation TODOs.
2. Support array of SV_Target.
2017-01-10 11:44:48 -08:00
Xiang Li 28b3ffe821 Clean more validation TODOs. 2017-01-04 13:29:28 -08:00
Xiang Li 93274654a7 Check input qualifier for patch constant function. 2017-01-04 13:29:28 -08:00
Marcelo Lopez Ruiz 6ee4074a4b first commit 2016-12-28 11:52:27 -08:00