GLSL output: Removed fixed-size buffer; fixes #769.
Makes some white-space differences in most output, plus a few cases where more could have been put out but was cut short by the previous fix-sized buffer.
This commit is contained in:
@@ -64,7 +64,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:47 3.000000
|
0:47 3.000000
|
||||||
0:49 move second child to first child ( temp 4-component vector of float)
|
0:49 move second child to first child ( temp 4-component vector of float)
|
||||||
0:49 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
|
0:49 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
|
||||||
0:49 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, ...})
|
0:49 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||||
0:49 Constant:
|
0:49 Constant:
|
||||||
0:49 0 (const uint)
|
0:49 0 (const uint)
|
||||||
0:49 Construct vec4 ( temp 4-component vector of float)
|
0:49 Construct vec4 ( temp 4-component vector of float)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ gl_FragCoord origin is upper left
|
|||||||
0:31 Constant:
|
0:31 Constant:
|
||||||
0:31 0 (const uint)
|
0:31 0 (const uint)
|
||||||
0:31 v4: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
0:31 v4: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||||
0:31 'anon@3' (layout(binding=8 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v4, layout(row_major std430 offset=48 ) buffer int i4, layout(row_major std430 offset=60 ) buffer float f1, layout(row_major std430 offset=64 ) buffer float f3, layout(row_major std430 offset=68 ) buffer float f4, layout(row_major std430 offset=72 ) buffer float f5, layout(row_major std430 ) buffer float f6, layout(row_major std430 ) buffer float f7, layout(row_major std430 ) buffer 3X4 matrix of float m1, layout(column_major std430 ) buffer 3X4 matrix of float m2, layout(row_major std430 ) buffer 3X4 matrix of float m3, ...})
|
0:31 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||||
0:31 Constant:
|
0:31 Constant:
|
||||||
0:31 0 (const uint)
|
0:31 0 (const uint)
|
||||||
0:30 Function Definition: PixelShaderFunction( ( temp void)
|
0:30 Function Definition: PixelShaderFunction( ( temp void)
|
||||||
@@ -42,7 +42,7 @@ gl_FragCoord origin is upper left
|
|||||||
0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1})
|
0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1})
|
||||||
0:? 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
0:? 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
||||||
0:? 'anon@2' (layout( set=10 binding=2 row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3})
|
0:? 'anon@2' (layout( set=10 binding=2 row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3})
|
||||||
0:? 'anon@3' (layout(binding=8 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v4, layout(row_major std430 offset=48 ) buffer int i4, layout(row_major std430 offset=60 ) buffer float f1, layout(row_major std430 offset=64 ) buffer float f3, layout(row_major std430 offset=68 ) buffer float f4, layout(row_major std430 offset=72 ) buffer float f5, layout(row_major std430 ) buffer float f6, layout(row_major std430 ) buffer float f7, layout(row_major std430 ) buffer 3X4 matrix of float m1, layout(column_major std430 ) buffer 3X4 matrix of float m2, layout(row_major std430 ) buffer 3X4 matrix of float m3, ...})
|
0:? 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||||
0:? 'input' (layout( location=0) in 4-component vector of float)
|
0:? 'input' (layout( location=0) in 4-component vector of float)
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ gl_FragCoord origin is upper left
|
|||||||
0:31 Constant:
|
0:31 Constant:
|
||||||
0:31 0 (const uint)
|
0:31 0 (const uint)
|
||||||
0:31 v4: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
0:31 v4: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||||
0:31 'anon@3' (layout(binding=8 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v4, layout(row_major std430 offset=48 ) buffer int i4, layout(row_major std430 offset=60 ) buffer float f1, layout(row_major std430 offset=64 ) buffer float f3, layout(row_major std430 offset=68 ) buffer float f4, layout(row_major std430 offset=72 ) buffer float f5, layout(row_major std430 ) buffer float f6, layout(row_major std430 ) buffer float f7, layout(row_major std430 ) buffer 3X4 matrix of float m1, layout(column_major std430 ) buffer 3X4 matrix of float m2, layout(row_major std430 ) buffer 3X4 matrix of float m3, ...})
|
0:31 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||||
0:31 Constant:
|
0:31 Constant:
|
||||||
0:31 0 (const uint)
|
0:31 0 (const uint)
|
||||||
0:30 Function Definition: PixelShaderFunction( ( temp void)
|
0:30 Function Definition: PixelShaderFunction( ( temp void)
|
||||||
@@ -93,7 +93,7 @@ gl_FragCoord origin is upper left
|
|||||||
0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1})
|
0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1})
|
||||||
0:? 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
0:? 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
||||||
0:? 'anon@2' (layout( set=10 binding=2 row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3})
|
0:? 'anon@2' (layout( set=10 binding=2 row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3})
|
||||||
0:? 'anon@3' (layout(binding=8 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v4, layout(row_major std430 offset=48 ) buffer int i4, layout(row_major std430 offset=60 ) buffer float f1, layout(row_major std430 offset=64 ) buffer float f3, layout(row_major std430 offset=68 ) buffer float f4, layout(row_major std430 offset=72 ) buffer float f5, layout(row_major std430 ) buffer float f6, layout(row_major std430 ) buffer float f7, layout(row_major std430 ) buffer 3X4 matrix of float m1, layout(column_major std430 ) buffer 3X4 matrix of float m2, layout(row_major std430 ) buffer 3X4 matrix of float m3, ...})
|
0:? 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||||
0:? 'input' (layout( location=0) in 4-component vector of float)
|
0:? 'input' (layout( location=0) in 4-component vector of float)
|
||||||
|
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'b2' (layout( binding=2) uniform atomic_uint)
|
0:? 'b2' (layout( binding=2) uniform atomic_uint)
|
||||||
0:? 'c2' (layout( binding=3) uniform atomic_uint)
|
0:? 'c2' (layout( binding=3) uniform atomic_uint)
|
||||||
0:? 'd2' (layout( binding=2) uniform atomic_uint)
|
0:? 'd2' (layout( binding=2) uniform atomic_uint)
|
||||||
0:? 'anon@5' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, flat out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, ...})
|
0:? 'anon@5' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, flat out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
||||||
0:? 'ColorInv' ( smooth out 3-component vector of float)
|
0:? 'ColorInv' ( smooth out 3-component vector of float)
|
||||||
0:? 'Color4' ( invariant centroid smooth out 3-component vector of float)
|
0:? 'Color4' ( invariant centroid smooth out 3-component vector of float)
|
||||||
0:? 'position' ( noContraction smooth out 4-component vector of float)
|
0:? 'position' ( noContraction smooth out 4-component vector of float)
|
||||||
|
|||||||
@@ -1582,10 +1582,11 @@ public:
|
|||||||
|
|
||||||
TString getCompleteString() const
|
TString getCompleteString() const
|
||||||
{
|
{
|
||||||
const int maxSize = GlslangMaxTypeLength;
|
TString typeString;
|
||||||
char buf[maxSize];
|
|
||||||
char* p = &buf[0];
|
const auto appendStr = [&](const char* s) { typeString.append(s); };
|
||||||
char* end = &buf[maxSize];
|
const auto appendUint = [&](unsigned int u) { typeString.append(std::to_string(u).c_str()); };
|
||||||
|
const auto appendInt = [&](int i) { typeString.append(std::to_string(i).c_str()); };
|
||||||
|
|
||||||
if (qualifier.hasLayout()) {
|
if (qualifier.hasLayout()) {
|
||||||
// To reduce noise, skip this if the only layout is an xfb_buffer
|
// To reduce noise, skip this if the only layout is an xfb_buffer
|
||||||
@@ -1593,137 +1594,175 @@ public:
|
|||||||
TQualifier noXfbBuffer = qualifier;
|
TQualifier noXfbBuffer = qualifier;
|
||||||
noXfbBuffer.layoutXfbBuffer = TQualifier::layoutXfbBufferEnd;
|
noXfbBuffer.layoutXfbBuffer = TQualifier::layoutXfbBufferEnd;
|
||||||
if (noXfbBuffer.hasLayout()) {
|
if (noXfbBuffer.hasLayout()) {
|
||||||
p += snprintf(p, end - p, "layout(");
|
appendStr("layout(");
|
||||||
if (qualifier.hasAnyLocation()) {
|
if (qualifier.hasAnyLocation()) {
|
||||||
p += snprintf(p, end - p, "location=%d ", qualifier.layoutLocation);
|
appendStr(" location=");
|
||||||
if (qualifier.hasComponent())
|
appendUint(qualifier.layoutLocation);
|
||||||
p += snprintf(p, end - p, "component=%d ", qualifier.layoutComponent);
|
if (qualifier.hasComponent()) {
|
||||||
if (qualifier.hasIndex())
|
appendStr(" component=");
|
||||||
p += snprintf(p, end - p, "index=%d ", qualifier.layoutIndex);
|
appendUint(qualifier.layoutComponent);
|
||||||
|
}
|
||||||
|
if (qualifier.hasIndex()) {
|
||||||
|
appendStr(" index=");
|
||||||
|
appendUint(qualifier.layoutIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (qualifier.hasSet()) {
|
||||||
|
appendStr(" set=");
|
||||||
|
appendUint(qualifier.layoutSet);
|
||||||
|
}
|
||||||
|
if (qualifier.hasBinding()) {
|
||||||
|
appendStr(" binding=");
|
||||||
|
appendUint(qualifier.layoutBinding);
|
||||||
|
}
|
||||||
|
if (qualifier.hasStream()) {
|
||||||
|
appendStr(" stream=");
|
||||||
|
appendUint(qualifier.layoutStream);
|
||||||
|
}
|
||||||
|
if (qualifier.hasMatrix()) {
|
||||||
|
appendStr(" ");
|
||||||
|
appendStr(TQualifier::getLayoutMatrixString(qualifier.layoutMatrix));
|
||||||
|
}
|
||||||
|
if (qualifier.hasPacking()) {
|
||||||
|
appendStr(" ");
|
||||||
|
appendStr(TQualifier::getLayoutPackingString(qualifier.layoutPacking));
|
||||||
|
}
|
||||||
|
if (qualifier.hasOffset()) {
|
||||||
|
appendStr(" offset=");
|
||||||
|
appendInt(qualifier.layoutOffset);
|
||||||
|
}
|
||||||
|
if (qualifier.hasAlign()) {
|
||||||
|
appendStr(" align=");
|
||||||
|
appendInt(qualifier.layoutAlign);
|
||||||
|
}
|
||||||
|
if (qualifier.hasFormat()) {
|
||||||
|
appendStr(" ");
|
||||||
|
appendStr(TQualifier::getLayoutFormatString(qualifier.layoutFormat));
|
||||||
|
}
|
||||||
|
if (qualifier.hasXfbBuffer() && qualifier.hasXfbOffset()) {
|
||||||
|
appendStr(" xfb_buffer=");
|
||||||
|
appendUint(qualifier.layoutXfbBuffer);
|
||||||
|
}
|
||||||
|
if (qualifier.hasXfbOffset()) {
|
||||||
|
appendStr(" xfb_offset=");
|
||||||
|
appendUint(qualifier.layoutXfbOffset);
|
||||||
|
}
|
||||||
|
if (qualifier.hasXfbStride()) {
|
||||||
|
appendStr(" xfb_stride=");
|
||||||
|
appendUint(qualifier.layoutXfbStride);
|
||||||
|
}
|
||||||
|
if (qualifier.hasAttachment()) {
|
||||||
|
appendStr(" input_attachment_index=");
|
||||||
|
appendUint(qualifier.layoutAttachment);
|
||||||
|
}
|
||||||
|
if (qualifier.hasSpecConstantId()) {
|
||||||
|
appendStr(" constant_id=");
|
||||||
|
appendUint(qualifier.layoutSpecConstantId);
|
||||||
}
|
}
|
||||||
if (qualifier.hasSet())
|
|
||||||
p += snprintf(p, end - p, "set=%d ", qualifier.layoutSet);
|
|
||||||
if (qualifier.hasBinding())
|
|
||||||
p += snprintf(p, end - p, "binding=%d ", qualifier.layoutBinding);
|
|
||||||
if (qualifier.hasStream())
|
|
||||||
p += snprintf(p, end - p, "stream=%d ", qualifier.layoutStream);
|
|
||||||
if (qualifier.hasMatrix())
|
|
||||||
p += snprintf(p, end - p, "%s ", TQualifier::getLayoutMatrixString(qualifier.layoutMatrix));
|
|
||||||
if (qualifier.hasPacking())
|
|
||||||
p += snprintf(p, end - p, "%s ", TQualifier::getLayoutPackingString(qualifier.layoutPacking));
|
|
||||||
if (qualifier.hasOffset())
|
|
||||||
p += snprintf(p, end - p, "offset=%d ", qualifier.layoutOffset);
|
|
||||||
if (qualifier.hasAlign())
|
|
||||||
p += snprintf(p, end - p, "align=%d ", qualifier.layoutAlign);
|
|
||||||
if (qualifier.hasFormat())
|
|
||||||
p += snprintf(p, end - p, "%s ", TQualifier::getLayoutFormatString(qualifier.layoutFormat));
|
|
||||||
if (qualifier.hasXfbBuffer() && qualifier.hasXfbOffset())
|
|
||||||
p += snprintf(p, end - p, "xfb_buffer=%d ", qualifier.layoutXfbBuffer);
|
|
||||||
if (qualifier.hasXfbOffset())
|
|
||||||
p += snprintf(p, end - p, "xfb_offset=%d ", qualifier.layoutXfbOffset);
|
|
||||||
if (qualifier.hasXfbStride())
|
|
||||||
p += snprintf(p, end - p, "xfb_stride=%d ", qualifier.layoutXfbStride);
|
|
||||||
if (qualifier.hasAttachment())
|
|
||||||
p += snprintf(p, end - p, "input_attachment_index=%d ", qualifier.layoutAttachment);
|
|
||||||
if (qualifier.hasSpecConstantId())
|
|
||||||
p += snprintf(p, end - p, "constant_id=%d ", qualifier.layoutSpecConstantId);
|
|
||||||
if (qualifier.layoutPushConstant)
|
if (qualifier.layoutPushConstant)
|
||||||
p += snprintf(p, end - p, "push_constant ");
|
appendStr(" push_constant");
|
||||||
|
|
||||||
#ifdef NV_EXTENSIONS
|
#ifdef NV_EXTENSIONS
|
||||||
if (qualifier.layoutPassthrough)
|
if (qualifier.layoutPassthrough)
|
||||||
p += snprintf(p, end - p, "passthrough ");
|
appendStr(" passthrough");
|
||||||
if (qualifier.layoutViewportRelative)
|
if (qualifier.layoutViewportRelative)
|
||||||
p += snprintf(p, end - p, "layoutViewportRelative ");
|
appendStr(" layoutViewportRelative");
|
||||||
if (qualifier.layoutSecondaryViewportRelativeOffset != -2048)
|
if (qualifier.layoutSecondaryViewportRelativeOffset != -2048) {
|
||||||
p += snprintf(p, end - p, "layoutSecondaryViewportRelativeOffset=%d ", qualifier.layoutSecondaryViewportRelativeOffset);
|
appendStr(" layoutSecondaryViewportRelativeOffset=");
|
||||||
|
appendInt(qualifier.layoutSecondaryViewportRelativeOffset);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
p += snprintf(p, end - p, ") ");
|
appendStr(")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qualifier.invariant)
|
if (qualifier.invariant)
|
||||||
p += snprintf(p, end - p, "invariant ");
|
appendStr(" invariant");
|
||||||
if (qualifier.noContraction)
|
if (qualifier.noContraction)
|
||||||
p += snprintf(p, end - p, "noContraction ");
|
appendStr(" noContraction");
|
||||||
if (qualifier.centroid)
|
if (qualifier.centroid)
|
||||||
p += snprintf(p, end - p, "centroid ");
|
appendStr(" centroid");
|
||||||
if (qualifier.smooth)
|
if (qualifier.smooth)
|
||||||
p += snprintf(p, end - p, "smooth ");
|
appendStr(" smooth");
|
||||||
if (qualifier.flat)
|
if (qualifier.flat)
|
||||||
p += snprintf(p, end - p, "flat ");
|
appendStr(" flat");
|
||||||
if (qualifier.nopersp)
|
if (qualifier.nopersp)
|
||||||
p += snprintf(p, end - p, "noperspective ");
|
appendStr(" noperspective");
|
||||||
#ifdef AMD_EXTENSIONS
|
#ifdef AMD_EXTENSIONS
|
||||||
if (qualifier.explicitInterp)
|
if (qualifier.explicitInterp)
|
||||||
p += snprintf(p, end - p, "__explicitInterpAMD ");
|
appendStr(" __explicitInterpAMD");
|
||||||
#endif
|
#endif
|
||||||
if (qualifier.patch)
|
if (qualifier.patch)
|
||||||
p += snprintf(p, end - p, "patch ");
|
appendStr(" patch");
|
||||||
if (qualifier.sample)
|
if (qualifier.sample)
|
||||||
p += snprintf(p, end - p, "sample ");
|
appendStr(" sample");
|
||||||
if (qualifier.coherent)
|
if (qualifier.coherent)
|
||||||
p += snprintf(p, end - p, "coherent ");
|
appendStr(" coherent");
|
||||||
if (qualifier.volatil)
|
if (qualifier.volatil)
|
||||||
p += snprintf(p, end - p, "volatile ");
|
appendStr(" volatile");
|
||||||
if (qualifier.restrict)
|
if (qualifier.restrict)
|
||||||
p += snprintf(p, end - p, "restrict ");
|
appendStr(" restrict");
|
||||||
if (qualifier.readonly)
|
if (qualifier.readonly)
|
||||||
p += snprintf(p, end - p, "readonly ");
|
appendStr(" readonly");
|
||||||
if (qualifier.writeonly)
|
if (qualifier.writeonly)
|
||||||
p += snprintf(p, end - p, "writeonly ");
|
appendStr(" writeonly");
|
||||||
if (qualifier.specConstant)
|
if (qualifier.specConstant)
|
||||||
p += snprintf(p, end - p, "specialization-constant ");
|
appendStr(" specialization-constant");
|
||||||
p += snprintf(p, end - p, "%s ", getStorageQualifierString());
|
appendStr(" ");
|
||||||
|
appendStr(getStorageQualifierString());
|
||||||
if (isArray()) {
|
if (isArray()) {
|
||||||
for(int i = 0; i < (int)arraySizes->getNumDims(); ++i) {
|
for(int i = 0; i < (int)arraySizes->getNumDims(); ++i) {
|
||||||
int size = arraySizes->getDimSize(i);
|
int size = arraySizes->getDimSize(i);
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
p += snprintf(p, end - p, "implicitly-sized array of ");
|
appendStr(" implicitly-sized array of");
|
||||||
else
|
else {
|
||||||
p += snprintf(p, end - p, "%d-element array of ", arraySizes->getDimSize(i));
|
appendStr(" ");
|
||||||
|
appendInt(arraySizes->getDimSize(i));
|
||||||
|
appendStr("-element array of");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (qualifier.precision != EpqNone)
|
}
|
||||||
p += snprintf(p, end - p, "%s ", getPrecisionQualifierString());
|
if (qualifier.precision != EpqNone) {
|
||||||
if (isMatrix())
|
appendStr(" ");
|
||||||
p += snprintf(p, end - p, "%dX%d matrix of ", matrixCols, matrixRows);
|
appendStr(getPrecisionQualifierString());
|
||||||
else if (isVector())
|
}
|
||||||
p += snprintf(p, end - p, "%d-component vector of ", vectorSize);
|
if (isMatrix()) {
|
||||||
|
appendStr(" ");
|
||||||
|
appendInt(matrixCols);
|
||||||
|
appendStr("X");
|
||||||
|
appendInt(matrixRows);
|
||||||
|
appendStr(" matrix of");
|
||||||
|
} else if (isVector()) {
|
||||||
|
appendStr(" ");
|
||||||
|
appendInt(vectorSize);
|
||||||
|
appendStr("-component vector of");
|
||||||
|
}
|
||||||
|
|
||||||
*p = 0;
|
appendStr(" ");
|
||||||
TString s(buf);
|
typeString.append(getBasicTypeString());
|
||||||
s.append(getBasicTypeString());
|
|
||||||
|
|
||||||
if (qualifier.builtIn != EbvNone) {
|
if (qualifier.builtIn != EbvNone) {
|
||||||
s.append(" ");
|
appendStr(" ");
|
||||||
s.append(getBuiltInVariableString());
|
appendStr(getBuiltInVariableString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add struct/block members
|
// Add struct/block members
|
||||||
if (structure) {
|
if (structure) {
|
||||||
s.append("{");
|
appendStr("{");
|
||||||
for (size_t i = 0; i < structure->size(); ++i) {
|
for (size_t i = 0; i < structure->size(); ++i) {
|
||||||
if (s.size() > 3 * GlslangMaxTypeLength) {
|
|
||||||
// If we are getting too long, cut it short,
|
|
||||||
// just need to draw the line somewhere, as there is no limit to
|
|
||||||
// how large a struct/block type can get.
|
|
||||||
s.append("...");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (! (*structure)[i].type->hiddenMember()) {
|
if (! (*structure)[i].type->hiddenMember()) {
|
||||||
s.append((*structure)[i].type->getCompleteString());
|
typeString.append((*structure)[i].type->getCompleteString());
|
||||||
s.append(" ");
|
typeString.append(" ");
|
||||||
s.append((*structure)[i].type->getFieldName());
|
typeString.append((*structure)[i].type->getFieldName());
|
||||||
if (i < structure->size() - 1)
|
if (i < structure->size() - 1)
|
||||||
s.append(", ");
|
appendStr(", ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s.append("}");
|
appendStr("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return s;
|
return typeString;
|
||||||
}
|
}
|
||||||
|
|
||||||
TString getBasicTypeString() const
|
TString getBasicTypeString() const
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
// For the version, it uses the latest git tag followed by the number of commits.
|
// 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).
|
// For the date, it uses the current date (when then script is run).
|
||||||
|
|
||||||
#define GLSLANG_REVISION "Overload400-PrecQual.1909"
|
#define GLSLANG_REVISION "Overload400-PrecQual.1911"
|
||||||
#define GLSLANG_DATE "14-Mar-2017"
|
#define GLSLANG_DATE "14-Mar-2017"
|
||||||
|
|||||||
Reference in New Issue
Block a user