1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (info@qt.nokia.com)
10 ** GNU Lesser General Public License Usage
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
15 ** Please review the following information to ensure the GNU Lesser General
16 ** Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
25 ** Alternatively, this file may be used in accordance with the terms and
26 ** conditions contained in a signed written agreement between you and Nokia.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
31 **************************************************************************/
33 #include "glsllexer.h"
34 #include "glslparser.h"
39 static inline int classify2(const char *s) {
45 else if (s[0] == 'i') {
49 else if (s[1] == 'n') {
53 return Parser::T_IDENTIFIER;
56 static inline int classify3(const char *s) {
64 else if (s[0] == 'i') {
71 else if (s[0] == 'o') {
78 return Parser::T_IDENTIFIER;
81 static inline int classify4(const char *s) {
86 return Parser::T_BOOL;
91 else if (s[0] == 'c') {
95 return Parser::T_CASE | Lexer::Variant_GLSL_150;
100 else if (s[0] == 'e') {
104 return Parser::T_ELSE;
109 else if (s[0] == 'f') {
113 return Parser::T_FLAT | Lexer::Variant_GLSL_150;
118 else if (s[0] == 'l') {
122 return Parser::T_LOWP | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400;
127 else if (s[0] == 'm') {
131 return Parser::T_MAT2;
133 else if (s[3] == '3') {
134 return Parser::T_MAT3;
136 else if (s[3] == '4') {
137 return Parser::T_MAT4;
142 else if (s[0] == 't') {
146 return Parser::T_TRUE;
151 else if (s[0] == 'u') {
155 return Parser::T_UINT | Lexer::Variant_GLSL_150;
160 else if (s[0] == 'v') {
164 return Parser::T_VEC2;
166 else if (s[3] == '3') {
167 return Parser::T_VEC3;
169 else if (s[3] == '4') {
170 return Parser::T_VEC4;
174 else if (s[1] == 'o') {
177 return Parser::T_VOID;
182 return Parser::T_IDENTIFIER;
185 static inline int classify5(const char *s) {
191 return Parser::T_BREAK;
196 else if (s[1] == 'v') {
200 return Parser::T_BVEC2;
202 else if (s[4] == '3') {
203 return Parser::T_BVEC3;
205 else if (s[4] == '4') {
206 return Parser::T_BVEC4;
212 else if (s[0] == 'c') {
217 return Parser::T_CONST;
223 else if (s[0] == 'd') {
228 return Parser::T_DMAT2 | Lexer::Variant_GLSL_400;
230 else if (s[4] == '3') {
231 return Parser::T_DMAT3 | Lexer::Variant_GLSL_400;
233 else if (s[4] == '4') {
234 return Parser::T_DMAT4 | Lexer::Variant_GLSL_400;
239 else if (s[1] == 'v') {
243 return Parser::T_DVEC2 | Lexer::Variant_GLSL_400;
245 else if (s[4] == '3') {
246 return Parser::T_DVEC3 | Lexer::Variant_GLSL_400;
248 else if (s[4] == '4') {
249 return Parser::T_DVEC4 | Lexer::Variant_GLSL_400;
255 else if (s[0] == 'f') {
260 return Parser::T_FALSE;
265 else if (s[1] == 'l') {
269 return Parser::T_FLOAT;
275 else if (s[0] == 'h') {
280 return Parser::T_HIGHP | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400;
286 else if (s[0] == 'i') {
291 return Parser::T_INOUT;
296 else if (s[1] == 'v') {
300 return Parser::T_IVEC2;
302 else if (s[4] == '3') {
303 return Parser::T_IVEC3;
305 else if (s[4] == '4') {
306 return Parser::T_IVEC4;
312 else if (s[0] == 'p') {
317 return Parser::T_PATCH | Lexer::Variant_GLSL_400;
323 else if (s[0] == 'u') {
328 return Parser::T_UVEC2 | Lexer::Variant_GLSL_150;
330 else if (s[4] == '3') {
331 return Parser::T_UVEC3 | Lexer::Variant_GLSL_150;
333 else if (s[4] == '4') {
334 return Parser::T_UVEC4 | Lexer::Variant_GLSL_150;
340 else if (s[0] == 'w') {
345 return Parser::T_WHILE;
351 return Parser::T_IDENTIFIER;
354 static inline int classify6(const char *s) {
361 return Parser::T_DOUBLE | Lexer::Variant_GLSL_400;
368 else if (s[0] == 'l') {
374 return Parser::T_LAYOUT | Lexer::Variant_GLSL_150;
381 else if (s[0] == 'm') {
387 return Parser::T_MAT2X2 | Lexer::Variant_GLSL_120;
389 else if (s[5] == '3') {
390 return Parser::T_MAT2X3 | Lexer::Variant_GLSL_120;
392 else if (s[5] == '4') {
393 return Parser::T_MAT2X4 | Lexer::Variant_GLSL_120;
397 else if (s[3] == '3') {
400 return Parser::T_MAT3X2 | Lexer::Variant_GLSL_120;
402 else if (s[5] == '3') {
403 return Parser::T_MAT3X3 | Lexer::Variant_GLSL_120;
405 else if (s[5] == '4') {
406 return Parser::T_MAT3X4 | Lexer::Variant_GLSL_120;
410 else if (s[3] == '4') {
413 return Parser::T_MAT4X2 | Lexer::Variant_GLSL_120;
415 else if (s[5] == '3') {
416 return Parser::T_MAT4X3 | Lexer::Variant_GLSL_120;
418 else if (s[5] == '4') {
419 return Parser::T_MAT4X4 | Lexer::Variant_GLSL_120;
426 else if (s[0] == 'r') {
432 return Parser::T_RETURN;
439 else if (s[0] == 's') {
445 return Parser::T_SAMPLE | Lexer::Variant_Reserved;
451 else if (s[1] == 'm') {
456 return Parser::T_SMOOTH | Lexer::Variant_GLSL_150;
462 else if (s[1] == 't') {
467 return Parser::T_STRUCT;
473 else if (s[1] == 'w') {
478 return Parser::T_SWITCH | Lexer::Variant_GLSL_150;
485 return Parser::T_IDENTIFIER;
488 static inline int classify7(const char *s) {
496 return Parser::T_DEFAULT | Lexer::Variant_GLSL_150;
503 else if (s[1] == 'i') {
509 return Parser::T_DISCARD | Lexer::Variant_FragmentShader;
516 else if (s[1] == 'm') {
522 return Parser::T_DMAT2X2 | Lexer::Variant_GLSL_400;
524 else if (s[6] == '3') {
525 return Parser::T_DMAT2X3 | Lexer::Variant_GLSL_400;
527 else if (s[6] == '4') {
528 return Parser::T_DMAT2X4 | Lexer::Variant_GLSL_400;
532 else if (s[4] == '3') {
535 return Parser::T_DMAT3X2 | Lexer::Variant_GLSL_400;
537 else if (s[6] == '3') {
538 return Parser::T_DMAT3X3 | Lexer::Variant_GLSL_400;
540 else if (s[6] == '4') {
541 return Parser::T_DMAT3X4 | Lexer::Variant_GLSL_400;
545 else if (s[4] == '4') {
548 return Parser::T_DMAT4X2 | Lexer::Variant_GLSL_400;
550 else if (s[6] == '3') {
551 return Parser::T_DMAT4X3 | Lexer::Variant_GLSL_400;
553 else if (s[6] == '4') {
554 return Parser::T_DMAT4X4 | Lexer::Variant_GLSL_400;
562 else if (s[0] == 'm') {
569 return Parser::T_MEDIUMP | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400;
577 else if (s[0] == 'u') {
584 return Parser::T_UNIFORM;
592 else if (s[0] == 'v') {
599 return Parser::T_VARYING;
607 return Parser::T_IDENTIFIER;
610 static inline int classify8(const char *s) {
619 return Parser::T_CENTROID | Lexer::Variant_GLSL_120;
627 else if (s[1] == 'o') {
634 return Parser::T_CONTINUE;
643 return Parser::T_IDENTIFIER;
646 static inline int classify9(const char *s) {
656 return Parser::T_ATTRIBUTE | Lexer::Variant_VertexShader;
666 else if (s[0] == 'i') {
675 return Parser::T_INVARIANT;
685 else if (s[0] == 'p') {
694 return Parser::T_PRECISION | Lexer::Variant_GLSL_ES_100;
704 else if (s[0] == 's') {
713 return Parser::T_SAMPLER1D | Lexer::Variant_GLSL_120;
716 else if (s[7] == '2') {
718 return Parser::T_SAMPLER2D;
721 else if (s[7] == '3') {
723 return Parser::T_SAMPLER3D | Lexer::Variant_GLSL_120;
733 return Parser::T_IDENTIFIER;
736 static inline int classify10(const char *s) {
747 return Parser::T_ISAMPLER1D | Lexer::Variant_GLSL_150;
750 else if (s[8] == '2') {
752 return Parser::T_ISAMPLER2D | Lexer::Variant_GLSL_150;
755 else if (s[8] == '3') {
757 return Parser::T_ISAMPLER3D | Lexer::Variant_GLSL_150;
768 else if (s[0] == 's') {
778 return Parser::T_SUBROUTINE | Lexer::Variant_GLSL_400;
789 else if (s[0] == 'u') {
799 return Parser::T_USAMPLER1D | Lexer::Variant_GLSL_150;
802 else if (s[8] == '2') {
804 return Parser::T_USAMPLER2D | Lexer::Variant_GLSL_150;
807 else if (s[8] == '3') {
809 return Parser::T_USAMPLER3D | Lexer::Variant_GLSL_150;
820 return Parser::T_IDENTIFIER;
823 static inline int classify11(const char *s) {
835 return Parser::T_SAMPLER2DMS | Lexer::Variant_GLSL_150;
840 else if (s[7] == 'C') {
844 return Parser::T_SAMPLERCUBE;
856 return Parser::T_IDENTIFIER;
859 static inline int classify12(const char *s) {
872 return Parser::T_ISAMPLER2DMS | Lexer::Variant_GLSL_150;
877 else if (s[8] == 'C') {
881 return Parser::T_ISAMPLERCUBE | Lexer::Variant_GLSL_150;
894 else if (s[0] == 'u') {
906 return Parser::T_USAMPLER2DMS | Lexer::Variant_GLSL_150;
911 else if (s[8] == 'C') {
915 return Parser::T_USAMPLERCUBE | Lexer::Variant_GLSL_150;
928 return Parser::T_IDENTIFIER;
931 static inline int classify13(const char *s) {
945 return Parser::T_NOPERSPECTIVE | Lexer::Variant_GLSL_150;
959 else if (s[0] == 's') {
972 return Parser::T_SAMPLER2DRECT;
979 else if (s[7] == 'B') {
985 return Parser::T_SAMPLERBUFFER | Lexer::Variant_GLSL_150;
999 return Parser::T_IDENTIFIER;
1002 static inline int classify14(const char *s) {
1017 return Parser::T_ISAMPLER2DRECT | Lexer::Variant_GLSL_150;
1024 else if (s[8] == 'B') {
1030 return Parser::T_ISAMPLERBUFFER | Lexer::Variant_GLSL_150;
1045 else if (s[0] == 's') {
1059 return Parser::T_SAMPLER1DARRAY | Lexer::Variant_GLSL_150;
1067 else if (s[7] == '2') {
1074 return Parser::T_SAMPLER2DARRAY | Lexer::Variant_GLSL_150;
1089 else if (s[0] == 'u') {
1103 return Parser::T_USAMPLER2DRECT | Lexer::Variant_GLSL_150;
1110 else if (s[8] == 'B') {
1116 return Parser::T_USAMPLERBUFFER | Lexer::Variant_GLSL_150;
1131 return Parser::T_IDENTIFIER;
1134 static inline int classify15(const char *s) {
1150 return Parser::T_ISAMPLER1DARRAY | Lexer::Variant_GLSL_150;
1158 else if (s[8] == '2') {
1165 return Parser::T_ISAMPLER2DARRAY | Lexer::Variant_GLSL_150;
1181 else if (s[0] == 's') {
1196 return Parser::T_SAMPLER1DSHADOW | Lexer::Variant_GLSL_120;
1205 else if (s[7] == '2') {
1213 return Parser::T_SAMPLER2DSHADOW | Lexer::Variant_GLSL_120;
1229 else if (s[0] == 'u') {
1244 return Parser::T_USAMPLER1DARRAY | Lexer::Variant_GLSL_150;
1252 else if (s[8] == '2') {
1259 return Parser::T_USAMPLER2DARRAY | Lexer::Variant_GLSL_150;
1275 return Parser::T_IDENTIFIER;
1278 static inline int classify16(const char *s) {
1295 return Parser::T_SAMPLER2DMSARRAY | Lexer::Variant_GLSL_150;
1305 else if (s[7] == 'C') {
1314 return Parser::T_SAMPLERCUBEARRAY | Lexer::Variant_GLSL_400;
1331 return Parser::T_IDENTIFIER;
1334 static inline int classify17(const char *s) {
1352 return Parser::T_ISAMPLER2DMSARRAY | Lexer::Variant_GLSL_150;
1362 else if (s[8] == 'C') {
1371 return Parser::T_ISAMPLERCUBEARRAY | Lexer::Variant_GLSL_400;
1389 else if (s[0] == 's') {
1406 return Parser::T_SAMPLERCUBESHADOW | Lexer::Variant_GLSL_400;
1424 else if (s[0] == 'u') {
1441 return Parser::T_USAMPLER2DMSARRAY | Lexer::Variant_GLSL_150;
1451 else if (s[8] == 'C') {
1460 return Parser::T_USAMPLERCUBEARRAY | Lexer::Variant_GLSL_400;
1478 return Parser::T_IDENTIFIER;
1481 static inline int classify19(const char *s) {
1501 return Parser::T_SAMPLER2DRECTSHADOW;
1521 return Parser::T_IDENTIFIER;
1524 static inline int classify20(const char *s) {
1545 return Parser::T_SAMPLER1DARRAYSHADOW | Lexer::Variant_GLSL_150;
1559 else if (s[7] == '2') {
1572 return Parser::T_SAMPLER2DARRAYSHADOW | Lexer::Variant_GLSL_150;
1593 return Parser::T_IDENTIFIER;
1596 static inline int classify22(const char *s) {
1619 return Parser::T_SAMPLERCUBEARRAYSHADOW | Lexer::Variant_GLSL_400;
1642 return Parser::T_IDENTIFIER;
1645 int Lexer::classify(const char *s, int n) {
1647 case 2: return classify2(s);
1648 case 3: return classify3(s);
1649 case 4: return classify4(s);
1650 case 5: return classify5(s);
1651 case 6: return classify6(s);
1652 case 7: return classify7(s);
1653 case 8: return classify8(s);
1654 case 9: return classify9(s);
1655 case 10: return classify10(s);
1656 case 11: return classify11(s);
1657 case 12: return classify12(s);
1658 case 13: return classify13(s);
1659 case 14: return classify14(s);
1660 case 15: return classify15(s);
1661 case 16: return classify16(s);
1662 case 17: return classify17(s);
1663 case 19: return classify19(s);
1664 case 20: return classify20(s);
1665 case 22: return classify22(s);
1666 default: return Parser::T_IDENTIFIER;
1670 QStringList Lexer::keywords(int variant) {
1672 list += QLatin1String("do");
1673 list += QLatin1String("if");
1674 list += QLatin1String("in");
1675 list += QLatin1String("for");
1676 list += QLatin1String("int");
1677 list += QLatin1String("out");
1678 list += QLatin1String("bool");
1679 if (variant & (Lexer::Variant_GLSL_150))
1680 list += QLatin1String("case");
1681 list += QLatin1String("else");
1682 if (variant & (Lexer::Variant_GLSL_150))
1683 list += QLatin1String("flat");
1684 if (variant & (Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400))
1685 list += QLatin1String("lowp");
1686 list += QLatin1String("mat2");
1687 list += QLatin1String("mat3");
1688 list += QLatin1String("mat4");
1689 if (variant & (Lexer::Variant_GLSL_150))
1690 list += QLatin1String("uint");
1691 list += QLatin1String("vec2");
1692 list += QLatin1String("vec3");
1693 list += QLatin1String("vec4");
1694 list += QLatin1String("void");
1695 list += QLatin1String("true");
1696 list += QLatin1String("break");
1697 list += QLatin1String("bvec2");
1698 list += QLatin1String("bvec3");
1699 list += QLatin1String("bvec4");
1700 list += QLatin1String("const");
1701 if (variant & (Lexer::Variant_GLSL_400))
1702 list += QLatin1String("dmat2");
1703 if (variant & (Lexer::Variant_GLSL_400))
1704 list += QLatin1String("dmat3");
1705 if (variant & (Lexer::Variant_GLSL_400))
1706 list += QLatin1String("dmat4");
1707 if (variant & (Lexer::Variant_GLSL_400))
1708 list += QLatin1String("dvec2");
1709 if (variant & (Lexer::Variant_GLSL_400))
1710 list += QLatin1String("dvec3");
1711 if (variant & (Lexer::Variant_GLSL_400))
1712 list += QLatin1String("dvec4");
1713 list += QLatin1String("float");
1714 if (variant & (Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400))
1715 list += QLatin1String("highp");
1716 list += QLatin1String("inout");
1717 list += QLatin1String("ivec2");
1718 list += QLatin1String("ivec3");
1719 list += QLatin1String("ivec4");
1720 if (variant & (Lexer::Variant_GLSL_400))
1721 list += QLatin1String("patch");
1722 if (variant & (Lexer::Variant_GLSL_150))
1723 list += QLatin1String("uvec2");
1724 if (variant & (Lexer::Variant_GLSL_150))
1725 list += QLatin1String("uvec3");
1726 if (variant & (Lexer::Variant_GLSL_150))
1727 list += QLatin1String("uvec4");
1728 list += QLatin1String("while");
1729 list += QLatin1String("false");
1730 if (variant & (Lexer::Variant_GLSL_400))
1731 list += QLatin1String("double");
1732 if (variant & (Lexer::Variant_GLSL_150))
1733 list += QLatin1String("layout");
1734 if (variant & (Lexer::Variant_GLSL_120))
1735 list += QLatin1String("mat2x2");
1736 if (variant & (Lexer::Variant_GLSL_120))
1737 list += QLatin1String("mat2x3");
1738 if (variant & (Lexer::Variant_GLSL_120))
1739 list += QLatin1String("mat2x4");
1740 if (variant & (Lexer::Variant_GLSL_120))
1741 list += QLatin1String("mat3x2");
1742 if (variant & (Lexer::Variant_GLSL_120))
1743 list += QLatin1String("mat3x3");
1744 if (variant & (Lexer::Variant_GLSL_120))
1745 list += QLatin1String("mat3x4");
1746 if (variant & (Lexer::Variant_GLSL_120))
1747 list += QLatin1String("mat4x2");
1748 if (variant & (Lexer::Variant_GLSL_120))
1749 list += QLatin1String("mat4x3");
1750 if (variant & (Lexer::Variant_GLSL_120))
1751 list += QLatin1String("mat4x4");
1752 list += QLatin1String("return");
1753 if (variant & (Lexer::Variant_Reserved))
1754 list += QLatin1String("sample");
1755 if (variant & (Lexer::Variant_GLSL_150))
1756 list += QLatin1String("smooth");
1757 list += QLatin1String("struct");
1758 if (variant & (Lexer::Variant_GLSL_150))
1759 list += QLatin1String("switch");
1760 if (variant & (Lexer::Variant_GLSL_150))
1761 list += QLatin1String("default");
1762 if (variant & (Lexer::Variant_FragmentShader))
1763 list += QLatin1String("discard");
1764 if (variant & (Lexer::Variant_GLSL_400))
1765 list += QLatin1String("dmat2x2");
1766 if (variant & (Lexer::Variant_GLSL_400))
1767 list += QLatin1String("dmat2x3");
1768 if (variant & (Lexer::Variant_GLSL_400))
1769 list += QLatin1String("dmat2x4");
1770 if (variant & (Lexer::Variant_GLSL_400))
1771 list += QLatin1String("dmat3x2");
1772 if (variant & (Lexer::Variant_GLSL_400))
1773 list += QLatin1String("dmat3x3");
1774 if (variant & (Lexer::Variant_GLSL_400))
1775 list += QLatin1String("dmat3x4");
1776 if (variant & (Lexer::Variant_GLSL_400))
1777 list += QLatin1String("dmat4x2");
1778 if (variant & (Lexer::Variant_GLSL_400))
1779 list += QLatin1String("dmat4x3");
1780 if (variant & (Lexer::Variant_GLSL_400))
1781 list += QLatin1String("dmat4x4");
1782 if (variant & (Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400))
1783 list += QLatin1String("mediump");
1784 list += QLatin1String("uniform");
1785 list += QLatin1String("varying");
1786 if (variant & (Lexer::Variant_GLSL_120))
1787 list += QLatin1String("centroid");
1788 list += QLatin1String("continue");
1789 if (variant & (Lexer::Variant_VertexShader))
1790 list += QLatin1String("attribute");
1791 list += QLatin1String("invariant");
1792 if (variant & (Lexer::Variant_GLSL_ES_100))
1793 list += QLatin1String("precision");
1794 if (variant & (Lexer::Variant_GLSL_120))
1795 list += QLatin1String("sampler1D");
1796 list += QLatin1String("sampler2D");
1797 if (variant & (Lexer::Variant_GLSL_120))
1798 list += QLatin1String("sampler3D");
1799 if (variant & (Lexer::Variant_GLSL_150))
1800 list += QLatin1String("isampler1D");
1801 if (variant & (Lexer::Variant_GLSL_150))
1802 list += QLatin1String("isampler2D");
1803 if (variant & (Lexer::Variant_GLSL_150))
1804 list += QLatin1String("isampler3D");
1805 if (variant & (Lexer::Variant_GLSL_400))
1806 list += QLatin1String("subroutine");
1807 if (variant & (Lexer::Variant_GLSL_150))
1808 list += QLatin1String("usampler1D");
1809 if (variant & (Lexer::Variant_GLSL_150))
1810 list += QLatin1String("usampler2D");
1811 if (variant & (Lexer::Variant_GLSL_150))
1812 list += QLatin1String("usampler3D");
1813 if (variant & (Lexer::Variant_GLSL_150))
1814 list += QLatin1String("sampler2DMS");
1815 list += QLatin1String("samplerCube");
1816 if (variant & (Lexer::Variant_GLSL_150))
1817 list += QLatin1String("isampler2DMS");
1818 if (variant & (Lexer::Variant_GLSL_150))
1819 list += QLatin1String("isamplerCube");
1820 if (variant & (Lexer::Variant_GLSL_150))
1821 list += QLatin1String("usampler2DMS");
1822 if (variant & (Lexer::Variant_GLSL_150))
1823 list += QLatin1String("usamplerCube");
1824 if (variant & (Lexer::Variant_GLSL_150))
1825 list += QLatin1String("noperspective");
1826 list += QLatin1String("sampler2DRect");
1827 if (variant & (Lexer::Variant_GLSL_150))
1828 list += QLatin1String("samplerBuffer");
1829 if (variant & (Lexer::Variant_GLSL_150))
1830 list += QLatin1String("isampler2DRect");
1831 if (variant & (Lexer::Variant_GLSL_150))
1832 list += QLatin1String("isamplerBuffer");
1833 if (variant & (Lexer::Variant_GLSL_150))
1834 list += QLatin1String("sampler1DArray");
1835 if (variant & (Lexer::Variant_GLSL_150))
1836 list += QLatin1String("sampler2DArray");
1837 if (variant & (Lexer::Variant_GLSL_150))
1838 list += QLatin1String("usampler2DRect");
1839 if (variant & (Lexer::Variant_GLSL_150))
1840 list += QLatin1String("usamplerBuffer");
1841 if (variant & (Lexer::Variant_GLSL_150))
1842 list += QLatin1String("isampler1DArray");
1843 if (variant & (Lexer::Variant_GLSL_150))
1844 list += QLatin1String("isampler2DArray");
1845 if (variant & (Lexer::Variant_GLSL_120))
1846 list += QLatin1String("sampler1DShadow");
1847 if (variant & (Lexer::Variant_GLSL_120))
1848 list += QLatin1String("sampler2DShadow");
1849 if (variant & (Lexer::Variant_GLSL_150))
1850 list += QLatin1String("usampler1DArray");
1851 if (variant & (Lexer::Variant_GLSL_150))
1852 list += QLatin1String("usampler2DArray");
1853 if (variant & (Lexer::Variant_GLSL_150))
1854 list += QLatin1String("sampler2DMSArray");
1855 if (variant & (Lexer::Variant_GLSL_400))
1856 list += QLatin1String("samplerCubeArray");
1857 if (variant & (Lexer::Variant_GLSL_150))
1858 list += QLatin1String("isampler2DMSArray");
1859 if (variant & (Lexer::Variant_GLSL_400))
1860 list += QLatin1String("isamplerCubeArray");
1861 if (variant & (Lexer::Variant_GLSL_400))
1862 list += QLatin1String("samplerCubeShadow");
1863 if (variant & (Lexer::Variant_GLSL_150))
1864 list += QLatin1String("usampler2DMSarray");
1865 if (variant & (Lexer::Variant_GLSL_400))
1866 list += QLatin1String("usamplerCubeArray");
1867 list += QLatin1String("sampler2DRectShadow");
1868 if (variant & (Lexer::Variant_GLSL_150))
1869 list += QLatin1String("sampler1DArrayShadow");
1870 if (variant & (Lexer::Variant_GLSL_150))
1871 list += QLatin1String("sampler2DArrayShadow");
1872 if (variant & (Lexer::Variant_GLSL_400))
1873 list += QLatin1String("samplerCubeArrayShadow");