Commit 41fc482d by bajones@chromium.org

Regenerated glslang_tab.cpp to fix compile errors

The version committed in Issue 9827044 was generated in a bad environment and doesn't compile againts top-of-tree. This version does. BUG=429 R=alokp@chromium.org Review URL: https://codereview.appspot.com/9738044 git-svn-id: https://angleproject.googlecode.com/svn/trunk@2249 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 7f694d92
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 2245 #define BUILD_REVISION 2249
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -325,14 +325,6 @@ static void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason) ...@@ -325,14 +325,6 @@ static void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason)
} \ } \
} while (0) } while (0)
#define FRAG_VERT_ONLY(S, L) { \
if (context->shaderType != SH_FRAGMENT_SHADER && \
context->shaderType != SH_VERTEX_SHADER) { \
context->error(L, " supported in vertex/fragment shaders only ", S); \
context->recover(); \
} \
}
#define VERTEX_ONLY(S, L) { \ #define VERTEX_ONLY(S, L) { \
if (context->shaderType != SH_VERTEX_SHADER) { \ if (context->shaderType != SH_VERTEX_SHADER) { \
context->error(L, " supported in vertex shaders only ", S); \ context->error(L, " supported in vertex shaders only ", S); \
...@@ -721,27 +713,27 @@ static const yytype_int16 yyrhs[] = ...@@ -721,27 +713,27 @@ static const yytype_int16 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] = static const yytype_uint16 yyrline[] =
{ {
0, 187, 187, 188, 191, 234, 237, 250, 255, 260, 0, 179, 179, 180, 183, 226, 229, 242, 247, 252,
266, 269, 356, 359, 460, 470, 483, 491, 591, 594, 258, 261, 336, 339, 440, 450, 463, 471, 571, 574,
602, 605, 611, 615, 622, 628, 637, 645, 700, 710, 582, 585, 591, 595, 602, 608, 617, 625, 680, 690,
713, 723, 733, 754, 755, 756, 761, 762, 771, 783, 693, 703, 713, 734, 735, 736, 741, 742, 750, 761,
784, 792, 803, 807, 808, 818, 828, 838, 851, 852, 762, 770, 781, 785, 786, 796, 806, 816, 829, 830,
862, 875, 879, 883, 887, 888, 901, 902, 915, 916, 840, 853, 857, 861, 865, 866, 879, 880, 893, 894,
929, 930, 947, 948, 961, 962, 963, 964, 965, 969, 907, 908, 925, 926, 939, 940, 941, 942, 943, 947,
972, 983, 991, 1018, 1023, 1037, 1074, 1077, 1084, 1092, 950, 961, 969, 996, 1001, 1015, 1052, 1055, 1062, 1070,
1113, 1134, 1144, 1172, 1177, 1187, 1192, 1202, 1205, 1208, 1091, 1112, 1122, 1150, 1155, 1165, 1170, 1180, 1183, 1186,
1211, 1217, 1224, 1227, 1249, 1267, 1291, 1314, 1318, 1336, 1189, 1195, 1202, 1205, 1227, 1245, 1269, 1292, 1296, 1314,
1344, 1376, 1396, 1485, 1494, 1517, 1520, 1526, 1534, 1542, 1322, 1354, 1374, 1395, 1404, 1427, 1430, 1436, 1444, 1452,
1550, 1560, 1567, 1570, 1573, 1579, 1582, 1597, 1601, 1605, 1460, 1470, 1477, 1480, 1483, 1489, 1492, 1507, 1511, 1515,
1609, 1618, 1623, 1628, 1633, 1638, 1643, 1648, 1653, 1658, 1519, 1523, 1528, 1533, 1538, 1543, 1548, 1553, 1558, 1563,
1663, 1669, 1675, 1681, 1686, 1691, 1700, 1709, 1714, 1727, 1568, 1573, 1578, 1583, 1587, 1591, 1599, 1607, 1611, 1624,
1727, 1741, 1741, 1750, 1753, 1769, 1805, 1809, 1815, 1822, 1624, 1638, 1638, 1647, 1650, 1666, 1702, 1706, 1712, 1719,
1837, 1841, 1845, 1846, 1852, 1853, 1854, 1855, 1856, 1860, 1734, 1738, 1742, 1743, 1749, 1750, 1751, 1752, 1753, 1757,
1861, 1861, 1861, 1871, 1872, 1876, 1876, 1877, 1877, 1882, 1758, 1758, 1758, 1768, 1769, 1773, 1773, 1774, 1774, 1779,
1885, 1895, 1898, 1904, 1905, 1909, 1917, 1921, 1931, 1936, 1782, 1792, 1795, 1801, 1802, 1806, 1814, 1818, 1828, 1833,
1953, 1953, 1958, 1958, 1965, 1965, 1973, 1976, 1982, 1985, 1850, 1850, 1855, 1855, 1862, 1862, 1870, 1873, 1879, 1882,
1991, 1995, 2002, 2009, 2016, 2023, 2034, 2043, 2047, 2054, 1888, 1892, 1899, 1906, 1913, 1920, 1931, 1940, 1944, 1951,
2057, 2063, 2063 1954, 1960, 1960
}; };
#endif #endif
...@@ -2384,15 +2376,7 @@ yyreduce: ...@@ -2384,15 +2376,7 @@ yyreduce:
} }
} else { } else {
if ((yyvsp[(1) - (4)].interm.intermTypedNode)->isArray()) { if ((yyvsp[(1) - (4)].interm.intermTypedNode)->isArray()) {
if ((yyvsp[(1) - (4)].interm.intermTypedNode)->getType().getArraySize() == 0) { if (index >= (yyvsp[(1) - (4)].interm.intermTypedNode)->getType().getArraySize()) {
if ((yyvsp[(1) - (4)].interm.intermTypedNode)->getType().getMaxArraySize() <= index) {
if (context->arraySetMaxSize((yyvsp[(1) - (4)].interm.intermTypedNode)->getAsSymbolNode(), (yyvsp[(1) - (4)].interm.intermTypedNode)->getTypePointer(), index, true, (yylsp[(2) - (4)])))
context->recover();
} else {
if (context->arraySetMaxSize((yyvsp[(1) - (4)].interm.intermTypedNode)->getAsSymbolNode(), (yyvsp[(1) - (4)].interm.intermTypedNode)->getTypePointer(), 0, false, (yylsp[(2) - (4)])))
context->recover();
}
} else if (index >= (yyvsp[(1) - (4)].interm.intermTypedNode)->getType().getArraySize()) {
std::stringstream extraInfoStream; std::stringstream extraInfoStream;
extraInfoStream << "array index out of range '" << index << "'"; extraInfoStream << "array index out of range '" << index << "'";
std::string extraInfo = extraInfoStream.str(); std::string extraInfo = extraInfoStream.str();
...@@ -2412,10 +2396,6 @@ yyreduce: ...@@ -2412,10 +2396,6 @@ yyreduce:
(yyval.interm.intermTypedNode) = context->intermediate.addIndex(EOpIndexDirect, (yyvsp[(1) - (4)].interm.intermTypedNode), (yyvsp[(3) - (4)].interm.intermTypedNode), (yylsp[(2) - (4)])); (yyval.interm.intermTypedNode) = context->intermediate.addIndex(EOpIndexDirect, (yyvsp[(1) - (4)].interm.intermTypedNode), (yyvsp[(3) - (4)].interm.intermTypedNode), (yylsp[(2) - (4)]));
} }
} else { } else {
if ((yyvsp[(1) - (4)].interm.intermTypedNode)->isArray() && (yyvsp[(1) - (4)].interm.intermTypedNode)->getType().getArraySize() == 0) {
context->error((yylsp[(2) - (4)]), "", "[", "array must be redeclared with a size before being indexed with a variable");
context->recover();
}
(yyval.interm.intermTypedNode) = context->intermediate.addIndex(EOpIndexIndirect, (yyvsp[(1) - (4)].interm.intermTypedNode), (yyvsp[(3) - (4)].interm.intermTypedNode), (yylsp[(2) - (4)])); (yyval.interm.intermTypedNode) = context->intermediate.addIndex(EOpIndexIndirect, (yyvsp[(1) - (4)].interm.intermTypedNode), (yyvsp[(3) - (4)].interm.intermTypedNode), (yylsp[(2) - (4)]));
} }
if ((yyval.interm.intermTypedNode) == 0) { if ((yyval.interm.intermTypedNode) == 0) {
...@@ -2795,17 +2775,17 @@ yyreduce: ...@@ -2795,17 +2775,17 @@ yyreduce:
case EbtInt: case EbtInt:
switch((yyvsp[(1) - (1)].interm.type).size) { switch((yyvsp[(1) - (1)].interm.type).size) {
case 1: op = EOpConstructInt; break; case 1: op = EOpConstructInt; break;
case 2: FRAG_VERT_ONLY("ivec2", (yylsp[(1) - (1)])); op = EOpConstructIVec2; break; case 2: op = EOpConstructIVec2; break;
case 3: FRAG_VERT_ONLY("ivec3", (yylsp[(1) - (1)])); op = EOpConstructIVec3; break; case 3: op = EOpConstructIVec3; break;
case 4: FRAG_VERT_ONLY("ivec4", (yylsp[(1) - (1)])); op = EOpConstructIVec4; break; case 4: op = EOpConstructIVec4; break;
} }
break; break;
case EbtBool: case EbtBool:
switch((yyvsp[(1) - (1)].interm.type).size) { switch((yyvsp[(1) - (1)].interm.type).size) {
case 1: op = EOpConstructBool; break; case 1: op = EOpConstructBool; break;
case 2: FRAG_VERT_ONLY("bvec2", (yylsp[(1) - (1)])); op = EOpConstructBVec2; break; case 2: op = EOpConstructBVec2; break;
case 3: FRAG_VERT_ONLY("bvec3", (yylsp[(1) - (1)])); op = EOpConstructBVec3; break; case 3: op = EOpConstructBVec3; break;
case 4: FRAG_VERT_ONLY("bvec4", (yylsp[(1) - (1)])); op = EOpConstructBVec4; break; case 4: op = EOpConstructBVec4; break;
} }
break; break;
default: break; default: break;
...@@ -2914,7 +2894,6 @@ yyreduce: ...@@ -2914,7 +2894,6 @@ yyreduce:
case 37: case 37:
{ {
FRAG_VERT_ONLY("*", (yylsp[(2) - (3)]));
(yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable); (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
if ((yyval.interm.intermTypedNode) == 0) { if ((yyval.interm.intermTypedNode) == 0) {
context->binaryOpError((yylsp[(2) - (3)]), "*", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); context->binaryOpError((yylsp[(2) - (3)]), "*", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
...@@ -2927,7 +2906,6 @@ yyreduce: ...@@ -2927,7 +2906,6 @@ yyreduce:
case 38: case 38:
{ {
FRAG_VERT_ONLY("/", (yylsp[(2) - (3)]));
(yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable); (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
if ((yyval.interm.intermTypedNode) == 0) { if ((yyval.interm.intermTypedNode) == 0) {
context->binaryOpError((yylsp[(2) - (3)]), "/", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); context->binaryOpError((yylsp[(2) - (3)]), "/", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
...@@ -3186,12 +3164,12 @@ yyreduce: ...@@ -3186,12 +3164,12 @@ yyreduce:
case 65: case 65:
{ FRAG_VERT_ONLY("*=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpMulAssign; } { (yyval.interm).op = EOpMulAssign; }
break; break;
case 66: case 66:
{ FRAG_VERT_ONLY("/=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpDivAssign; } { (yyval.interm).op = EOpDivAssign; }
break; break;
case 67: case 67:
...@@ -4005,7 +3983,6 @@ yyreduce: ...@@ -4005,7 +3983,6 @@ yyreduce:
case 130: case 130:
{ {
FRAG_VERT_ONLY("mat2", (yylsp[(1) - (1)]));
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
(yyval.interm.type).setAggregate(2, true); (yyval.interm.type).setAggregate(2, true);
...@@ -4015,7 +3992,6 @@ yyreduce: ...@@ -4015,7 +3992,6 @@ yyreduce:
case 131: case 131:
{ {
FRAG_VERT_ONLY("mat3", (yylsp[(1) - (1)]));
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
(yyval.interm.type).setAggregate(3, true); (yyval.interm.type).setAggregate(3, true);
...@@ -4025,7 +4001,6 @@ yyreduce: ...@@ -4025,7 +4001,6 @@ yyreduce:
case 132: case 132:
{ {
FRAG_VERT_ONLY("mat4", (yylsp[(1) - (1)]));
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
(yyval.interm.type).setAggregate(4, true); (yyval.interm.type).setAggregate(4, true);
...@@ -4035,7 +4010,6 @@ yyreduce: ...@@ -4035,7 +4010,6 @@ yyreduce:
case 133: case 133:
{ {
FRAG_VERT_ONLY("sampler2D", (yylsp[(1) - (1)]));
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)])); (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)]));
} }
...@@ -4044,7 +4018,6 @@ yyreduce: ...@@ -4044,7 +4018,6 @@ yyreduce:
case 134: case 134:
{ {
FRAG_VERT_ONLY("samplerCube", (yylsp[(1) - (1)]));
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)])); (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)]));
} }
...@@ -4057,7 +4030,6 @@ yyreduce: ...@@ -4057,7 +4030,6 @@ yyreduce:
context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES"); context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES");
context->recover(); context->recover();
} }
FRAG_VERT_ONLY("samplerExternalOES", (yylsp[(1) - (1)]));
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)])); (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)]));
} }
...@@ -4070,7 +4042,6 @@ yyreduce: ...@@ -4070,7 +4042,6 @@ yyreduce:
context->error((yylsp[(1) - (1)]), "unsupported type", "sampler2DRect"); context->error((yylsp[(1) - (1)]), "unsupported type", "sampler2DRect");
context->recover(); context->recover();
} }
FRAG_VERT_ONLY("sampler2DRect", (yylsp[(1) - (1)]));
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtSampler2DRect, qual, (yylsp[(1) - (1)])); (yyval.interm.type).setBasic(EbtSampler2DRect, qual, (yylsp[(1) - (1)]));
} }
...@@ -4079,7 +4050,6 @@ yyreduce: ...@@ -4079,7 +4050,6 @@ yyreduce:
case 137: case 137:
{ {
FRAG_VERT_ONLY("struct", (yylsp[(1) - (1)]));
(yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
(yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
} }
......
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