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

1659 Коммитов

Автор SHA1 Сообщение Дата
Tristan Labelle 90ed5a43a4
Remove unsupported /O4 option from help text. (#1662) 2018-11-08 14:16:24 -08:00
Xiang Li 7ecfd0ad2a
Add D3DPreprocess to d3dcompiler_dxc_bridge. (#1681)
* Add D3DPreprocess to d3dcompiler_dxc_bridge.

* Avoid throw in D3DCompile and D3DPreprocess.
2018-11-08 10:33:58 -08:00
Tristan Labelle d47cbb6579
Fixed [unroll] being interpreted as [unroll(1)]. (#1669) 2018-11-08 10:32:32 -08:00
Lei Zhang ee00dc18d6
[spirv] Add half as allowed (RW)Buffer element type (#1678)
Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1672
2018-11-07 17:26:35 -07:00
Helena Kotas 2a7c520fcb
Fix memory allocation issues (#1679)
- DxilModule was not freed
- PragmaMatrixHandler was freed twice when the compiler execution was aborted
  prematurely by an exception
- Improve diagnostic tracing in CompilerTest::CompileWhenNoMemThenOOM
2018-11-07 12:51:37 -08:00
Lei Zhang 740b6701af
[spirv] Add support for casting involving vector decomposition (#1677)
Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1673
Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1675
Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1676
2018-11-06 13:34:16 -07:00
Tex Riddell 45028ac8e5
Fix ViewportOrRTArrayIndex feature bit compat with validator 1.3 (#1664) 2018-11-05 18:10:57 -08:00
Tristan Labelle 1a527de97c
Added support for custom include paths when compiling with /P (#1666)
The include paths were not piped as preprocessor command args. Includes a test.

Fixes #1636
2018-11-05 13:20:26 -08:00
Tristan Labelle 182067cafd
Changed default compilation options to honor #line directives and added tests. (#1665) 2018-11-05 10:12:49 -08:00
Helena Kotas b7d1c195c5
Add root signature flags (#1663)
* Add root signature flags

- Add LOCAL_ROOT_SIGNATURE flag in RootFlags
- Add DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS flag in DescriptorTable
- New DxilRootSignatureCompilationFlags argument on Compile/ParseRootSignature
  to specify whether the root signature is local or global.

* Fix root signature flag issues, add cmd test for root sig from define
2018-11-02 23:52:32 -07:00
Helena Kotas b77a577f5b
Subobject tests (#1657)
Add error on empty root signature value or subobject to export association.
2018-11-02 13:52:57 -07:00
Tex Riddell b418716256 BUILD (disabled opt.exe): fix opt.cpp include path 2018-11-02 12:21:50 -07:00
Tex Riddell cc388c1721
Use CHECK-DAG on validation test when error order may be different (#1659) 2018-11-01 19:37:00 -07:00
Xiang Li 238e6a4f41
Disable eliminate output dynamic indexing for HS. (#1655)
* Disable eliminate output dynamic indexing for HS.

* Fix build warning and remove test.
2018-11-01 18:51:27 -07:00
Helena Kotas bfbe9fab38 Reorder RDAT sections back to previous order (#1658) 2018-11-01 17:26:36 -07:00
Tex Riddell 532368e9a1
Fix remaining HLModule/DxilModule dependencies from llvm::Module, etc. (#1656)
- Use one callback for global removal - Function and GlobalValue use this
- Share callback for HLModule and DxilModule, transfer is handled by
  setting callback on construction and checking pointer before clearing
2018-11-01 16:38:33 -07:00
Tristan Labelle 3f614e9d83
Merge pull request #1654 from MrTrillian/FixIssue861
Fixed failure on including empty files, and added test.
2018-11-01 13:50:58 -07:00
Helena Kotas 637e6d2d7b
Add Subobjects to compiler front end (#1645)
- Add HLSL subobject classes to clang and enable their initialization
  via initialization lists.
- Translate declared subobjects and add to DXIL module.
- Fix bugs in subobject metadata serialization and disasm.
- Preserve original input string in root signature subobject.
- Remove unused IsHlslObjectType method from CGHLSLRuntime.
- Remove unnecessary collection of global strings in CGHLSLRuntime
- Change type printer to report 'literal string' for constant char arrays.
2018-11-01 11:43:57 -07:00
Tristan Labelle 52117431c8 Fixed failure on including empty files, and added test.
Addresses #861
2018-11-01 11:00:55 -07:00
Vishal Sharma bc9ad948c8
Fix lower memcpy for nested struct with single element (#1650) 2018-10-31 20:28:53 -07:00
Tex Riddell 254b8853be
Fix dependency on HL/DxilModule from llvm::Module (#1651)
- use function pointers for HL/DxilModule remove function callbacks
- move ReducibilityAnalysis to llvm/Analysis
2018-10-31 19:18:28 -07:00
Tex Riddell baba32dcb0
Remove using namespace llvm from DxilSubobject.h (#1649) 2018-10-31 17:10:24 -07:00
Xiang Li 0df5e31b43
Only propagate WaveSensitive when target BB not post dom current BB. (#1648) 2018-10-31 16:30:27 -07:00
Tex Riddell 3f671b38fd
Fix #1629 - crash when using NonUniformResourceIndex (#1646)
Fix crash caused by NonUniformSet being invalidated before use
Instead of using NonUniformSet, defer lowering of
NonUniformResourceIndex until last, then mark all GEPs that use
the incoming value.

This will mark all uses of the value used in NonUniformResourceIndex
as non-uniform, including indexing that was not marked non-uniform,
if it ends up being the same index.  This matches the prior behavior,
and avoids loss of non-unifom metadata when merging GEPs, but could
be considered not quite correct, although the difference in indexing
would probably not have been intentional.
2018-10-30 13:40:11 -07:00
Tex Riddell a81fa03444
Fix dynamic indexed row_major matrix from cbuffer (#1643) 2018-10-30 11:39:58 -07:00
Tex Riddell 64bec9de53
Add DxilContainerReader and refactor PSV/RDAT into DxilContainer lib (#1642) 2018-10-29 17:54:05 -07:00
Adam Yang 0e5b2624be
Make return value the first output element. (#1622) 2018-10-29 16:30:20 -07:00
Xiang Li 0be0bcbda5
Change normalize implementation. (#1641)
* Change normalize implementation.
  From  a / length(a) to a * (rsqrt(dot(a))).
2018-10-29 13:18:53 -07:00
Tex Riddell 3af4373a34
Fix string interning for Subobjects (#1640)
* Fix string interning for Subobjects

* DxilRuntimeReflection: Remove dependency on llvm/ADT/STLExtras.h
- This file is meant to be included in other projects that do not include
  llvm headers or libs, so it must avoid those dependencies.

* Avoid unnecessary strlen operations in GetSubobjectString

* StringStorage/RawBytesStorage: use pair of unique_ptr and size
2018-10-29 11:30:16 -07:00
Vishal Sharma b357077198
Fix modf implementation (#1630) 2018-10-25 10:06:35 -07:00
Lei Zhang efb45575db
Resolve compiler warnings on Linux and macOS (#1628)
* Removed unused functions and fields
* Turned off switch enumeration value not handled warnings
* Fixed initialization issues
2018-10-25 11:08:12 -04:00
Helena Kotas 35dd1b7b0c
Report error for mismatched types in initialization lists (#1625)
The compiler did not report an error when an element in initialization list could not be converted to a target element type. It went though the conversion checks but never reported an error on the clang level. The compiler then crashed in code gen. This commit fixes that.
2018-10-24 13:42:12 -07:00
Tex Riddell 4a942586f8
Merge pull request #1621 from tex3d/dxil-subobjects
Add Subobjects: classes, metadata, serialization, reflection, disasm
2018-10-24 11:44:51 -07:00
Tex Riddell d8b87896c1
Merge pull request #1620 from tex3d/dxil-1-4
Dxil 1.4 update + packed dot intrinsics and SV_ShadingRate
2018-10-24 11:37:33 -07:00
Vishal Sharma 718e696079
Propagate convergent operands only once (#1626) 2018-10-24 10:59:06 -07:00
Lei Zhang 0fdb0fdbc3 Specialize std::hash in namespace std 2018-10-24 09:36:09 -04:00
Lei Zhang b107c06d97 Compile DxilLibraryReflection.inl on Linux and macOS 2018-10-24 09:09:56 -04:00
Lei Zhang 2a17cb9f8b Stop checking generated binaries in Travis CI 2018-10-24 07:53:34 -04:00
Tex Riddell 56ceb7faef Move struct defs outside union to avoid warning [-Wnested-anon-types] 2018-10-23 20:20:24 -07:00
Xiang Li 536240b3b8
Support pragma pack_matrix. (#1623) 2018-10-23 18:22:06 -07:00
Tex Riddell c598a25429 Disasm: Additional feedback and rename state object flags to match hlsl 2018-10-23 17:51:25 -07:00
Lei Zhang c7f31d180c
[spirv] Remove duplicated impl for HasHLSLMatOrientation() (#1624) 2018-10-23 17:34:00 -04:00
Tex Riddell 262e94ee5a Address feedback, remove unused extra RDAT version. 2018-10-23 14:31:41 -07:00
Adam Yang b744770863
Merge pull request #1616 from adam-yang/convergence_dce
Properly clean up resources involved in unused convergent values.
2018-10-23 10:41:53 -07:00
Tex Riddell 2c80affcf9
Fix mixed line endings in CGHLSLMS.cpp (#1619) 2018-10-23 10:36:53 -07:00
Tex Riddell ecb4e3b4bb Add SV_ShadingRate plus optional feature flag
- Move/fix flag collection based on signature properties to be computed
  per entry function (including for libraries)
2018-10-22 20:25:12 -07:00
Tex Riddell 79bc013b4d Add dot2add and dot4add_*8packed intrinsics 2018-10-22 20:21:55 -07:00
Tex Riddell 64af6c0e5d Update to DXIL 1.4 and Shader Model 6.4 2018-10-22 16:35:38 -07:00
Adam Yang 53f849482c Fixed comment 2018-10-22 15:26:47 -07:00
Steven Perron fe2d48b984 Add the HLSL-spirv cookbook. (#1618)
Add a document to give examples of what HLSL code patterns will generate
valid Vulkan SPIR-V.
2018-10-22 14:22:44 -04:00