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

3 Коммитов

Автор SHA1 Сообщение Дата
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
Marcelo Lopez Ruiz 6ee4074a4b first commit 2016-12-28 11:52:27 -08:00