Commit b7c46afa by Alexis Hetu Committed by Alexis Hétu

Adding unsigned int types to parser

Added unsigned in and unsigned vectors to parser. Change-Id: Ic904f723c5db33d2d2bf432344d8abc3db966c1f Reviewed-on: https://swiftshader-review.googlesource.com/3103Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent ff5e0528
......@@ -889,6 +889,10 @@ namespace glsl
case EOpConstructIVec2:
case EOpConstructIVec3:
case EOpConstructIVec4:
case EOpConstructUInt:
case EOpConstructUVec2:
case EOpConstructUVec3:
case EOpConstructUVec4:
if(visit == PostVisit)
{
int component = 0;
......
......@@ -671,6 +671,14 @@ function_identifier
case 4: FRAG_VERT_ONLY("ivec4", $1.line); op = EOpConstructIVec4; break;
}
break;
case EbtUInt:
switch($1.primarySize) {
case 1: op = EOpConstructUInt; break;
case 2: FRAG_VERT_ONLY("uvec2", $1.line); op = EOpConstructUVec2; break;
case 3: FRAG_VERT_ONLY("uvec3", $1.line); op = EOpConstructUVec3; break;
case 4: FRAG_VERT_ONLY("uvec4", $1.line); op = EOpConstructUVec4; break;
}
break;
case EbtBool:
switch($1.primarySize) {
case 1: op = EOpConstructBool; break;
......
......@@ -727,29 +727,29 @@ static const yytype_uint16 yyrline[] =
{
0, 190, 190, 225, 228, 233, 238, 243, 248, 254,
257, 336, 339, 440, 450, 463, 471, 571, 574, 582,
586, 593, 597, 604, 610, 619, 627, 696, 703, 713,
716, 726, 736, 757, 758, 759, 764, 765, 774, 786,
787, 795, 806, 810, 811, 821, 831, 841, 854, 855,
865, 878, 882, 886, 890, 891, 904, 905, 918, 919,
932, 933, 950, 951, 964, 965, 966, 967, 968, 972,
975, 986, 994, 1021, 1026, 1036, 1074, 1077, 1084, 1092,
1113, 1134, 1145, 1174, 1179, 1189, 1194, 1204, 1207, 1210,
1213, 1219, 1226, 1229, 1251, 1269, 1293, 1316, 1320, 1338,
1346, 1378, 1398, 1486, 1495, 1518, 1521, 1527, 1533, 1540,
1549, 1558, 1561, 1564, 1571, 1575, 1582, 1586, 1591, 1596,
1602, 1608, 1617, 1627, 1634, 1637, 1640, 1646, 1653, 1656,
1662, 1665, 1668, 1674, 1677, 1692, 1696, 1700, 1704, 1708,
1712, 1717, 1722, 1727, 1732, 1737, 1742, 1747, 1752, 1757,
1762, 1767, 1772, 1778, 1784, 1790, 1796, 1802, 1808, 1814,
1820, 1826, 1831, 1836, 1845, 1850, 1855, 1860, 1865, 1870,
1875, 1880, 1885, 1890, 1895, 1900, 1905, 1910, 1915, 1928,
1928, 1942, 1942, 1951, 1954, 1969, 2001, 2005, 2011, 2019,
2035, 2039, 2043, 2044, 2050, 2051, 2052, 2053, 2054, 2058,
2059, 2059, 2059, 2069, 2070, 2074, 2074, 2075, 2075, 2080,
2083, 2093, 2096, 2102, 2103, 2107, 2115, 2119, 2129, 2134,
2151, 2151, 2156, 2156, 2163, 2163, 2171, 2174, 2180, 2183,
2189, 2193, 2200, 2207, 2214, 2221, 2232, 2241, 2245, 2252,
2255, 2261, 2261
586, 593, 597, 604, 610, 619, 627, 704, 711, 721,
724, 734, 744, 765, 766, 767, 772, 773, 782, 794,
795, 803, 814, 818, 819, 829, 839, 849, 862, 863,
873, 886, 890, 894, 898, 899, 912, 913, 926, 927,
940, 941, 958, 959, 972, 973, 974, 975, 976, 980,
983, 994, 1002, 1029, 1034, 1044, 1082, 1085, 1092, 1100,
1121, 1142, 1153, 1182, 1187, 1197, 1202, 1212, 1215, 1218,
1221, 1227, 1234, 1237, 1259, 1277, 1301, 1324, 1328, 1346,
1354, 1386, 1406, 1494, 1503, 1526, 1529, 1535, 1541, 1548,
1557, 1566, 1569, 1572, 1579, 1583, 1590, 1594, 1599, 1604,
1610, 1616, 1625, 1635, 1642, 1645, 1648, 1654, 1661, 1664,
1670, 1673, 1676, 1682, 1685, 1700, 1704, 1708, 1712, 1716,
1720, 1725, 1730, 1735, 1740, 1745, 1750, 1755, 1760, 1765,
1770, 1775, 1780, 1786, 1792, 1798, 1804, 1810, 1816, 1822,
1828, 1834, 1839, 1844, 1853, 1858, 1863, 1868, 1873, 1878,
1883, 1888, 1893, 1898, 1903, 1908, 1913, 1918, 1923, 1936,
1936, 1950, 1950, 1959, 1962, 1977, 2009, 2013, 2019, 2027,
2043, 2047, 2051, 2052, 2058, 2059, 2060, 2061, 2062, 2066,
2067, 2067, 2067, 2077, 2078, 2082, 2082, 2083, 2083, 2088,
2091, 2101, 2104, 2110, 2111, 2115, 2123, 2127, 2137, 2142,
2159, 2159, 2164, 2164, 2171, 2171, 2179, 2182, 2188, 2191,
2197, 2201, 2208, 2215, 2222, 2229, 2240, 2249, 2253, 2260,
2263, 2269, 2269
};
#endif
......@@ -2834,6 +2834,14 @@ yyreduce:
case 4: FRAG_VERT_ONLY("ivec4", (yyvsp[(1) - (1)].interm.type).line); op = EOpConstructIVec4; break;
}
break;
case EbtUInt:
switch((yyvsp[(1) - (1)].interm.type).primarySize) {
case 1: op = EOpConstructUInt; break;
case 2: FRAG_VERT_ONLY("uvec2", (yyvsp[(1) - (1)].interm.type).line); op = EOpConstructUVec2; break;
case 3: FRAG_VERT_ONLY("uvec3", (yyvsp[(1) - (1)].interm.type).line); op = EOpConstructUVec3; break;
case 4: FRAG_VERT_ONLY("uvec4", (yyvsp[(1) - (1)].interm.type).line); op = EOpConstructUVec4; break;
}
break;
case EbtBool:
switch((yyvsp[(1) - (1)].interm.type).primarySize) {
case 1: op = EOpConstructBool; break;
......
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