Commit 0e46eaef by dankbaker Committed by GitHub

Merge pull request #1 from KhronosGroup/master

Pull request from glslang master
parents b49806b0 98a2e92f
......@@ -283,10 +283,10 @@ spv::Dim TranslateDimensionality(const glslang::TSampler& sampler)
}
}
// Translate glslang type to SPIR-V precision decorations.
spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type)
// Translate glslang precision to SPIR-V precision decorations.
spv::Decoration TranslatePrecisionDecoration(glslang::TPrecisionQualifier glslangPrecision)
{
switch (type.getQualifier().precision) {
switch (glslangPrecision) {
case glslang::EpqLow: return spv::DecorationRelaxedPrecision;
case glslang::EpqMedium: return spv::DecorationRelaxedPrecision;
default:
......@@ -294,6 +294,12 @@ spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type)
}
}
// Translate glslang type to SPIR-V precision decorations.
spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type)
{
return TranslatePrecisionDecoration(type.getQualifier().precision);
}
// Translate glslang type to SPIR-V block decorations.
spv::Decoration TranslateBlockDecoration(const glslang::TType& type)
{
......@@ -940,7 +946,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
spv::Id leftRValue = accessChainLoad(node->getLeft()->getType());
// do the operation
rValue = createBinaryOperation(node->getOp(), TranslatePrecisionDecoration(node->getType()),
rValue = createBinaryOperation(node->getOp(), TranslatePrecisionDecoration(node->getOperationPrecision()),
TranslateNoContractionDecoration(node->getType().getQualifier()),
convertGlslangToSpvType(node->getType()), leftRValue, rValue,
node->getType().getBasicType());
......@@ -1065,7 +1071,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
spv::Id right = accessChainLoad(node->getRight()->getType());
// get result
spv::Id result = createBinaryOperation(node->getOp(), TranslatePrecisionDecoration(node->getType()),
spv::Id result = createBinaryOperation(node->getOp(), TranslatePrecisionDecoration(node->getOperationPrecision()),
TranslateNoContractionDecoration(node->getType().getQualifier()),
convertGlslangToSpvType(node->getType()), left, right,
node->getLeft()->getType().getBasicType());
......@@ -1142,7 +1148,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
else
operand = accessChainLoad(node->getOperand()->getType());
spv::Decoration precision = TranslatePrecisionDecoration(node->getType());
spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision());
spv::Decoration noContraction = TranslateNoContractionDecoration(node->getType().getQualifier());
// it could be a conversion
......@@ -1187,7 +1193,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
else
op = glslang::EOpSub;
spv::Id result = createBinaryOperation(op, TranslatePrecisionDecoration(node->getType()),
spv::Id result = createBinaryOperation(op, precision,
TranslateNoContractionDecoration(node->getType().getQualifier()),
convertGlslangToSpvType(node->getType()), operand, one,
node->getType().getBasicType());
......@@ -1249,7 +1255,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
assert(node->getOp());
spv::Decoration precision = TranslatePrecisionDecoration(node->getType());
spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision());
switch (node->getOp()) {
case glslang::EOpSequence:
......@@ -2573,7 +2579,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
translateArguments(*node->getAsAggregate(), arguments);
else
translateArguments(*node->getAsUnaryNode(), arguments);
spv::Decoration precision = TranslatePrecisionDecoration(node->getType());
spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision());
spv::Builder::TextureParameters params = { };
params.sampler = arguments[0];
......
......@@ -241,7 +241,7 @@ ERROR: node is still EOpNull!
0:122 'sExt' (uniform lowp samplerExternalOES)
0:122 Construct vec3 (temp lowp 3-component vector of float)
0:122 'f13' (invariant global mediump float)
0:123 textureProj (global lowp 4-component vector of float)
0:123 textureProj (global lowp 4-component vector of float, operation at mediump)
0:123 'sExt' (uniform lowp samplerExternalOES)
0:123 direct index (smooth temp mediump 4-component vector of float)
0:123 'v' (smooth in 3-element array of mediump 4-component vector of float)
......@@ -278,7 +278,7 @@ ERROR: node is still EOpNull!
0:145 'a' (in mediump int)
0:145 'b' (in mediump float)
0:147 Sequence
0:147 textureProjGrad (global lowp 4-component vector of float)
0:147 textureProjGrad (global lowp 4-component vector of float, operation at mediump)
0:147 's2Dg' (uniform lowp sampler2D)
0:147 Construct vec3 (temp mediump 3-component vector of float)
0:147 'f13' (invariant global mediump float)
......@@ -299,17 +299,17 @@ ERROR: node is still EOpNull!
0:158 Function Definition: foo323433( (global void)
0:158 Function Parameters:
0:160 Sequence
0:160 textureLod (global lowp 4-component vector of float)
0:160 textureLod (global lowp 4-component vector of float, operation at mediump)
0:160 's2Dg' (uniform lowp sampler2D)
0:160 'uv2' (invariant uniform mediump 2-component vector of float)
0:160 'f13' (invariant global mediump float)
0:161 textureProjGrad (global lowp 4-component vector of float)
0:161 textureProjGrad (global lowp 4-component vector of float, operation at mediump)
0:161 's2Dg' (uniform lowp sampler2D)
0:161 Construct vec3 (temp mediump 3-component vector of float)
0:161 'f13' (invariant global mediump float)
0:161 'uv2' (invariant uniform mediump 2-component vector of float)
0:161 'uv2' (invariant uniform mediump 2-component vector of float)
0:162 textureGrad (global lowp 4-component vector of float)
0:162 textureGrad (global lowp 4-component vector of float, operation at mediump)
0:162 's2Dg' (uniform lowp sampler2D)
0:162 'uv2' (invariant uniform mediump 2-component vector of float)
0:162 'uv2' (invariant uniform mediump 2-component vector of float)
......@@ -579,7 +579,7 @@ ERROR: node is still EOpNull!
0:122 'sExt' (uniform lowp samplerExternalOES)
0:122 Construct vec3 (temp lowp 3-component vector of float)
0:122 'f13' (invariant global mediump float)
0:123 textureProj (global lowp 4-component vector of float)
0:123 textureProj (global lowp 4-component vector of float, operation at mediump)
0:123 'sExt' (uniform lowp samplerExternalOES)
0:123 direct index (smooth temp mediump 4-component vector of float)
0:123 'v' (smooth in 3-element array of mediump 4-component vector of float)
......@@ -616,7 +616,7 @@ ERROR: node is still EOpNull!
0:145 'a' (in mediump int)
0:145 'b' (in mediump float)
0:147 Sequence
0:147 textureProjGrad (global lowp 4-component vector of float)
0:147 textureProjGrad (global lowp 4-component vector of float, operation at mediump)
0:147 's2Dg' (uniform lowp sampler2D)
0:147 Construct vec3 (temp mediump 3-component vector of float)
0:147 'f13' (invariant global mediump float)
......@@ -637,17 +637,17 @@ ERROR: node is still EOpNull!
0:158 Function Definition: foo323433( (global void)
0:158 Function Parameters:
0:160 Sequence
0:160 textureLod (global lowp 4-component vector of float)
0:160 textureLod (global lowp 4-component vector of float, operation at mediump)
0:160 's2Dg' (uniform lowp sampler2D)
0:160 'uv2' (invariant uniform mediump 2-component vector of float)
0:160 'f13' (invariant global mediump float)
0:161 textureProjGrad (global lowp 4-component vector of float)
0:161 textureProjGrad (global lowp 4-component vector of float, operation at mediump)
0:161 's2Dg' (uniform lowp sampler2D)
0:161 Construct vec3 (temp mediump 3-component vector of float)
0:161 'f13' (invariant global mediump float)
0:161 'uv2' (invariant uniform mediump 2-component vector of float)
0:161 'uv2' (invariant uniform mediump 2-component vector of float)
0:162 textureGrad (global lowp 4-component vector of float)
0:162 textureGrad (global lowp 4-component vector of float, operation at mediump)
0:162 's2Dg' (uniform lowp sampler2D)
0:162 'uv2' (invariant uniform mediump 2-component vector of float)
0:162 'uv2' (invariant uniform mediump 2-component vector of float)
......
......@@ -175,7 +175,7 @@ ERROR: node is still EOpNull!
0:120 Sequence
0:120 move second child to first child (temp highp 2-component vector of int)
0:120 'x1' (temp highp 2-component vector of int)
0:120 textureSize (global highp 2-component vector of int)
0:120 textureSize (global highp 2-component vector of int, operation at lowp)
0:120 's2D' (uniform lowp sampler2D)
0:120 Constant:
0:120 2 (const int)
......@@ -184,7 +184,7 @@ ERROR: node is still EOpNull!
0:122 Sequence
0:122 move second child to first child (temp highp 3-component vector of int)
0:122 'x3' (temp highp 3-component vector of int)
0:122 textureSize (global highp 3-component vector of int)
0:122 textureSize (global highp 3-component vector of int, operation at lowp)
0:122 's2DAS' (uniform lowp sampler2DArrayShadow)
0:122 Constant:
0:122 -1 (const int)
......@@ -193,7 +193,7 @@ ERROR: node is still EOpNull!
0:124 Sequence
0:124 move second child to first child (temp highp 4-component vector of float)
0:124 'x4' (temp highp 4-component vector of float)
0:124 texture (global lowp 4-component vector of float)
0:124 texture (global lowp 4-component vector of float, operation at highp)
0:124 's2D' (uniform lowp sampler2D)
0:124 'c2D' (in highp 2-component vector of float)
0:125 Constant:
......@@ -217,7 +217,7 @@ ERROR: node is still EOpNull!
0:128 Sequence
0:128 move second child to first child (temp highp float)
0:128 'x6' (temp highp float)
0:128 textureProjGradOffset (global lowp float)
0:128 textureProjGradOffset (global lowp float, operation at highp)
0:128 's2DS' (uniform lowp sampler2DShadow)
0:128 'invIn' (invariant in highp 4-component vector of float)
0:128 Constant:
......@@ -459,7 +459,7 @@ ERROR: node is still EOpNull!
0:120 Sequence
0:120 move second child to first child (temp highp 2-component vector of int)
0:120 'x1' (temp highp 2-component vector of int)
0:120 textureSize (global highp 2-component vector of int)
0:120 textureSize (global highp 2-component vector of int, operation at lowp)
0:120 's2D' (uniform lowp sampler2D)
0:120 Constant:
0:120 2 (const int)
......@@ -468,7 +468,7 @@ ERROR: node is still EOpNull!
0:122 Sequence
0:122 move second child to first child (temp highp 3-component vector of int)
0:122 'x3' (temp highp 3-component vector of int)
0:122 textureSize (global highp 3-component vector of int)
0:122 textureSize (global highp 3-component vector of int, operation at lowp)
0:122 's2DAS' (uniform lowp sampler2DArrayShadow)
0:122 Constant:
0:122 -1 (const int)
......@@ -477,7 +477,7 @@ ERROR: node is still EOpNull!
0:124 Sequence
0:124 move second child to first child (temp highp 4-component vector of float)
0:124 'x4' (temp highp 4-component vector of float)
0:124 texture (global lowp 4-component vector of float)
0:124 texture (global lowp 4-component vector of float, operation at highp)
0:124 's2D' (uniform lowp sampler2D)
0:124 'c2D' (in highp 2-component vector of float)
0:125 Constant:
......@@ -501,7 +501,7 @@ ERROR: node is still EOpNull!
0:128 Sequence
0:128 move second child to first child (temp highp float)
0:128 'x6' (temp highp float)
0:128 textureProjGradOffset (global lowp float)
0:128 textureProjGradOffset (global lowp float, operation at highp)
0:128 's2DS' (uniform lowp sampler2DShadow)
0:128 'invIn' (invariant in highp 4-component vector of float)
0:128 Constant:
......
......@@ -128,12 +128,12 @@ ERROR: node is still EOpNull!
0:52 Sequence
0:52 move second child to first child (temp 2-component vector of bool)
0:52 'b10' (temp 2-component vector of bool)
0:52 isnan (global 2-component vector of bool)
0:52 isnan (global 2-component vector of bool, operation at mediump)
0:52 'v2a' (global mediump 2-component vector of float)
0:53 Sequence
0:53 move second child to first child (temp 4-component vector of bool)
0:53 'b11' (temp 4-component vector of bool)
0:53 isinf (global 4-component vector of bool)
0:53 isinf (global 4-component vector of bool, operation at mediump)
0:53 'v4' (global mediump 4-component vector of float)
0:56 Sequence
0:56 move second child to first child (temp highp int)
......@@ -158,17 +158,17 @@ ERROR: node is still EOpNull!
0:62 Sequence
0:62 move second child to first child (temp highp uint)
0:62 'u19' (temp mediump uint)
0:62 packSnorm2x16 (global highp uint)
0:62 packSnorm2x16 (global highp uint, operation at mediump)
0:62 'v2a' (global mediump 2-component vector of float)
0:63 Sequence
0:63 move second child to first child (temp mediump 2-component vector of float)
0:63 move second child to first child (temp highp 2-component vector of float)
0:63 'v20' (temp mediump 2-component vector of float)
0:63 unpackSnorm2x16 (global mediump 2-component vector of float)
0:63 unpackSnorm2x16 (global highp 2-component vector of float)
0:63 'uy' (global mediump uint)
0:64 Sequence
0:64 move second child to first child (temp highp uint)
0:64 'u15' (temp mediump uint)
0:64 packUnorm2x16 (global highp uint)
0:64 packUnorm2x16 (global highp uint, operation at mediump)
0:64 'v2a' (global mediump 2-component vector of float)
0:65 Sequence
0:65 move second child to first child (temp highp 2-component vector of float)
......@@ -178,12 +178,12 @@ ERROR: node is still EOpNull!
0:66 Sequence
0:66 move second child to first child (temp highp uint)
0:66 'u17' (temp mediump uint)
0:66 packHalf2x16 (global highp uint)
0:66 packHalf2x16 (global highp uint, operation at mediump)
0:66 'v2b' (global mediump 2-component vector of float)
0:67 Sequence
0:67 move second child to first child (temp mediump 2-component vector of float)
0:67 'v18' (temp mediump 2-component vector of float)
0:67 unpackHalf2x16 (global mediump 2-component vector of float)
0:67 unpackHalf2x16 (global mediump 2-component vector of float, operation at highp)
0:67 'uy' (global mediump uint)
0:70 Constant:
0:70 0.000000
......@@ -335,12 +335,12 @@ ERROR: node is still EOpNull!
0:52 Sequence
0:52 move second child to first child (temp 2-component vector of bool)
0:52 'b10' (temp 2-component vector of bool)
0:52 isnan (global 2-component vector of bool)
0:52 isnan (global 2-component vector of bool, operation at mediump)
0:52 'v2a' (global mediump 2-component vector of float)
0:53 Sequence
0:53 move second child to first child (temp 4-component vector of bool)
0:53 'b11' (temp 4-component vector of bool)
0:53 isinf (global 4-component vector of bool)
0:53 isinf (global 4-component vector of bool, operation at mediump)
0:53 'v4' (global mediump 4-component vector of float)
0:56 Sequence
0:56 move second child to first child (temp highp int)
......@@ -365,17 +365,17 @@ ERROR: node is still EOpNull!
0:62 Sequence
0:62 move second child to first child (temp highp uint)
0:62 'u19' (temp mediump uint)
0:62 packSnorm2x16 (global highp uint)
0:62 packSnorm2x16 (global highp uint, operation at mediump)
0:62 'v2a' (global mediump 2-component vector of float)
0:63 Sequence
0:63 move second child to first child (temp mediump 2-component vector of float)
0:63 move second child to first child (temp highp 2-component vector of float)
0:63 'v20' (temp mediump 2-component vector of float)
0:63 unpackSnorm2x16 (global mediump 2-component vector of float)
0:63 unpackSnorm2x16 (global highp 2-component vector of float)
0:63 'uy' (global mediump uint)
0:64 Sequence
0:64 move second child to first child (temp highp uint)
0:64 'u15' (temp mediump uint)
0:64 packUnorm2x16 (global highp uint)
0:64 packUnorm2x16 (global highp uint, operation at mediump)
0:64 'v2a' (global mediump 2-component vector of float)
0:65 Sequence
0:65 move second child to first child (temp highp 2-component vector of float)
......@@ -385,12 +385,12 @@ ERROR: node is still EOpNull!
0:66 Sequence
0:66 move second child to first child (temp highp uint)
0:66 'u17' (temp mediump uint)
0:66 packHalf2x16 (global highp uint)
0:66 packHalf2x16 (global highp uint, operation at mediump)
0:66 'v2b' (global mediump 2-component vector of float)
0:67 Sequence
0:67 move second child to first child (temp mediump 2-component vector of float)
0:67 'v18' (temp mediump 2-component vector of float)
0:67 unpackHalf2x16 (global mediump 2-component vector of float)
0:67 unpackHalf2x16 (global mediump 2-component vector of float, operation at highp)
0:67 'uy' (global mediump uint)
0:70 Constant:
0:70 0.000000
......
......@@ -122,7 +122,7 @@ ERROR: node is still EOpNull!
0:61 2 (const int)
0:61 Constant:
0:61 4.700000
0:62 array length (temp highp int)
0:62 array length (temp int)
0:62 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
0:62 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
0:62 Constant:
......@@ -178,9 +178,9 @@ ERROR: node is still EOpNull!
0:92 0 (const int)
0:92 0 (const int)
0:92 0 (const int)
0:93 imageLoad (global highp 4-component vector of float)
0:93 imageLoad (global mediump 4-component vector of float)
0:93 'img2Drgba' (layout(rgba32f ) readonly uniform mediump image2D)
0:93 Construct ivec2 (temp highp 2-component vector of int)
0:93 Construct ivec2 (temp mediump 2-component vector of int)
0:93 'i' (temp highp int)
0:93 'i' (temp highp int)
0:94 imageLoad (global highp 4-component vector of int)
......@@ -549,7 +549,7 @@ ERROR: node is still EOpNull!
0:61 2 (const int)
0:61 Constant:
0:61 4.700000
0:62 array length (temp highp int)
0:62 array length (temp int)
0:62 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
0:62 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
0:62 Constant:
......@@ -605,9 +605,9 @@ ERROR: node is still EOpNull!
0:92 0 (const int)
0:92 0 (const int)
0:92 0 (const int)
0:93 imageLoad (global highp 4-component vector of float)
0:93 imageLoad (global mediump 4-component vector of float)
0:93 'img2Drgba' (layout(rgba32f ) readonly uniform mediump image2D)
0:93 Construct ivec2 (temp highp 2-component vector of int)
0:93 Construct ivec2 (temp mediump 2-component vector of int)
0:93 'i' (temp highp int)
0:93 'i' (temp highp int)
0:94 imageLoad (global highp 4-component vector of int)
......
......@@ -353,7 +353,7 @@ ERROR: node is still EOpNull!
0:101 3 (const int)
0:102 move second child to first child (temp highp 2-component vector of int)
0:102 'v2' (temp highp 2-component vector of int)
0:102 textureSize (global highp 2-component vector of int)
0:102 textureSize (global highp 2-component vector of int, operation at mediump)
0:102 's2dms' (uniform mediump sampler2DMS)
0:103 move second child to first child (temp highp 2-component vector of int)
0:103 'v2' (temp highp 2-component vector of int)
......@@ -361,19 +361,19 @@ ERROR: node is still EOpNull!
0:103 'i2D' (layout(binding=2 ) writeonly uniform highp image2D)
0:104 move second child to first child (temp highp 3-component vector of int)
0:104 'v3' (temp highp 3-component vector of int)
0:104 imageQuerySize (global highp 3-component vector of int)
0:104 imageQuerySize (global highp 3-component vector of int, operation at mediump)
0:104 'i3D' (layout(binding=4 ) readonly uniform mediump image3D)
0:105 move second child to first child (temp highp 2-component vector of int)
0:105 'v2' (temp highp 2-component vector of int)
0:105 imageQuerySize (global highp 2-component vector of int)
0:105 imageQuerySize (global highp 2-component vector of int, operation at mediump)
0:105 'iCube' (layout(binding=5 ) uniform mediump imageCube)
0:106 move second child to first child (temp highp 3-component vector of int)
0:106 'v3' (temp highp 3-component vector of int)
0:106 imageQuerySize (global highp 3-component vector of int)
0:106 imageQuerySize (global highp 3-component vector of int, operation at mediump)
0:106 'i2DA' (layout(binding=6 ) uniform mediump image2DArray)
0:107 move second child to first child (temp highp 2-component vector of int)
0:107 'v2' (temp highp 2-component vector of int)
0:107 imageQuerySize (global highp 2-component vector of int)
0:107 imageQuerySize (global highp 2-component vector of int, operation at mediump)
0:107 'i2Dqualified' (layout(binding=6 ) coherent volatile restrict uniform mediump image2D)
0:165 Function Definition: fooIO( (global void)
0:165 Function Parameters:
......@@ -1234,7 +1234,7 @@ ERROR: node is still EOpNull!
0:101 3 (const int)
0:102 move second child to first child (temp highp 2-component vector of int)
0:102 'v2' (temp highp 2-component vector of int)
0:102 textureSize (global highp 2-component vector of int)
0:102 textureSize (global highp 2-component vector of int, operation at mediump)
0:102 's2dms' (uniform mediump sampler2DMS)
0:103 move second child to first child (temp highp 2-component vector of int)
0:103 'v2' (temp highp 2-component vector of int)
......@@ -1242,19 +1242,19 @@ ERROR: node is still EOpNull!
0:103 'i2D' (layout(binding=2 ) writeonly uniform highp image2D)
0:104 move second child to first child (temp highp 3-component vector of int)
0:104 'v3' (temp highp 3-component vector of int)
0:104 imageQuerySize (global highp 3-component vector of int)
0:104 imageQuerySize (global highp 3-component vector of int, operation at mediump)
0:104 'i3D' (layout(binding=4 ) readonly uniform mediump image3D)
0:105 move second child to first child (temp highp 2-component vector of int)
0:105 'v2' (temp highp 2-component vector of int)
0:105 imageQuerySize (global highp 2-component vector of int)
0:105 imageQuerySize (global highp 2-component vector of int, operation at mediump)
0:105 'iCube' (layout(binding=5 ) uniform mediump imageCube)
0:106 move second child to first child (temp highp 3-component vector of int)
0:106 'v3' (temp highp 3-component vector of int)
0:106 imageQuerySize (global highp 3-component vector of int)
0:106 imageQuerySize (global highp 3-component vector of int, operation at mediump)
0:106 'i2DA' (layout(binding=6 ) uniform mediump image2DArray)
0:107 move second child to first child (temp highp 2-component vector of int)
0:107 'v2' (temp highp 2-component vector of int)
0:107 imageQuerySize (global highp 2-component vector of int)
0:107 imageQuerySize (global highp 2-component vector of int, operation at mediump)
0:107 'i2Dqualified' (layout(binding=6 ) coherent volatile restrict uniform mediump image2D)
0:165 Function Definition: fooIO( (global void)
0:165 Function Parameters:
......
......@@ -310,7 +310,7 @@ ERROR: node is still EOpNull!
0:96 1 (const int)
0:98 Constant:
0:98 7 (const int)
0:99 array length (temp highp int)
0:99 array length (temp int)
0:99 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float)
0:99 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
0:99 'name3' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
......@@ -622,7 +622,7 @@ ERROR: node is still EOpNull!
0:96 1 (const int)
0:98 Constant:
0:98 7 (const int)
0:99 array length (temp highp int)
0:99 array length (temp int)
0:99 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float)
0:99 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
0:99 'name3' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
......
hlsl.semicolons.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:4 Function Definition: MyFunc( (global void)
0:2 Function Parameters:
0:8 Function Definition: MyFunc2( (global void)
0:8 Function Parameters:
0:18 Function Definition: main( (global structure{temp 4-component vector of float color})
0:13 Function Parameters:
0:? Sequence
0:16 move second child to first child (temp 4-component vector of float)
0:16 color: direct index for structure (temp 4-component vector of float)
0:16 'ps_output' (temp structure{temp 4-component vector of float color})
0:16 Constant:
0:16 0 (const int)
0:16 Constant:
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:17 Branch: Return with expression
0:17 'ps_output' (temp structure{temp 4-component vector of float color})
0:? Linker Objects
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:4 Function Definition: MyFunc( (global void)
0:2 Function Parameters:
0:8 Function Definition: MyFunc2( (global void)
0:8 Function Parameters:
0:18 Function Definition: main( (global structure{temp 4-component vector of float color})
0:13 Function Parameters:
0:? Sequence
0:16 move second child to first child (temp 4-component vector of float)
0:16 color: direct index for structure (temp 4-component vector of float)
0:16 'ps_output' (temp structure{temp 4-component vector of float color})
0:16 Constant:
0:16 0 (const int)
0:16 Constant:
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:17 Branch: Return with expression
0:17 'ps_output' (temp structure{temp 4-component vector of float color})
0:? Linker Objects
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 23
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginUpperLeft
Source HLSL 450
Name 4 "main"
Name 6 "MyFunc("
Name 8 "MyFunc2("
Name 12 "PS_OUTPUT"
MemberName 12(PS_OUTPUT) 0 "color"
Name 14 "ps_output"
2: TypeVoid
3: TypeFunction 2
10: TypeFloat 32
11: TypeVector 10(float) 4
12(PS_OUTPUT): TypeStruct 11(fvec4)
13: TypePointer Function 12(PS_OUTPUT)
15: TypeInt 32 1
16: 15(int) Constant 0
17: 10(float) Constant 1065353216
18: 11(fvec4) ConstantComposite 17 17 17 17
19: TypePointer Function 11(fvec4)
4(main): 2 Function None 3
5: Label
14(ps_output): 13(ptr) Variable Function
20: 19(ptr) AccessChain 14(ps_output) 16
Store 20 18
21:12(PS_OUTPUT) Load 14(ps_output)
ReturnValue 21
FunctionEnd
6(MyFunc(): 2 Function None 3
7: Label
Return
FunctionEnd
8(MyFunc2(): 2 Function None 3
9: Label
Return
FunctionEnd
......@@ -14,7 +14,7 @@ Shader version: 100
0:9 true case
0:10 move second child to first child (temp highp 4-component vector of float)
0:10 'color' (temp highp 4-component vector of float)
0:10 texture (global lowp 4-component vector of float)
0:10 texture (global lowp 4-component vector of float, operation at mediump)
0:10 'sampler' (uniform lowp sampler2D)
0:10 'gl_PointCoord' (gl_PointCoord mediump 2-component vector of float PointCoord)
0:9 false case
......@@ -50,7 +50,7 @@ Shader version: 100
0:9 true case
0:10 move second child to first child (temp highp 4-component vector of float)
0:10 'color' (temp highp 4-component vector of float)
0:10 texture (global lowp 4-component vector of float)
0:10 texture (global lowp 4-component vector of float, operation at mediump)
0:10 'sampler' (uniform lowp sampler2D)
0:10 'gl_PointCoord' (gl_PointCoord mediump 2-component vector of float PointCoord)
0:9 false case
......
......@@ -113,7 +113,7 @@ ERROR: node is still EOpNull!
0:55 true case
0:56 move second child to first child (temp mediump 4-component vector of uint)
0:56 'c' (out mediump 4-component vector of uint)
0:56 texture (global lowp 4-component vector of uint)
0:56 texture (global lowp 4-component vector of uint, operation at highp)
0:56 'usampler' (uniform lowp usampler2D)
0:56 'tc' (smooth in highp 2-component vector of float)
0:57 Test condition and select (temp void)
......@@ -124,7 +124,7 @@ ERROR: node is still EOpNull!
0:57 true case
0:58 move second child to first child (temp mediump 4-component vector of uint)
0:58 'c' (out mediump 4-component vector of uint)
0:58 texture (global lowp 4-component vector of uint)
0:58 texture (global lowp 4-component vector of uint, operation at highp)
0:58 'usampler' (uniform lowp usampler2D)
0:58 add (temp highp 2-component vector of float)
0:58 'tc' (smooth in highp 2-component vector of float)
......@@ -139,7 +139,7 @@ ERROR: node is still EOpNull!
0:59 true case
0:60 move second child to first child (temp mediump 4-component vector of uint)
0:60 'c' (out mediump 4-component vector of uint)
0:60 texture (global lowp 4-component vector of uint)
0:60 texture (global lowp 4-component vector of uint, operation at highp)
0:60 'usampler' (uniform lowp usampler2D)
0:60 subtract (temp highp 2-component vector of float)
0:60 'tc' (smooth in highp 2-component vector of float)
......@@ -412,7 +412,7 @@ ERROR: node is still EOpNull!
0:55 true case
0:56 move second child to first child (temp mediump 4-component vector of uint)
0:56 'c' (out mediump 4-component vector of uint)
0:56 texture (global lowp 4-component vector of uint)
0:56 texture (global lowp 4-component vector of uint, operation at highp)
0:56 'usampler' (uniform lowp usampler2D)
0:56 'tc' (smooth in highp 2-component vector of float)
0:57 Test condition and select (temp void)
......@@ -423,7 +423,7 @@ ERROR: node is still EOpNull!
0:57 true case
0:58 move second child to first child (temp mediump 4-component vector of uint)
0:58 'c' (out mediump 4-component vector of uint)
0:58 texture (global lowp 4-component vector of uint)
0:58 texture (global lowp 4-component vector of uint, operation at highp)
0:58 'usampler' (uniform lowp usampler2D)
0:58 add (temp highp 2-component vector of float)
0:58 'tc' (smooth in highp 2-component vector of float)
......@@ -438,7 +438,7 @@ ERROR: node is still EOpNull!
0:59 true case
0:60 move second child to first child (temp mediump 4-component vector of uint)
0:60 'c' (out mediump 4-component vector of uint)
0:60 texture (global lowp 4-component vector of uint)
0:60 texture (global lowp 4-component vector of uint, operation at highp)
0:60 'usampler' (uniform lowp usampler2D)
0:60 subtract (temp highp 2-component vector of float)
0:60 'tc' (smooth in highp 2-component vector of float)
......
void MyFunc() { }
;;;
;
; ; ; // HLSL allows stray global scope semicolons.
void MyFunc2() {;;;};
struct PS_OUTPUT { float4 color : SV_Target0; };;;;;
;PS_OUTPUT main()
{
PS_OUTPUT ps_output;;;
;
ps_output.color = 1.0;
return ps_output;
};
......@@ -461,6 +461,9 @@ enum TOperator {
EOpTextureQueryLod,
EOpTextureQueryLevels,
EOpTextureQuerySamples,
EOpSamplingGuardBegin,
EOpTexture,
EOpTextureProj,
EOpTextureLod,
......@@ -503,7 +506,7 @@ enum TOperator {
EOpSparseTextureGradOffsetClamp,
EOpSparseTextureGuardEnd,
EOpSamplingGuardEnd,
EOpTextureGuardEnd,
//
......@@ -799,11 +802,27 @@ public:
virtual bool promote() { return true; }
bool modifiesState() const;
bool isConstructor() const;
bool isTexture() const { return op > EOpTextureGuardBegin && op < EOpTextureGuardEnd; }
bool isImage() const { return op > EOpImageGuardBegin && op < EOpImageGuardEnd; }
bool isTexture() const { return op > EOpTextureGuardBegin && op < EOpTextureGuardEnd; }
bool isSampling() const { return op > EOpSamplingGuardBegin && op < EOpSamplingGuardEnd; }
bool isImage() const { return op > EOpImageGuardBegin && op < EOpImageGuardEnd; }
bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; }
bool isSparseImage() const { return op == EOpSparseImageLoad; }
void setOperationPrecision(TPrecisionQualifier p) { operationPrecision = p; }
TPrecisionQualifier getOperationPrecision() const { return operationPrecision != EpqNone ?
operationPrecision :
type.getQualifier().precision; }
TString getCompleteString() const
{
TString cs = type.getCompleteString();
if (getOperationPrecision() != type.getQualifier().precision) {
cs += ", operation at ";
cs += GetPrecisionQualifierString(getOperationPrecision());
}
return cs;
}
// Crack the op into the individual dimensions of texturing operation.
void crackTexture(TSampler sampler, TCrackedTextureOp& cracked) const
{
......@@ -935,9 +954,15 @@ public:
}
protected:
TIntermOperator(TOperator o) : TIntermTyped(EbtFloat), op(o) {}
TIntermOperator(TOperator o, TType& t) : TIntermTyped(t), op(o) {}
TIntermOperator(TOperator o) : TIntermTyped(EbtFloat), op(o), operationPrecision(EpqNone) {}
TIntermOperator(TOperator o, TType& t) : TIntermTyped(t), op(o), operationPrecision(EpqNone) {}
TOperator op;
// The result precision is in the inherited TType, and is usually meant to be both
// the operation precision and the result precision. However, some more complex things,
// like built-in function calls, distinguish between the two, in which case non-EqpNone
// 'operationPrecision' overrides the result precision as far as operation precision
// is concerned.
TPrecisionQualifier operationPrecision;
};
//
......
......@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "SPIRV99.1375"
#define GLSLANG_DATE "31-Jul-2016"
#define GLSLANG_REVISION "SPIRV99.1377"
#define GLSLANG_DATE "02-Aug-2016"
......@@ -341,35 +341,11 @@ TIntermTyped* TIntermediate::addBuiltInFunctionCall(const TSourceLoc& loc, TOper
node->setOperand(child);
node->setType(returnType);
// propagate precision up from child
if (profile == EEsProfile && returnType.getQualifier().precision == EpqNone && returnType.getBasicType() != EbtBool)
node->getQualifier().precision = child->getQualifier().precision;
// propagate precision down to child
if (node->getQualifier().precision != EpqNone)
child->propagatePrecision(node->getQualifier().precision);
return node;
} else {
// setAggregateOperater() calls fold() for constant folding
TIntermTyped* node = setAggregateOperator(childNode, op, returnType, loc);
// if not folded, we'll still have an aggregate node to propagate precision with
if (node->getAsAggregate()) {
TPrecisionQualifier correctPrecision = returnType.getQualifier().precision;
if (correctPrecision == EpqNone && profile == EEsProfile) {
// find the maximum precision from the arguments, for the built-in's return precision
TIntermSequence& sequence = node->getAsAggregate()->getSequence();
for (unsigned int arg = 0; arg < sequence.size(); ++arg)
correctPrecision = std::max(correctPrecision, sequence[arg]->getAsTyped()->getQualifier().precision);
}
// Propagate precision through this node and its children. That algorithm stops
// when a precision is found, so start by clearing this subroot precision
node->getQualifier().precision = EpqNone;
node->propagatePrecision(correctPrecision);
}
return node;
}
}
......
......@@ -1078,17 +1078,16 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
{
TIntermTyped* result = nullptr;
TOperator op = function->getBuiltInOp();
if (op == EOpArrayLength)
if (function->getBuiltInOp() == EOpArrayLength)
result = handleLengthMethod(loc, function, arguments);
else if (op != EOpNull) {
else if (function->getBuiltInOp() != EOpNull) {
//
// Then this should be a constructor.
// Don't go through the symbol table for constructors.
// Their parameters will be verified algorithmically.
//
TType type(EbtVoid); // use this to get the type back
if (! constructorError(loc, arguments, *function, op, type)) {
if (! constructorError(loc, arguments, *function, function->getBuiltInOp(), type)) {
//
// It's a constructor, of type 'type'.
//
......@@ -1149,18 +1148,9 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
addInputArgumentConversions(*fnCandidate, arguments); // arguments may be modified if it's just a single argument node
}
op = fnCandidate->getBuiltInOp();
if (builtIn && op != EOpNull) {
if (builtIn && fnCandidate->getBuiltInOp() != EOpNull) {
// A function call mapped to a built-in operation.
checkLocation(loc, op);
result = intermediate.addBuiltInFunctionCall(loc, op, fnCandidate->getParamCount() == 1, arguments, fnCandidate->getType());
if (result == nullptr) {
error(arguments->getLoc(), " wrong operand type", "Internal Error",
"built in unary operator function. Type: %s",
static_cast<TIntermTyped*>(arguments)->getCompleteString().c_str());
} else if (result->getAsOperator()) {
builtInOpCheck(loc, *fnCandidate, *result->getAsOperator());
}
result = handleBuiltInFunctionCall(loc, *arguments, *fnCandidate);
} else {
// This is a function call not mapped to built-in operator.
// It could still be a built-in function, but only if PureOperatorBuiltins == false.
......@@ -1207,6 +1197,118 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
return result;
}
TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNode& arguments,
const TFunction& function)
{
checkLocation(loc, function.getBuiltInOp());
TIntermTyped *result = intermediate.addBuiltInFunctionCall(loc, function.getBuiltInOp(),
function.getParamCount() == 1,
&arguments, function.getType());
computeBuiltinPrecisions(*result, function);
if (result == nullptr) {
error(arguments.getLoc(), " wrong operand type", "Internal Error",
"built in unary operator function. Type: %s",
static_cast<TIntermTyped*>(&arguments)->getCompleteString().c_str());
} else if (result->getAsOperator())
builtInOpCheck(loc, function, *result->getAsOperator());
return result;
}
// "The operation of a built-in function can have a different precision
// qualification than the precision qualification of the resulting value.
// These two precision qualifications are established as follows.
//
// The precision qualification of the operation of a built-in function is
// based on the precision qualification of its input arguments and formal
// parameters: When a formal parameter specifies a precision qualifier,
// that is used, otherwise, the precision qualification of the calling
// argument is used. The highest precision of these will be the precision
// qualification of the operation of the built-in function. Generally,
// this is applied across all arguments to a built-in function, with the
// exceptions being:
// - bitfieldExtract and bitfieldInsert ignore the 'offset' and 'bits'
// arguments.
// - interpolateAt* functions only look at the 'interpolant' argument.
//
// The precision qualification of the result of a built-in function is
// determined in one of the following ways:
//
// - For the texture sampling, image load, and image store functions,
// the precision of the return type matches the precision of the
// sampler type
//
// Otherwise:
//
// - For prototypes that do not specify a resulting precision qualifier,
// the precision will be the same as the precision of the operation.
//
// - For prototypes that do specify a resulting precision qualifier,
// the specified precision qualifier is the precision qualification of
// the result."
//
void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction& function)
{
TPrecisionQualifier operationPrecision = EpqNone;
TPrecisionQualifier resultPrecision = EpqNone;
if (profile != EEsProfile)
return;
TIntermOperator* opNode = node.getAsOperator();
if (opNode == nullptr)
return;
if (TIntermUnary* unaryNode = node.getAsUnaryNode()) {
operationPrecision = std::max(function[0].type->getQualifier().precision,
unaryNode->getOperand()->getType().getQualifier().precision);
if (function.getType().getBasicType() != EbtBool)
resultPrecision = function.getType().getQualifier().precision == EpqNone ?
operationPrecision :
function.getType().getQualifier().precision;
} else if (TIntermAggregate* agg = node.getAsAggregate()) {
TIntermSequence& sequence = agg->getSequence();
int numArgs = (int)sequence.size();
switch (agg->getOp()) {
case EOpBitfieldExtract:
numArgs = 1;
break;
case EOpBitfieldInsert:
numArgs = 2;
break;
case EOpInterpolateAtCentroid:
case EOpInterpolateAtOffset:
case EOpInterpolateAtSample:
numArgs = 1;
break;
default:
break;
}
// find the maximum precision from the arguments and parameters
for (unsigned int arg = 0; arg < sequence.size(); ++arg) {
operationPrecision = std::max(operationPrecision, sequence[arg]->getAsTyped()->getQualifier().precision);
operationPrecision = std::max(operationPrecision, function[arg].type->getQualifier().precision);
}
// compute the result precision
if (agg->isSampling() || agg->getOp() == EOpImageLoad || agg->getOp() == EOpImageStore)
resultPrecision = sequence[0]->getAsTyped()->getQualifier().precision;
else if (function.getType().getBasicType() != EbtBool)
resultPrecision = function.getType().getQualifier().precision == EpqNone ?
operationPrecision :
function.getType().getQualifier().precision;
}
// Propagate precision through this node and its children. That algorithm stops
// when a precision is found, so start by clearing this subroot precision
opNode->getQualifier().precision = EpqNone;
if (operationPrecision != EpqNone) {
opNode->propagatePrecision(operationPrecision);
opNode->setOperationPrecision(operationPrecision);
}
// Now, set the result precision, which might not match
opNode->getQualifier().precision = resultPrecision;
}
TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermTyped* value)
{
functionReturnsValue = true;
......@@ -1433,11 +1535,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
}
const TIntermSequence& aggArgs = *argp; // only valid when unaryArg is nullptr
// built-in texturing functions get their return value precision from the precision of the sampler
if (fnCandidate.getType().getQualifier().precision == EpqNone &&
fnCandidate.getParamCount() > 0 && fnCandidate[0].type->getBasicType() == EbtSampler)
callNode.getQualifier().precision = arg0->getQualifier().precision;
switch (callNode.getOp()) {
case EOpTextureGather:
case EOpTextureGatherOffset:
......@@ -1569,11 +1666,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
case EOpInterpolateAtCentroid:
case EOpInterpolateAtSample:
case EOpInterpolateAtOffset:
// "For the interpolateAt* functions, the call will return a precision
// qualification matching the precision of the 'interpolant' argument to
// the function call."
callNode.getQualifier().precision = arg0->getQualifier().precision;
// Make sure the first argument is an interpolant, or an array element of an interpolant
if (arg0->getType().getQualifier().storage != EvqVaryingIn) {
// It might still be an array element.
......
......@@ -197,6 +197,8 @@ public:
TFunction* handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype);
TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&);
TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*);
TIntermTyped* handleBuiltInFunctionCall(TSourceLoc, TIntermNode& arguments, const TFunction& function);
void computeBuiltinPrecisions(TIntermTyped&, const TFunction&);
TIntermNode* handleReturnValue(const TSourceLoc&, TIntermTyped*);
void checkLocation(const TSourceLoc&, TOperator);
TIntermTyped* handleLengthMethod(const TSourceLoc&, TFunction*, TIntermNode*);
......
......@@ -143,6 +143,7 @@ INSTANTIATE_TEST_CASE_P(
{"hlsl.samplelevel.basic.dx10.vert", "main"},
{"hlsl.samplelevel.offset.dx10.frag", "main"},
{"hlsl.samplelevel.offsetarray.dx10.frag", "main"},
{"hlsl.semicolons.frag", "main"},
{"hlsl.shapeConv.frag", "main"},
{"hlsl.intrinsics.vert", "VertexShaderFunction"},
{"hlsl.matType.frag", "PixelShaderFunction"},
......
......@@ -89,12 +89,17 @@ bool HlslGrammar::acceptIdentifier(HlslToken& idToken)
// compilationUnit
// : list of externalDeclaration
// | SEMICOLONS
//
bool HlslGrammar::acceptCompilationUnit()
{
TIntermNode* unitNode = nullptr;
while (! peekTokenClass(EHTokNone)) {
// HLSL allows semicolons between global declarations, e.g, between functions.
if (acceptTokenClass(EHTokSemicolon))
continue;
// externalDeclaration
TIntermNode* declarationNode;
if (! acceptDeclaration(declarationNode))
......
......@@ -634,7 +634,7 @@ TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TInt
if (fields.num == 1) {
TIntermTyped* index = intermediate.addConstantUnion(fields.offsets[0], loc);
result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision));
result->setType(TType(base->getBasicType(), EvqTemporary));
} else {
TString vectorString = field;
TIntermTyped* index = intermediate.addSwizzle(fields, loc);
......@@ -1953,11 +1953,6 @@ void HlslParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fn
}
const TIntermSequence& aggArgs = *argp; // only valid when unaryArg is nullptr
// built-in texturing functions get their return value precision from the precision of the sampler
if (fnCandidate.getType().getQualifier().precision == EpqNone &&
fnCandidate.getParamCount() > 0 && fnCandidate[0].type->getBasicType() == EbtSampler)
callNode.getQualifier().precision = arg0->getQualifier().precision;
switch (callNode.getOp()) {
case EOpTextureGather:
case EOpTextureGatherOffset:
......@@ -2060,11 +2055,6 @@ void HlslParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fn
case EOpInterpolateAtCentroid:
case EOpInterpolateAtSample:
case EOpInterpolateAtOffset:
// "For the interpolateAt* functions, the call will return a precision
// qualification matching the precision of the 'interpolant' argument to
// the function call."
callNode.getQualifier().precision = arg0->getQualifier().precision;
// Make sure the first argument is an interpolant, or an array element of an interpolant
if (arg0->getType().getQualifier().storage != EvqVaryingIn) {
// It might still be an array element.
......@@ -2580,10 +2570,6 @@ void HlslParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, c
else if (src.storage != EvqTemporary && src.storage != EvqGlobal)
error(loc, "too many storage qualifiers", GetStorageQualifierString(src.storage), "");
// Precision qualifiers
if (dst.precision == EpqNone || (force && src.precision != EpqNone))
dst.precision = src.precision;
// Layout qualifiers
mergeObjectLayoutQualifiers(dst, src, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment