Lei Zhang
2d72f72aa4
[spirv] Use ValueDecl instead of NamedDecl ( #895 )
...
ValueDecl is a subclass of NamedDecl and provides .getType().
2017-12-07 17:00:24 -05:00
Xiang Li
c91ec4bbe1
Use doesThisDeclarationHaveABody instead of hasBody when check body of a FunctionDecl. ( #898 )
...
Because hasBody will try to find body from all redeclations.
2017-12-07 13:49:08 -08:00
Lei Zhang
ea1bf8d24c
[spirv] Silence GoogleTest std::tr1 deprecation warnings ( #894 )
2017-12-07 11:01:49 -05:00
Ehsan
8e2f970460
[spirv] Support Status arg in Sample methods. ( #889 )
2017-12-07 10:57:21 -05:00
Xiang Li
9c459fedd8
Add line number when report resource cannot map. ( #892 )
2017-12-06 22:57:44 -08:00
Tex Riddell
f25850d524
Add [noinline] function attribute for lib target. ( #893 )
2017-12-06 19:41:37 -08:00
Young Kim
09c7c17dac
Fix exec tests ( #888 )
...
- TAEF is unable to recognize negative values in hex representation in x64 released build. So use decimal values instead
- Add 'Shl', 'LShr', 'And', 'Or', 'Xor' execution tests
- Update Warp Version for test cases known to fail
2017-12-06 19:04:01 -08:00
Xiang Li
9d8a3f5dac
Generate global variable for local constant. ( #891 )
2017-12-06 18:16:09 -08:00
Xiang Li
8c8d8f6e5a
Fix crash for vector smoothstep. ( #890 )
2017-12-06 17:21:02 -08:00
Xiang Li
1c103bb062
Revert "Fix crash for vector smoothstep."
...
This reverts commit 3bfa9960a8
.
2017-12-06 14:15:27 -08:00
Xiang Li
6753f88ca7
Revert "Generate global variable for local constant."
...
This reverts commit b3cfa21fa1
.
2017-12-06 14:15:22 -08:00
Xiang Li
b3cfa21fa1
Generate global variable for local constant.
2017-12-06 14:08:30 -08:00
Xiang Li
3bfa9960a8
Fix crash for vector smoothstep.
2017-12-06 13:09:09 -08:00
Ehsan
4d4c4efd66
[spirv] Support Clamp argument in Sample methods. ( #887 )
2017-12-06 14:37:29 -05:00
Lei Zhang
ea76fa189e
[spirv] Code refactoring ( #886 )
...
* Restructured DeclEvalInfo to contain a SpirvEvalInfo
* Refactored various variable creation methods
* Formatted code
2017-12-06 10:11:42 -05:00
Lei Zhang
fb224f19b6
[spirv] Fix structured buffer .GetDimensions() ( #885 )
...
OpArrayLength takes a pointer to an OpTypeStruct whose last member
is a run-time array, not a loaded struct value.
2017-12-06 09:12:31 -05:00
Young Kim
4904266822
Code Cleanup for Execution Tests ( #879 )
...
- Cleaning up execution test
- Generating xml test file from the script and hctdb
- Fixing hctdb categories for unsigned int
- Adding more execution tests (Fadd, FSub, FMul, FDiv, Add, Sub, SDiv)
2017-12-05 15:17:50 -08:00
Ehsan
d100740658
[spirv] Handle Status arg in Texture Gather methods and Refactor ( #880 )
...
* [spirv] Add Status arg in Texture Gather methods
* [spirv] Refactor handling of residency code struct
2017-12-05 13:44:45 -05:00
Lei Zhang
23fc6cb166
[spirv] Fix type mismatch when loading Constant/Texture Buffer ( #874 )
...
ConstantBuffer/TextureBuffer are rerepresented the same as normal
structs upon which they are parameterized. So, using the normal
translation path via TypeTranslator, we have no way to tell whether
a struct is indeed just a normal struct or a Constant/Texture
buffer. Thus, we cannot apply the Block/BufferBlock decoration
appropriately. This causes type mismatch for OpLoad instructions.
2017-12-05 13:16:58 -05:00
Lei Zhang
5de265fddb
[spirv] Add support for ignoring unused resources ( #875 )
...
Added a new command line option -fvk-ignore-unused-resources
to avoid emitting SPIR-V code for resources defined but not statically
referenced by the call tree of the entry point in question.
2017-12-05 12:21:55 -05:00
Lei Zhang
ff175c1a24
[spirv] Add support for -Fh ( #878 )
2017-12-05 11:11:04 -05:00
Lei Zhang
3076ec85de
[spirv] Create utility function to de-duplicate code ( #876 )
2017-12-05 09:16:00 -05:00
Ehsan
487a73af30
[spirv] Support GatherCmp methods with Status arg. ( #877 )
2017-12-04 17:59:02 -05:00
Ehsan
b0713a6b50
[spirv] Handle Sparse Images in GatherRGBA ( #872 )
2017-12-04 14:47:54 -05:00
Lei Zhang
d0b7c89d87
[spirv] Let .Consume() return access chains ( #873 )
...
This will allow further indexing into the struct used to
parameterize ConsumeStructuredBuffer.
2017-12-04 12:50:11 -05:00
Lei Zhang
fb377afe5a
[spirv] Add missing capability for storage image read/write ( #870 )
...
Refreshed SPIRV-Tools and re-enabled all validations for texure/
buffer methods.
Also added support for -Cc to color the disassembly.
2017-12-01 17:28:56 -05:00
Ehsan
43e5436524
Increased MaxIncludeFiles limit & filed issue #866 ( #867 )
2017-12-01 14:01:33 -05:00
Lei Zhang
2624406a58
[spirv] Fix OpImageRead return type ( #868 )
...
OpImageRead should return a 4-component vector.
2017-12-01 13:09:09 -05:00
Lei Zhang
b1bad83b22
[spirv] Support option to output byte offset in disassembly ( #869 )
2017-12-01 13:08:50 -05:00
Lei Zhang
f2144778b3
[spirv] Fix structurued buffer indexing in Interlocked*() ( #864 )
2017-11-30 10:13:39 -05:00
Lei Zhang
bbddc280c9
[appveyor] Stop installing TAEF ( #862 )
...
Appveyor already has WDK for Windows 10, version 1709 installed:
https://www.appveyor.com/docs/build-environment/
2017-11-29 15:38:21 -05:00
Lei Zhang
7f6aaf6cc6
[spirv] Use OpStore instead of OpVariable initializer ( #858 )
...
Right now certain optimization passes in SPIRV-Tools ignores
OpVariable initializer:
https://github.com/KhronosGroup/SPIRV-Tools/issues/1017
As a workaround, this commit replaces OpVariable initializer with
OpStore.
This commit should be reverted once OpVariable initializer is
supported.
Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/853
2017-11-29 10:53:34 -05:00
Ehsan
4c77d6a2e5
[spirv] Don't silently ignore unknown decls in TU. ( #857 )
2017-11-28 13:42:48 -05:00
Ehsan
1d92f9a129
[spirv] Handle RecordDecls defined inside DeclStmt ( #855 )
2017-11-27 16:50:15 -05:00
Lei Zhang
3a4c0338a4
[spirv] Add validation for vk::builtin usage ( #854 )
2017-11-27 16:12:39 -05:00
Ehsan
fcde415c18
[spirv] Handle literal int and 64-bit int. ( #851 )
...
Also update the FlatConversion code to handle float and boolean
initializers.
2017-11-27 14:40:20 -05:00
Lei Zhang
6a6290f2ed
[spirv] Add support for casting from float4 to float2x2 ( #849 )
2017-11-27 10:25:55 -05:00
Lei Zhang
53f3f69b36
[spirv] Add mechanism for Vulkan-specific builtins ( #805 )
...
[[vk::builtin("...")]] is introduced to support Vulkan-specific
builtins.
There are two supported in this commit:
* gl_PointSize
* gl_HelperInvocation
Validating the usages of these two builtins is left for anther
commit.
2017-11-25 17:32:39 -08:00
Lei Zhang
8903528e88
Allow CMake 3.9.0 shipped with Visual Studio 2017 ( #850 )
2017-11-25 10:55:37 -08:00
Marcelo Lopez Ruiz
3c729a038d
Container clipboard and XML serialization ( #848 )
...
* Add a tab for compilation options
* Add support to copy/view containers, and to paste them into shader ops.
2017-11-24 18:03:05 -08:00
Lei Zhang
04a5269451
[spirv] Support function foward declaration ( #847 )
2017-11-24 15:52:47 -05:00
Xiang Li
fa0674829b
Fix crash in code gen caused by cast atomic dst address. ( #843 )
2017-11-24 00:55:00 -08:00
Lei Zhang
05057495e8
[spirv] Adopt new changes in SPIRV-Tools ( #846 )
...
Uses the legalization pass recipe from SPIRV-Tools.
Also change -fcgl to disable both legalization and optimization.
Validation on some tests are turned off because of new image
instruction checking in SPIRV-Tools. Enabling them is a TODO.
2017-11-23 22:30:49 -05:00
Ehsan
8d072dc9ad
[spirv] Fix potential Release build issues ( #845 )
2017-11-23 16:54:52 -05:00
Ehsan
31855e75a8
[spirv] Convert floats of different bit widths ( #844 )
...
Also support 'literal float' to 'float' conversion.
2017-11-23 16:54:37 -05:00
Lei Zhang
1d671e843e
[spirv] Support static member with inline initializer ( #842 )
2017-11-22 19:52:49 -05:00
Ehsan
998bab9dea
[spirv] Translate intrinsic msad4 function. ( #808 )
2017-11-22 18:36:59 -05:00
Lei Zhang
9745b0d55c
[spirv] Add support for SV_Barycentrics ( #837 )
...
The translation is done using SPIR-V Extension
SPV_AMD_shader_explicit_vertex_parameter.
2017-11-22 18:16:48 -05:00
Lei Zhang
d1f1665865
[spirv] Add support for SV_ViewID ( #836 )
...
Also error out on seeing unknown patch constant function parameter.
2017-11-22 18:16:15 -05:00
Lei Zhang
ae9635c56c
[spirv] Use .getAs<>() instead of cast<>() for RecordType ( #841 )
...
cast<RecordType>(T.getTypePtr()) cannot handle cases in which
T is typedef of some struct type.
2017-11-22 17:57:05 -05:00