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

1057 Коммитов

Автор SHA1 Сообщение Дата
Lei Zhang 26bf35450a
[spirv] Update doc about reflection (#1130) 2018-03-12 11:32:00 -04:00
Lei Zhang 70990344ed
[spirv] Implement relaxed layout for vector types (#1092)
Based on GLSL std140/std430 layout rules, relaxed layout allows
using vector's element type's alignment as the vector types's
alignment, so that we can pack a float value and a float3 value
tightly. This is the default right now.

Also add an option, -fvk-use-glsl-layout, to turn off the relaxed
layout for vectors and use conventional GLSL std140/std430 layout
rules.
2018-03-12 10:21:54 -04:00
Xiang Li 277bb0bce3
Use memcpy when cast cbuffer constant into static global. (#1125) 2018-03-08 22:34:46 -08:00
Lei Zhang 451d095898
[spirv] Update doc about texture concepts (#1123) 2018-03-08 12:11:09 -05:00
Ehsan fc771d1046
[spirv] Non-literal 'literal float' as initializer (#1122)
Handle FlatConversion for cases such as:
```
S myS = (S)(1.0/0.0);
```
These cases result in an initializer of type 'literal float', even
though the initializer is *not* a FloatingLiteral!
2018-03-08 11:41:38 -05:00
Lei Zhang d34e2654f4
[spirv] Remove accidentally added empty test file (#1120) 2018-03-08 09:13:50 -05:00
Young Kim fc2cbbd4ce
revert cosh test tolerance value for float32 (#1119) 2018-03-07 17:49:51 -08:00
Lei Zhang 307c860193
[spirv] Consider majorness when accessing matrix in cbuffer (#1116)
Moved majorness info into SpirvEvalInfo so that we can translate
type correctly based on it. This affects accessing matrices inside
cbuffer; otherwise, we will have wrong type for the matrix field
loaded out of a cbuffer.

Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1112
2018-03-07 14:14:45 -05:00
Lei Zhang 89bc301735
[spirv] Refresh external projects for SPIR-V 1.3 (#1117) 2018-03-07 14:07:48 -05:00
Young Kim a71140cdaa
Relax hcos tolerance range (#1114) 2018-03-06 17:33:32 -08:00
Young Kim 7895e40376
Fix div denorm ftz (#1113) 2018-03-06 17:33:24 -08:00
Ehsan b02d940813
[spirv] Don't emit Float16 capability. (#1109)
Capability Float16 is not allowed by Vulkan 1.0 specification.
SPV_AMD_gpu_shader_half_float should be used if 16bit floats are used.
2018-03-06 11:25:20 -05:00
Adam Yang 1f5ef0430e
Merge pull request #1110 from adam-yang/gettaef-tls2
Modified hctgettaef.py to use tls1.2 when requesting files files github.
2018-03-05 15:59:31 -08:00
Adam Yang c252cc430c Modified hctgettaef.py to use tls1.2 when requesting files files github. 2018-03-05 14:08:35 -08:00
Lei Zhang c1ea245a16
[spirv] Add support for WaveReadLineFirst() (#1106) 2018-03-01 15:48:09 -05:00
Ehsan 8d5d976674
[spirv] Take bitwidth into account when casting (#1105) 2018-03-01 12:22:05 -05:00
Young Kim 81ecfef34b
Fix denorm preserve division with high value of denominator (#1093) 2018-03-01 07:41:10 -08:00
Lei Zhang c8970cdf6b
[spirv] Ignore static when seeing both static and groupshared (#1101) 2018-02-28 12:12:13 -05:00
Lei Zhang ca077c9b1f
[spirv] Fix type mismatch for compound assignment (#1104)
Compound assignments don't have the proper AST nodes to implicitly
casting LHS and RHS to the same type. But it has an API called
getComputationLHSType() to tell us what the LHS are expected to
convert to when doing the computation. We need to take into
consideration of that information when CodeGen'ing compound
assignments.
2018-02-28 12:11:58 -05:00
Xiang Li 3873af6750
Support addrspacecast when flatten global variable. (#1103) 2018-02-27 17:16:58 -08:00
Lei Zhang 8bfb20d76d
[spirv] Update SPIRV-Tools (#1102) 2018-02-27 15:50:39 -05:00
Ehsan 93ba5ed95f
[spirv] Non-floating point matrix layout. (#1097) 2018-02-27 14:06:32 -05:00
Xiang Li 19616e53b5 Revert "Support addrspacecast when flatten global variable."
This reverts commit d74ff8a97d.
2018-02-27 10:59:48 -08:00
Xiang Li d74ff8a97d Support addrspacecast when flatten global variable. 2018-02-27 10:55:35 -08:00
Lei Zhang 7b7510b2c5
[spirv] Fix location assignment for composite stage IO types (#1098)
Scalars and vectors typically take only one location. But matrices
and composite types take multiple sequential locations.
2018-02-27 10:30:22 -05:00
Lei Zhang 1e410c0b54
[spirv] Do not assign descriptors to Workgroup variables (#1100)
Also fix missing row-major-ness for external matrices that need
struct wrapping.
2018-02-27 10:23:00 -05:00
Lei Zhang 552b5cc8a2
[spirv] Support 64bit types during resource calculation (#1099)
Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1094
2018-02-27 10:21:59 -05:00
Jeff Noyle 8e3451b82d
Allow debug name to be added or removed (#1079)
* Allow debug name to be added or removed

* Add unit test

* change test name
2018-02-26 17:18:05 -08:00
Lei Zhang 5c4ca12efc
[spirv] Update doc and SPIRV-Tools (#1088)
Add explanation of legalization, optimization, validation in doc.
2018-02-21 14:12:01 -05:00
Lei Zhang 4221a698e1
[spirv] Support WaveGetLaneCount() and WaveGetLaneIndex() (#1077)
They are translated into SPIR-V builtin varibles. The translation
requires the SPV_KHR_shader_ballot extension.
2018-02-21 10:34:01 -05:00
Tex Riddell 97a1b6bbee
Fix leak in dxc /recompile (#1085) 2018-02-20 19:05:01 -08:00
Xiang Li cda6c52875
Save signature debug info to alloca. (#1087) 2018-02-20 18:44:04 -08:00
Xiang Li 4156aaf280
Check row and col on resultTy after CombineDimensions. (#1086) 2018-02-20 18:00:40 -08:00
Lei Zhang db62d63125
[spirv] Update SPIRV-Tools (#1084)
This is for both bugfixes and performace improvements.
2018-02-20 16:35:20 -05:00
Young Kim b287dd7d71
More overload for TextureGather and TextureGatherCmp (#1069) 2018-02-20 12:35:19 -08:00
Young Kim faafc68222
set test as blocked for invalid shader model test (#1061) 2018-02-20 12:34:36 -08:00
Young Kim 3a77648684
Fix argument passing for tertiary denorm mode (#1078) 2018-02-20 12:33:49 -08:00
Xiang Li 21c251a391
Choose i32 as result type for select used by binary operator. (#1080)
* Choose i32 as result type for case like ((P.x < -P.w) ? 3 : 9) | ((P.y < -P.z) ? 5 : 3).

* Use lowest precision for literal integer for binary operator.
2018-02-20 10:31:11 -08:00
Lei Zhang 9bbe6f16a2
[spirv] Add support for if statement attributes (#1081)
The following attributes

* [flatten]
* [branch]

are translated into SPIR-V selection control masks.
2018-02-20 12:21:10 -05:00
Lei Zhang a19e61696e
[spirv] Update SPIRV-Tools to pull in fixes (#1076) 2018-02-15 13:20:05 -05:00
Lei Zhang 8283f8aabd
[spirv] Remove the "var." prefix on cbuffer/tbuffer names (#1071)
This will help reflection libraries to do their work.
2018-02-15 10:18:07 -05:00
Lei Zhang b05430d9fb
[spirv] Add support for PS [earlydepthstencil] attribute (#1074) 2018-02-14 15:25:07 -05:00
Lei Zhang 39c8e337b1
[spirv] Fix crashes in matrix casting for Release build (#1070)
Some method calls are wrapped in assert(), which gets removed
in Release build and results in some local variables not updated.
2018-02-13 15:43:01 -05:00
Young Kim 2af98c8a43
Bump up version number. (#1066)
bump up version to SM6.3 and DXIL1.3
2018-02-12 13:27:48 -08:00
Ehsan 774e85eb20 [spirv] Add initial support for non-fp matrices (#1057)
This is the support for non-floating-point matrices,
which are emulated using arrays of vectors because
SPIR-V does not allow non-floating-point matrices.

* Initial support for non-fp matrix
* Add support for non-fp matrix in all()
* Conversion of float matrix to int matrix
* support for modf returning an int matrix
* Add tests for non-fp matrix access
* Mixed arithmetic for non-fp matrices
* Support non-fp matrix in flat conversion
* Non-fp matrix in asint/asuint/asfloat
* Mul of non-fp Matrix with Vector/Scalar
* Add tests for non-fp matrix cast

TODO: Layout decoration of non-fp matrices
TODO: Majorness of non-fp matrices
2018-02-12 15:33:41 -05:00
Lei Zhang 7dbfa84a14
Add an option to allow pre-expand token-pasting (##) operands (#1065)
The fxc compiler evaluates both operands before performing the
token-pasting operation. But the default Clang way is to follow
C standard, which token-pastes operands as-is, without any
pre-expanding.

This commit adds support for the fxc behavior via the command
line option: -flegacy-macro-expansion.

Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1005
2018-02-09 14:31:12 -05:00
Jeff Noyle 72a280776c
Off by one (character) (#1063) 2018-02-09 10:51:38 -08:00
Young Kim e9f17e3c87
Fix denorm tests and sm support (#1059)
- Fixing device support for > SM 6.0
- updating dxexp
- Also fixing the following tests:
ExecutionTest::DenormBinaryFloatOpTest#FDivDenormFTZ
ExecutionTest::DenormBinaryFloatOpTest#FAddDenormAny
ExecutionTest::DenormBinaryFloatOpTest#FMulDenormAny
ExecutionTest::DenormBinaryFloatOpTest#FDivDenormAny
ExecutionTest::DenormBinaryFloatOpTest#FMulDenormFTZ
ExecutionTest::DenormBinaryFloatOpTest#FAddDenormFTZ
ExecutionTest::DenormBinaryFloatOpTest#FSubDenormFTZ
ExecutionTest::DenormBinaryFloatOpTest#FSubDenormAny
ExecutionTest::DenormTertiaryFloatOpTest#FMadDenormAny
ExecutionTest::DenormTertiaryFloatOpTest#FMadDenormFTZ
2018-02-07 13:51:16 -08:00
Young Kim e5bb22baf7
Fix sqrt,rsqrt and ulp test for half (#1054) 2018-02-06 14:57:58 -08:00
Lei Zhang ae8c5febf7
[spirv] Turn on legalization for invalid opcode (#1058)
Certain opcodes are not available in non-pixel stages.
Call the pass to replace them.
2018-02-06 15:32:53 -05:00