Removed code for unsupported pack-unpack language.

Review URL: https://codereview.appspot.com/9685045 Conflicts: src/compiler/glslang_tab.cpp git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@2258 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 1714ed34
...@@ -90,10 +90,6 @@ enum TQualifier ...@@ -90,10 +90,6 @@ enum TQualifier
EvqInvariantVaryingOut, // vertex shaders only read/write EvqInvariantVaryingOut, // vertex shaders only read/write
EvqUniform, // Readonly, vertex and fragment EvqUniform, // Readonly, vertex and fragment
// pack/unpack input and output
EvqInput,
EvqOutput,
// parameters // parameters
EvqIn, EvqIn,
EvqOut, EvqOut,
...@@ -137,8 +133,6 @@ inline const char* getQualifierString(TQualifier q) ...@@ -137,8 +133,6 @@ inline const char* getQualifierString(TQualifier q)
case EvqIn: return "in"; break; case EvqIn: return "in"; break;
case EvqOut: return "out"; break; case EvqOut: return "out"; break;
case EvqInOut: return "inout"; break; case EvqInOut: return "inout"; break;
case EvqInput: return "input"; break;
case EvqOutput: return "output"; break;
case EvqPosition: return "Position"; break; case EvqPosition: return "Position"; break;
case EvqPointSize: return "PointSize"; break; case EvqPointSize: return "PointSize"; break;
case EvqFragCoord: return "FragCoord"; break; case EvqFragCoord: return "FragCoord"; break;
......
...@@ -319,7 +319,6 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& line, const char* op, TIn ...@@ -319,7 +319,6 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& line, const char* op, TIn
case EvqAttribute: message = "can't modify an attribute"; break; case EvqAttribute: message = "can't modify an attribute"; break;
case EvqUniform: message = "can't modify a uniform"; break; case EvqUniform: message = "can't modify a uniform"; break;
case EvqVaryingIn: message = "can't modify a varying"; break; case EvqVaryingIn: message = "can't modify a varying"; break;
case EvqInput: message = "can't modify an input"; break;
case EvqFragCoord: message = "can't modify gl_FragCoord"; break; case EvqFragCoord: message = "can't modify gl_FragCoord"; break;
case EvqFrontFacing: message = "can't modify gl_FrontFacing"; break; case EvqFrontFacing: message = "can't modify gl_FrontFacing"; break;
case EvqPointCoord: message = "can't modify gl_PointCoord"; break; case EvqPointCoord: message = "can't modify gl_PointCoord"; break;
......
...@@ -103,14 +103,6 @@ static void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason) ...@@ -103,14 +103,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); \
...@@ -663,17 +655,17 @@ function_identifier ...@@ -663,17 +655,17 @@ function_identifier
case EbtInt: case EbtInt:
switch($1.size) { switch($1.size) {
case 1: op = EOpConstructInt; break; case 1: op = EOpConstructInt; break;
case 2: FRAG_VERT_ONLY("ivec2", @1); op = EOpConstructIVec2; break; case 2: op = EOpConstructIVec2; break;
case 3: FRAG_VERT_ONLY("ivec3", @1); op = EOpConstructIVec3; break; case 3: op = EOpConstructIVec3; break;
case 4: FRAG_VERT_ONLY("ivec4", @1); op = EOpConstructIVec4; break; case 4: op = EOpConstructIVec4; break;
} }
break; break;
case EbtBool: case EbtBool:
switch($1.size) { switch($1.size) {
case 1: op = EOpConstructBool; break; case 1: op = EOpConstructBool; break;
case 2: FRAG_VERT_ONLY("bvec2", @1); op = EOpConstructBVec2; break; case 2: op = EOpConstructBVec2; break;
case 3: FRAG_VERT_ONLY("bvec3", @1); op = EOpConstructBVec3; break; case 3: op = EOpConstructBVec3; break;
case 4: FRAG_VERT_ONLY("bvec4", @1); op = EOpConstructBVec4; break; case 4: op = EOpConstructBVec4; break;
} }
break; break;
default: break; default: break;
...@@ -753,7 +745,6 @@ unary_operator ...@@ -753,7 +745,6 @@ unary_operator
multiplicative_expression multiplicative_expression
: unary_expression { $$ = $1; } : unary_expression { $$ = $1; }
| multiplicative_expression STAR unary_expression { | multiplicative_expression STAR unary_expression {
FRAG_VERT_ONLY("*", @2);
$$ = context->intermediate.addBinaryMath(EOpMul, $1, $3, @2, context->symbolTable); $$ = context->intermediate.addBinaryMath(EOpMul, $1, $3, @2, context->symbolTable);
if ($$ == 0) { if ($$ == 0) {
context->binaryOpError(@2, "*", $1->getCompleteString(), $3->getCompleteString()); context->binaryOpError(@2, "*", $1->getCompleteString(), $3->getCompleteString());
...@@ -762,7 +753,6 @@ multiplicative_expression ...@@ -762,7 +753,6 @@ multiplicative_expression
} }
} }
| multiplicative_expression SLASH unary_expression { | multiplicative_expression SLASH unary_expression {
FRAG_VERT_ONLY("/", @2);
$$ = context->intermediate.addBinaryMath(EOpDiv, $1, $3, @2, context->symbolTable); $$ = context->intermediate.addBinaryMath(EOpDiv, $1, $3, @2, context->symbolTable);
if ($$ == 0) { if ($$ == 0) {
context->binaryOpError(@2, "/", $1->getCompleteString(), $3->getCompleteString()); context->binaryOpError(@2, "/", $1->getCompleteString(), $3->getCompleteString());
...@@ -952,8 +942,8 @@ assignment_expression ...@@ -952,8 +942,8 @@ assignment_expression
assignment_operator assignment_operator
: EQUAL { $$.op = EOpAssign; } : EQUAL { $$.op = EOpAssign; }
| MUL_ASSIGN { FRAG_VERT_ONLY("*=", @1); $$.op = EOpMulAssign; } | MUL_ASSIGN { $$.op = EOpMulAssign; }
| DIV_ASSIGN { FRAG_VERT_ONLY("/=", @1); $$.op = EOpDivAssign; } | DIV_ASSIGN { $$.op = EOpDivAssign; }
| ADD_ASSIGN { $$.op = EOpAddAssign; } | ADD_ASSIGN { $$.op = EOpAddAssign; }
| SUB_ASSIGN { $$.op = EOpSubAssign; } | SUB_ASSIGN { $$.op = EOpSubAssign; }
; ;
...@@ -1404,76 +1394,8 @@ single_declaration ...@@ -1404,76 +1394,8 @@ single_declaration
$$.intermAggregate = context->intermediate.makeAggregate(symbol, @2); $$.intermAggregate = context->intermediate.makeAggregate(symbol, @2);
} }
} }
//
// Place holder for the pack/unpack languages.
//
// | buffer_specifier {
// $$.intermAggregate = 0;
// }
; ;
// Grammar Note: No 'enum', or 'typedef'.
//
// Place holder for the pack/unpack languages.
//
//%type <interm> buffer_declaration
//%type <interm.type> buffer_specifier input_or_output buffer_declaration_list
//buffer_specifier
// : input_or_output LEFT_BRACE buffer_declaration_list RIGHT_BRACE {
// }
// ;
//
//input_or_output
// : INPUT {
// if (context->globalErrorCheck(@1, context->symbolTable.atGlobalLevel(), "input"))
// context->recover();
// UNPACK_ONLY("input", @1);
// $$.qualifier = EvqInput;
// }
// | OUTPUT {
// if (context->globalErrorCheck(@1, context->symbolTable.atGlobalLevel(), "output"))
// context->recover();
// PACK_ONLY("output", @1);
// $$.qualifier = EvqOutput;
// }
// ;
//
// Place holder for the pack/unpack languages.
//
//buffer_declaration_list
// : buffer_declaration {
// }
// | buffer_declaration_list buffer_declaration {
// }
// ;
//
// Input/output semantics:
// float must be 16 or 32 bits
// float alignment restrictions?
// check for only one input and only one output
// sum of bitfields has to be multiple of 32
//
//
// Place holder for the pack/unpack languages.
//
//buffer_declaration
// : type_specifier IDENTIFIER COLON constant_expression SEMICOLON {
// if (context->reservedErrorCheck(@2, *$2.string, context))
// context->recover();
// $$.variable = new TVariable($2.string, $1);
// if (! context->symbolTable.insert(*$$.variable)) {
// context->error(@2, "redefinition", $$.variable->getName().c_str());
// context->recover();
// // don't have to delete $$.variable, the pool pop will take care of it
// }
// }
// ;
fully_specified_type fully_specified_type
: type_specifier { : type_specifier {
$$ = $1; $$ = $1;
...@@ -1603,11 +1525,6 @@ type_specifier_nonarray ...@@ -1603,11 +1525,6 @@ type_specifier_nonarray
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtBool, qual, @1); $$.setBasic(EbtBool, qual, @1);
} }
// | UNSIGNED INT_TYPE {
// PACK_UNPACK_ONLY("unsigned", @1);
// TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
// $$.setBasic(EbtInt, qual, @1);
// }
| VEC2 { | VEC2 {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtFloat, qual, @1); $$.setBasic(EbtFloat, qual, @1);
...@@ -1654,30 +1571,25 @@ type_specifier_nonarray ...@@ -1654,30 +1571,25 @@ type_specifier_nonarray
$$.setAggregate(4); $$.setAggregate(4);
} }
| MATRIX2 { | MATRIX2 {
FRAG_VERT_ONLY("mat2", @1);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtFloat, qual, @1); $$.setBasic(EbtFloat, qual, @1);
$$.setAggregate(2, true); $$.setAggregate(2, true);
} }
| MATRIX3 { | MATRIX3 {
FRAG_VERT_ONLY("mat3", @1);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtFloat, qual, @1); $$.setBasic(EbtFloat, qual, @1);
$$.setAggregate(3, true); $$.setAggregate(3, true);
} }
| MATRIX4 { | MATRIX4 {
FRAG_VERT_ONLY("mat4", @1);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtFloat, qual, @1); $$.setBasic(EbtFloat, qual, @1);
$$.setAggregate(4, true); $$.setAggregate(4, true);
} }
| SAMPLER2D { | SAMPLER2D {
FRAG_VERT_ONLY("sampler2D", @1);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtSampler2D, qual, @1); $$.setBasic(EbtSampler2D, qual, @1);
} }
| SAMPLERCUBE { | SAMPLERCUBE {
FRAG_VERT_ONLY("samplerCube", @1);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtSamplerCube, qual, @1); $$.setBasic(EbtSamplerCube, qual, @1);
} }
...@@ -1686,7 +1598,6 @@ type_specifier_nonarray ...@@ -1686,7 +1598,6 @@ type_specifier_nonarray
context->error(@1, "unsupported type", "samplerExternalOES"); context->error(@1, "unsupported type", "samplerExternalOES");
context->recover(); context->recover();
} }
FRAG_VERT_ONLY("samplerExternalOES", @1);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtSamplerExternalOES, qual, @1); $$.setBasic(EbtSamplerExternalOES, qual, @1);
} }
...@@ -1695,12 +1606,10 @@ type_specifier_nonarray ...@@ -1695,12 +1606,10 @@ type_specifier_nonarray
context->error(@1, "unsupported type", "sampler2DRect"); context->error(@1, "unsupported type", "sampler2DRect");
context->recover(); context->recover();
} }
FRAG_VERT_ONLY("sampler2DRect", @1);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtSampler2DRect, qual, @1); $$.setBasic(EbtSampler2DRect, qual, @1);
} }
| struct_specifier { | struct_specifier {
FRAG_VERT_ONLY("struct", @1);
$$ = $1; $$ = $1;
$$.qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; $$.qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
} }
......
...@@ -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, 227, 230, 243, 248, 253, 0, 179, 179, 180, 183, 219, 222, 235, 240, 245,
259, 262, 349, 352, 453, 463, 476, 484, 584, 587, 251, 254, 341, 344, 445, 455, 468, 476, 576, 579,
595, 598, 604, 608, 615, 621, 630, 638, 693, 703, 587, 590, 596, 600, 607, 613, 622, 630, 685, 695,
706, 716, 726, 747, 748, 749, 754, 755, 764, 776, 698, 708, 718, 739, 740, 741, 746, 747, 755, 766,
777, 785, 796, 800, 801, 811, 821, 831, 844, 845, 767, 775, 786, 790, 791, 801, 811, 821, 834, 835,
855, 868, 872, 876, 880, 881, 894, 895, 908, 909, 845, 858, 862, 866, 870, 871, 884, 885, 898, 899,
922, 923, 940, 941, 954, 955, 956, 957, 958, 962, 912, 913, 930, 931, 944, 945, 946, 947, 948, 952,
965, 976, 984, 1011, 1016, 1030, 1067, 1070, 1077, 1085, 955, 966, 974, 1001, 1006, 1020, 1057, 1060, 1067, 1075,
1106, 1127, 1137, 1165, 1170, 1180, 1185, 1195, 1198, 1201, 1096, 1117, 1127, 1155, 1160, 1170, 1175, 1185, 1188, 1191,
1204, 1210, 1217, 1220, 1242, 1260, 1284, 1307, 1311, 1329, 1194, 1200, 1207, 1210, 1232, 1250, 1274, 1297, 1301, 1319,
1337, 1369, 1389, 1478, 1487, 1510, 1513, 1519, 1527, 1535, 1327, 1359, 1379, 1400, 1409, 1432, 1435, 1441, 1449, 1457,
1543, 1553, 1560, 1563, 1566, 1572, 1575, 1590, 1594, 1598, 1465, 1475, 1482, 1485, 1488, 1494, 1497, 1512, 1516, 1520,
1602, 1611, 1616, 1621, 1626, 1631, 1636, 1641, 1646, 1651, 1524, 1528, 1533, 1538, 1543, 1548, 1553, 1558, 1563, 1568,
1656, 1662, 1668, 1674, 1679, 1684, 1693, 1702, 1707, 1720, 1573, 1578, 1583, 1588, 1592, 1596, 1604, 1612, 1616, 1629,
1720, 1734, 1734, 1743, 1746, 1762, 1798, 1802, 1808, 1815, 1629, 1643, 1643, 1652, 1655, 1671, 1707, 1711, 1717, 1724,
1830, 1834, 1838, 1839, 1845, 1846, 1847, 1848, 1849, 1853, 1739, 1743, 1747, 1748, 1754, 1755, 1756, 1757, 1758, 1762,
1854, 1854, 1854, 1864, 1865, 1869, 1869, 1870, 1870, 1875, 1763, 1763, 1763, 1773, 1774, 1778, 1778, 1779, 1779, 1784,
1878, 1888, 1891, 1897, 1898, 1902, 1910, 1914, 1924, 1929, 1787, 1797, 1800, 1806, 1807, 1811, 1819, 1823, 1833, 1838,
1946, 1946, 1951, 1951, 1958, 1958, 1966, 1969, 1975, 1978, 1855, 1855, 1860, 1860, 1867, 1867, 1875, 1878, 1884, 1887,
1984, 1988, 1995, 2002, 2009, 2016, 2027, 2036, 2040, 2047, 1893, 1897, 1904, 1911, 1918, 1925, 1936, 1945, 1949, 1956,
2050, 2056, 2056 1959, 1965, 1965
}; };
#endif #endif
...@@ -2788,17 +2780,17 @@ yyreduce: ...@@ -2788,17 +2780,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;
...@@ -2907,7 +2899,6 @@ yyreduce: ...@@ -2907,7 +2899,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());
...@@ -2920,7 +2911,6 @@ yyreduce: ...@@ -2920,7 +2911,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());
...@@ -3179,12 +3169,12 @@ yyreduce: ...@@ -3179,12 +3169,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:
...@@ -3998,7 +3988,6 @@ yyreduce: ...@@ -3998,7 +3988,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);
...@@ -4008,7 +3997,6 @@ yyreduce: ...@@ -4008,7 +3997,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);
...@@ -4018,7 +4006,6 @@ yyreduce: ...@@ -4018,7 +4006,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);
...@@ -4028,7 +4015,6 @@ yyreduce: ...@@ -4028,7 +4015,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)]));
} }
...@@ -4037,7 +4023,6 @@ yyreduce: ...@@ -4037,7 +4023,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)]));
} }
...@@ -4050,7 +4035,6 @@ yyreduce: ...@@ -4050,7 +4035,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)]));
} }
...@@ -4063,7 +4047,6 @@ yyreduce: ...@@ -4063,7 +4047,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)]));
} }
...@@ -4072,7 +4055,6 @@ yyreduce: ...@@ -4072,7 +4055,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