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.
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!
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
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.
* 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.
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
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
- 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