1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
16 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights. These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
32 **************************************************************************/
34 #include "glsllexer.h"
35 #include "glslparser.h"
40 static inline int classify2(const char *s) {
46 else if (s[0] == 'i') {
50 else if (s[1] == 'n') {
54 return Parser::T_IDENTIFIER;
57 static inline int classify3(const char *s) {
65 else if (s[0] == 'i') {
72 else if (s[0] == 'o') {
79 return Parser::T_IDENTIFIER;
82 static inline int classify4(const char *s) {
87 return Parser::T_BOOL;
92 else if (s[0] == 'c') {
96 return Parser::T_CASE | Lexer::Variant_GLSL_150;
101 else if (s[0] == 'e') {
105 return Parser::T_ELSE;
110 else if (s[0] == 'f') {
114 return Parser::T_FLAT | Lexer::Variant_GLSL_150;
119 else if (s[0] == 'l') {
123 return Parser::T_LOWP | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400;
128 else if (s[0] == 'm') {
132 return Parser::T_MAT2;
134 else if (s[3] == '3') {
135 return Parser::T_MAT3;
137 else if (s[3] == '4') {
138 return Parser::T_MAT4;
143 else if (s[0] == 't') {
147 return Parser::T_TRUE;
152 else if (s[0] == 'u') {
156 return Parser::T_UINT | Lexer::Variant_GLSL_150;
161 else if (s[0] == 'v') {
165 return Parser::T_VEC2;
167 else if (s[3] == '3') {
168 return Parser::T_VEC3;
170 else if (s[3] == '4') {
171 return Parser::T_VEC4;
175 else if (s[1] == 'o') {
178 return Parser::T_VOID;
183 return Parser::T_IDENTIFIER;
186 static inline int classify5(const char *s) {
192 return Parser::T_BREAK;
197 else if (s[1] == 'v') {
201 return Parser::T_BVEC2;
203 else if (s[4] == '3') {
204 return Parser::T_BVEC3;
206 else if (s[4] == '4') {
207 return Parser::T_BVEC4;
213 else if (s[0] == 'c') {
218 return Parser::T_CONST;
224 else if (s[0] == 'd') {
229 return Parser::T_DMAT2 | Lexer::Variant_GLSL_400;
231 else if (s[4] == '3') {
232 return Parser::T_DMAT3 | Lexer::Variant_GLSL_400;
234 else if (s[4] == '4') {
235 return Parser::T_DMAT4 | Lexer::Variant_GLSL_400;
240 else if (s[1] == 'v') {
244 return Parser::T_DVEC2 | Lexer::Variant_GLSL_400;
246 else if (s[4] == '3') {
247 return Parser::T_DVEC3 | Lexer::Variant_GLSL_400;
249 else if (s[4] == '4') {
250 return Parser::T_DVEC4 | Lexer::Variant_GLSL_400;
256 else if (s[0] == 'f') {
261 return Parser::T_FALSE;
266 else if (s[1] == 'l') {
270 return Parser::T_FLOAT;
276 else if (s[0] == 'h') {
281 return Parser::T_HIGHP | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400;
287 else if (s[0] == 'i') {
292 return Parser::T_INOUT;
297 else if (s[1] == 'v') {
301 return Parser::T_IVEC2;
303 else if (s[4] == '3') {
304 return Parser::T_IVEC3;
306 else if (s[4] == '4') {
307 return Parser::T_IVEC4;
313 else if (s[0] == 'p') {
318 return Parser::T_PATCH | Lexer::Variant_GLSL_400;
324 else if (s[0] == 'u') {
329 return Parser::T_UVEC2 | Lexer::Variant_GLSL_150;
331 else if (s[4] == '3') {
332 return Parser::T_UVEC3 | Lexer::Variant_GLSL_150;
334 else if (s[4] == '4') {
335 return Parser::T_UVEC4 | Lexer::Variant_GLSL_150;
341 else if (s[0] == 'w') {
346 return Parser::T_WHILE;
352 return Parser::T_IDENTIFIER;
355 static inline int classify6(const char *s) {
362 return Parser::T_DOUBLE | Lexer::Variant_GLSL_400;
369 else if (s[0] == 'l') {
375 return Parser::T_LAYOUT | Lexer::Variant_GLSL_150;
382 else if (s[0] == 'm') {
388 return Parser::T_MAT2X2 | Lexer::Variant_GLSL_120;
390 else if (s[5] == '3') {
391 return Parser::T_MAT2X3 | Lexer::Variant_GLSL_120;
393 else if (s[5] == '4') {
394 return Parser::T_MAT2X4 | Lexer::Variant_GLSL_120;
398 else if (s[3] == '3') {
401 return Parser::T_MAT3X2 | Lexer::Variant_GLSL_120;
403 else if (s[5] == '3') {
404 return Parser::T_MAT3X3 | Lexer::Variant_GLSL_120;
406 else if (s[5] == '4') {
407 return Parser::T_MAT3X4 | Lexer::Variant_GLSL_120;
411 else if (s[3] == '4') {
414 return Parser::T_MAT4X2 | Lexer::Variant_GLSL_120;
416 else if (s[5] == '3') {
417 return Parser::T_MAT4X3 | Lexer::Variant_GLSL_120;
419 else if (s[5] == '4') {
420 return Parser::T_MAT4X4 | Lexer::Variant_GLSL_120;
427 else if (s[0] == 'r') {
433 return Parser::T_RETURN;
440 else if (s[0] == 's') {
446 return Parser::T_SAMPLE | Lexer::Variant_Reserved;
452 else if (s[1] == 'm') {
457 return Parser::T_SMOOTH | Lexer::Variant_GLSL_150;
463 else if (s[1] == 't') {
468 return Parser::T_STRUCT;
474 else if (s[1] == 'w') {
479 return Parser::T_SWITCH | Lexer::Variant_GLSL_150;
486 return Parser::T_IDENTIFIER;
489 static inline int classify7(const char *s) {
497 return Parser::T_DEFAULT | Lexer::Variant_GLSL_150;
504 else if (s[1] == 'i') {
510 return Parser::T_DISCARD | Lexer::Variant_FragmentShader;
517 else if (s[1] == 'm') {
523 return Parser::T_DMAT2X2 | Lexer::Variant_GLSL_400;
525 else if (s[6] == '3') {
526 return Parser::T_DMAT2X3 | Lexer::Variant_GLSL_400;
528 else if (s[6] == '4') {
529 return Parser::T_DMAT2X4 | Lexer::Variant_GLSL_400;
533 else if (s[4] == '3') {
536 return Parser::T_DMAT3X2 | Lexer::Variant_GLSL_400;
538 else if (s[6] == '3') {
539 return Parser::T_DMAT3X3 | Lexer::Variant_GLSL_400;
541 else if (s[6] == '4') {
542 return Parser::T_DMAT3X4 | Lexer::Variant_GLSL_400;
546 else if (s[4] == '4') {
549 return Parser::T_DMAT4X2 | Lexer::Variant_GLSL_400;
551 else if (s[6] == '3') {
552 return Parser::T_DMAT4X3 | Lexer::Variant_GLSL_400;
554 else if (s[6] == '4') {
555 return Parser::T_DMAT4X4 | Lexer::Variant_GLSL_400;
563 else if (s[0] == 'm') {
570 return Parser::T_MEDIUMP | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400;
578 else if (s[0] == 'u') {
585 return Parser::T_UNIFORM;
593 else if (s[0] == 'v') {
600 return Parser::T_VARYING;
608 return Parser::T_IDENTIFIER;
611 static inline int classify8(const char *s) {
620 return Parser::T_CENTROID | Lexer::Variant_GLSL_120;
628 else if (s[1] == 'o') {
635 return Parser::T_CONTINUE;
644 return Parser::T_IDENTIFIER;
647 static inline int classify9(const char *s) {
657 return Parser::T_ATTRIBUTE | Lexer::Variant_VertexShader;
667 else if (s[0] == 'i') {
676 return Parser::T_INVARIANT;
686 else if (s[0] == 'p') {
695 return Parser::T_PRECISION | Lexer::Variant_GLSL_ES_100;
705 else if (s[0] == 's') {
714 return Parser::T_SAMPLER1D | Lexer::Variant_GLSL_120;
717 else if (s[7] == '2') {
719 return Parser::T_SAMPLER2D;
722 else if (s[7] == '3') {
724 return Parser::T_SAMPLER3D | Lexer::Variant_GLSL_120;
734 return Parser::T_IDENTIFIER;
737 static inline int classify10(const char *s) {
748 return Parser::T_ISAMPLER1D | Lexer::Variant_GLSL_150;
751 else if (s[8] == '2') {
753 return Parser::T_ISAMPLER2D | Lexer::Variant_GLSL_150;
756 else if (s[8] == '3') {
758 return Parser::T_ISAMPLER3D | Lexer::Variant_GLSL_150;
769 else if (s[0] == 's') {
779 return Parser::T_SUBROUTINE | Lexer::Variant_GLSL_400;
790 else if (s[0] == 'u') {
800 return Parser::T_USAMPLER1D | Lexer::Variant_GLSL_150;
803 else if (s[8] == '2') {
805 return Parser::T_USAMPLER2D | Lexer::Variant_GLSL_150;
808 else if (s[8] == '3') {
810 return Parser::T_USAMPLER3D | Lexer::Variant_GLSL_150;
821 return Parser::T_IDENTIFIER;
824 static inline int classify11(const char *s) {
836 return Parser::T_SAMPLER2DMS | Lexer::Variant_GLSL_150;
841 else if (s[7] == 'C') {
845 return Parser::T_SAMPLERCUBE;
857 return Parser::T_IDENTIFIER;
860 static inline int classify12(const char *s) {
873 return Parser::T_ISAMPLER2DMS | Lexer::Variant_GLSL_150;
878 else if (s[8] == 'C') {
882 return Parser::T_ISAMPLERCUBE | Lexer::Variant_GLSL_150;
895 else if (s[0] == 'u') {
907 return Parser::T_USAMPLER2DMS | Lexer::Variant_GLSL_150;
912 else if (s[8] == 'C') {
916 return Parser::T_USAMPLERCUBE | Lexer::Variant_GLSL_150;
929 return Parser::T_IDENTIFIER;
932 static inline int classify13(const char *s) {
946 return Parser::T_NOPERSPECTIVE | Lexer::Variant_GLSL_150;
960 else if (s[0] == 's') {
973 return Parser::T_SAMPLER2DRECT;
980 else if (s[7] == 'B') {
986 return Parser::T_SAMPLERBUFFER | Lexer::Variant_GLSL_150;
1000 return Parser::T_IDENTIFIER;
1003 static inline int classify14(const char *s) {
1018 return Parser::T_ISAMPLER2DRECT | Lexer::Variant_GLSL_150;
1025 else if (s[8] == 'B') {
1031 return Parser::T_ISAMPLERBUFFER | Lexer::Variant_GLSL_150;
1046 else if (s[0] == 's') {
1060 return Parser::T_SAMPLER1DARRAY | Lexer::Variant_GLSL_150;
1068 else if (s[7] == '2') {
1075 return Parser::T_SAMPLER2DARRAY | Lexer::Variant_GLSL_150;
1090 else if (s[0] == 'u') {
1104 return Parser::T_USAMPLER2DRECT | Lexer::Variant_GLSL_150;
1111 else if (s[8] == 'B') {
1117 return Parser::T_USAMPLERBUFFER | Lexer::Variant_GLSL_150;
1132 return Parser::T_IDENTIFIER;
1135 static inline int classify15(const char *s) {
1151 return Parser::T_ISAMPLER1DARRAY | Lexer::Variant_GLSL_150;
1159 else if (s[8] == '2') {
1166 return Parser::T_ISAMPLER2DARRAY | Lexer::Variant_GLSL_150;
1182 else if (s[0] == 's') {
1197 return Parser::T_SAMPLER1DSHADOW | Lexer::Variant_GLSL_120;
1206 else if (s[7] == '2') {
1214 return Parser::T_SAMPLER2DSHADOW | Lexer::Variant_GLSL_120;
1230 else if (s[0] == 'u') {
1245 return Parser::T_USAMPLER1DARRAY | Lexer::Variant_GLSL_150;
1253 else if (s[8] == '2') {
1260 return Parser::T_USAMPLER2DARRAY | Lexer::Variant_GLSL_150;
1276 return Parser::T_IDENTIFIER;
1279 static inline int classify16(const char *s) {
1296 return Parser::T_SAMPLER2DMSARRAY | Lexer::Variant_GLSL_150;
1306 else if (s[7] == 'C') {
1315 return Parser::T_SAMPLERCUBEARRAY | Lexer::Variant_GLSL_400;
1332 return Parser::T_IDENTIFIER;
1335 static inline int classify17(const char *s) {
1353 return Parser::T_ISAMPLER2DMSARRAY | Lexer::Variant_GLSL_150;
1363 else if (s[8] == 'C') {
1372 return Parser::T_ISAMPLERCUBEARRAY | Lexer::Variant_GLSL_400;
1390 else if (s[0] == 's') {
1407 return Parser::T_SAMPLERCUBESHADOW | Lexer::Variant_GLSL_400;
1425 else if (s[0] == 'u') {
1442 return Parser::T_USAMPLER2DMSARRAY | Lexer::Variant_GLSL_150;
1452 else if (s[8] == 'C') {
1461 return Parser::T_USAMPLERCUBEARRAY | Lexer::Variant_GLSL_400;
1479 return Parser::T_IDENTIFIER;
1482 static inline int classify19(const char *s) {
1502 return Parser::T_SAMPLER2DRECTSHADOW;
1522 return Parser::T_IDENTIFIER;
1525 static inline int classify20(const char *s) {
1546 return Parser::T_SAMPLER1DARRAYSHADOW | Lexer::Variant_GLSL_150;
1560 else if (s[7] == '2') {
1573 return Parser::T_SAMPLER2DARRAYSHADOW | Lexer::Variant_GLSL_150;
1594 return Parser::T_IDENTIFIER;
1597 static inline int classify22(const char *s) {
1620 return Parser::T_SAMPLERCUBEARRAYSHADOW | Lexer::Variant_GLSL_400;
1643 return Parser::T_IDENTIFIER;
1646 int Lexer::classify(const char *s, int n) {
1648 case 2: return classify2(s);
1649 case 3: return classify3(s);
1650 case 4: return classify4(s);
1651 case 5: return classify5(s);
1652 case 6: return classify6(s);
1653 case 7: return classify7(s);
1654 case 8: return classify8(s);
1655 case 9: return classify9(s);
1656 case 10: return classify10(s);
1657 case 11: return classify11(s);
1658 case 12: return classify12(s);
1659 case 13: return classify13(s);
1660 case 14: return classify14(s);
1661 case 15: return classify15(s);
1662 case 16: return classify16(s);
1663 case 17: return classify17(s);
1664 case 19: return classify19(s);
1665 case 20: return classify20(s);
1666 case 22: return classify22(s);
1667 default: return Parser::T_IDENTIFIER;
1671 QStringList Lexer::keywords(int variant) {
1673 list += QLatin1String("do");
1674 list += QLatin1String("if");
1675 list += QLatin1String("in");
1676 list += QLatin1String("for");
1677 list += QLatin1String("int");
1678 list += QLatin1String("out");
1679 list += QLatin1String("bool");
1680 if (variant & (Lexer::Variant_GLSL_150))
1681 list += QLatin1String("case");
1682 list += QLatin1String("else");
1683 if (variant & (Lexer::Variant_GLSL_150))
1684 list += QLatin1String("flat");
1685 if (variant & (Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400))
1686 list += QLatin1String("lowp");
1687 list += QLatin1String("mat2");
1688 list += QLatin1String("mat3");
1689 list += QLatin1String("mat4");
1690 if (variant & (Lexer::Variant_GLSL_150))
1691 list += QLatin1String("uint");
1692 list += QLatin1String("vec2");
1693 list += QLatin1String("vec3");
1694 list += QLatin1String("vec4");
1695 list += QLatin1String("void");
1696 list += QLatin1String("true");
1697 list += QLatin1String("break");
1698 list += QLatin1String("bvec2");
1699 list += QLatin1String("bvec3");
1700 list += QLatin1String("bvec4");
1701 list += QLatin1String("const");
1702 if (variant & (Lexer::Variant_GLSL_400))
1703 list += QLatin1String("dmat2");
1704 if (variant & (Lexer::Variant_GLSL_400))
1705 list += QLatin1String("dmat3");
1706 if (variant & (Lexer::Variant_GLSL_400))
1707 list += QLatin1String("dmat4");
1708 if (variant & (Lexer::Variant_GLSL_400))
1709 list += QLatin1String("dvec2");
1710 if (variant & (Lexer::Variant_GLSL_400))
1711 list += QLatin1String("dvec3");
1712 if (variant & (Lexer::Variant_GLSL_400))
1713 list += QLatin1String("dvec4");
1714 list += QLatin1String("float");
1715 if (variant & (Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400))
1716 list += QLatin1String("highp");
1717 list += QLatin1String("inout");
1718 list += QLatin1String("ivec2");
1719 list += QLatin1String("ivec3");
1720 list += QLatin1String("ivec4");
1721 if (variant & (Lexer::Variant_GLSL_400))
1722 list += QLatin1String("patch");
1723 if (variant & (Lexer::Variant_GLSL_150))
1724 list += QLatin1String("uvec2");
1725 if (variant & (Lexer::Variant_GLSL_150))
1726 list += QLatin1String("uvec3");
1727 if (variant & (Lexer::Variant_GLSL_150))
1728 list += QLatin1String("uvec4");
1729 list += QLatin1String("while");
1730 list += QLatin1String("false");
1731 if (variant & (Lexer::Variant_GLSL_400))
1732 list += QLatin1String("double");
1733 if (variant & (Lexer::Variant_GLSL_150))
1734 list += QLatin1String("layout");
1735 if (variant & (Lexer::Variant_GLSL_120))
1736 list += QLatin1String("mat2x2");
1737 if (variant & (Lexer::Variant_GLSL_120))
1738 list += QLatin1String("mat2x3");
1739 if (variant & (Lexer::Variant_GLSL_120))
1740 list += QLatin1String("mat2x4");
1741 if (variant & (Lexer::Variant_GLSL_120))
1742 list += QLatin1String("mat3x2");
1743 if (variant & (Lexer::Variant_GLSL_120))
1744 list += QLatin1String("mat3x3");
1745 if (variant & (Lexer::Variant_GLSL_120))
1746 list += QLatin1String("mat3x4");
1747 if (variant & (Lexer::Variant_GLSL_120))
1748 list += QLatin1String("mat4x2");
1749 if (variant & (Lexer::Variant_GLSL_120))
1750 list += QLatin1String("mat4x3");
1751 if (variant & (Lexer::Variant_GLSL_120))
1752 list += QLatin1String("mat4x4");
1753 list += QLatin1String("return");
1754 if (variant & (Lexer::Variant_Reserved))
1755 list += QLatin1String("sample");
1756 if (variant & (Lexer::Variant_GLSL_150))
1757 list += QLatin1String("smooth");
1758 list += QLatin1String("struct");
1759 if (variant & (Lexer::Variant_GLSL_150))
1760 list += QLatin1String("switch");
1761 if (variant & (Lexer::Variant_GLSL_150))
1762 list += QLatin1String("default");
1763 if (variant & (Lexer::Variant_FragmentShader))
1764 list += QLatin1String("discard");
1765 if (variant & (Lexer::Variant_GLSL_400))
1766 list += QLatin1String("dmat2x2");
1767 if (variant & (Lexer::Variant_GLSL_400))
1768 list += QLatin1String("dmat2x3");
1769 if (variant & (Lexer::Variant_GLSL_400))
1770 list += QLatin1String("dmat2x4");
1771 if (variant & (Lexer::Variant_GLSL_400))
1772 list += QLatin1String("dmat3x2");
1773 if (variant & (Lexer::Variant_GLSL_400))
1774 list += QLatin1String("dmat3x3");
1775 if (variant & (Lexer::Variant_GLSL_400))
1776 list += QLatin1String("dmat3x4");
1777 if (variant & (Lexer::Variant_GLSL_400))
1778 list += QLatin1String("dmat4x2");
1779 if (variant & (Lexer::Variant_GLSL_400))
1780 list += QLatin1String("dmat4x3");
1781 if (variant & (Lexer::Variant_GLSL_400))
1782 list += QLatin1String("dmat4x4");
1783 if (variant & (Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400))
1784 list += QLatin1String("mediump");
1785 list += QLatin1String("uniform");
1786 list += QLatin1String("varying");
1787 if (variant & (Lexer::Variant_GLSL_120))
1788 list += QLatin1String("centroid");
1789 list += QLatin1String("continue");
1790 if (variant & (Lexer::Variant_VertexShader))
1791 list += QLatin1String("attribute");
1792 list += QLatin1String("invariant");
1793 if (variant & (Lexer::Variant_GLSL_ES_100))
1794 list += QLatin1String("precision");
1795 if (variant & (Lexer::Variant_GLSL_120))
1796 list += QLatin1String("sampler1D");
1797 list += QLatin1String("sampler2D");
1798 if (variant & (Lexer::Variant_GLSL_120))
1799 list += QLatin1String("sampler3D");
1800 if (variant & (Lexer::Variant_GLSL_150))
1801 list += QLatin1String("isampler1D");
1802 if (variant & (Lexer::Variant_GLSL_150))
1803 list += QLatin1String("isampler2D");
1804 if (variant & (Lexer::Variant_GLSL_150))
1805 list += QLatin1String("isampler3D");
1806 if (variant & (Lexer::Variant_GLSL_400))
1807 list += QLatin1String("subroutine");
1808 if (variant & (Lexer::Variant_GLSL_150))
1809 list += QLatin1String("usampler1D");
1810 if (variant & (Lexer::Variant_GLSL_150))
1811 list += QLatin1String("usampler2D");
1812 if (variant & (Lexer::Variant_GLSL_150))
1813 list += QLatin1String("usampler3D");
1814 if (variant & (Lexer::Variant_GLSL_150))
1815 list += QLatin1String("sampler2DMS");
1816 list += QLatin1String("samplerCube");
1817 if (variant & (Lexer::Variant_GLSL_150))
1818 list += QLatin1String("isampler2DMS");
1819 if (variant & (Lexer::Variant_GLSL_150))
1820 list += QLatin1String("isamplerCube");
1821 if (variant & (Lexer::Variant_GLSL_150))
1822 list += QLatin1String("usampler2DMS");
1823 if (variant & (Lexer::Variant_GLSL_150))
1824 list += QLatin1String("usamplerCube");
1825 if (variant & (Lexer::Variant_GLSL_150))
1826 list += QLatin1String("noperspective");
1827 list += QLatin1String("sampler2DRect");
1828 if (variant & (Lexer::Variant_GLSL_150))
1829 list += QLatin1String("samplerBuffer");
1830 if (variant & (Lexer::Variant_GLSL_150))
1831 list += QLatin1String("isampler2DRect");
1832 if (variant & (Lexer::Variant_GLSL_150))
1833 list += QLatin1String("isamplerBuffer");
1834 if (variant & (Lexer::Variant_GLSL_150))
1835 list += QLatin1String("sampler1DArray");
1836 if (variant & (Lexer::Variant_GLSL_150))
1837 list += QLatin1String("sampler2DArray");
1838 if (variant & (Lexer::Variant_GLSL_150))
1839 list += QLatin1String("usampler2DRect");
1840 if (variant & (Lexer::Variant_GLSL_150))
1841 list += QLatin1String("usamplerBuffer");
1842 if (variant & (Lexer::Variant_GLSL_150))
1843 list += QLatin1String("isampler1DArray");
1844 if (variant & (Lexer::Variant_GLSL_150))
1845 list += QLatin1String("isampler2DArray");
1846 if (variant & (Lexer::Variant_GLSL_120))
1847 list += QLatin1String("sampler1DShadow");
1848 if (variant & (Lexer::Variant_GLSL_120))
1849 list += QLatin1String("sampler2DShadow");
1850 if (variant & (Lexer::Variant_GLSL_150))
1851 list += QLatin1String("usampler1DArray");
1852 if (variant & (Lexer::Variant_GLSL_150))
1853 list += QLatin1String("usampler2DArray");
1854 if (variant & (Lexer::Variant_GLSL_150))
1855 list += QLatin1String("sampler2DMSArray");
1856 if (variant & (Lexer::Variant_GLSL_400))
1857 list += QLatin1String("samplerCubeArray");
1858 if (variant & (Lexer::Variant_GLSL_150))
1859 list += QLatin1String("isampler2DMSArray");
1860 if (variant & (Lexer::Variant_GLSL_400))
1861 list += QLatin1String("isamplerCubeArray");
1862 if (variant & (Lexer::Variant_GLSL_400))
1863 list += QLatin1String("samplerCubeShadow");
1864 if (variant & (Lexer::Variant_GLSL_150))
1865 list += QLatin1String("usampler2DMSarray");
1866 if (variant & (Lexer::Variant_GLSL_400))
1867 list += QLatin1String("usamplerCubeArray");
1868 list += QLatin1String("sampler2DRectShadow");
1869 if (variant & (Lexer::Variant_GLSL_150))
1870 list += QLatin1String("sampler1DArrayShadow");
1871 if (variant & (Lexer::Variant_GLSL_150))
1872 list += QLatin1String("sampler2DArrayShadow");
1873 if (variant & (Lexer::Variant_GLSL_400))
1874 list += QLatin1String("samplerCubeArrayShadow");