GLSL: replace general missing functionality with specific messages.
This commit is contained in:
parent
21369c825a
commit
e00e8f45a6
195 changed files with 80 additions and 415 deletions
|
|
@ -566,41 +566,6 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
|
|||
}
|
||||
}
|
||||
|
||||
// A meta check on the condition of the compiler itself...
|
||||
switch (version) {
|
||||
|
||||
// ES versions
|
||||
case 100:
|
||||
case 300:
|
||||
// versions are complete
|
||||
break;
|
||||
|
||||
// Desktop versions
|
||||
case 110:
|
||||
case 120:
|
||||
case 130:
|
||||
case 140:
|
||||
case 150:
|
||||
case 330:
|
||||
// versions are complete
|
||||
break;
|
||||
|
||||
case 310:
|
||||
case 400:
|
||||
case 410:
|
||||
case 420:
|
||||
case 430:
|
||||
case 440:
|
||||
case 450:
|
||||
infoSink.info << "Warning, version " << version << " is not yet complete; most version-specific features are present, but some are missing.\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
infoSink.info << "Warning, version " << version << " is unknown.\n";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return correct;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -500,6 +500,11 @@ void TParseVersions::requireNotRemoved(const TSourceLoc& loc, int profileMask, i
|
|||
}
|
||||
}
|
||||
|
||||
void TParseVersions::unimplemented(const TSourceLoc& loc, const char* featureDesc)
|
||||
{
|
||||
error(loc, "feature not yet implemented", featureDesc, "");
|
||||
}
|
||||
|
||||
// Returns true if at least one of the extensions in the extensions parameter is requested. Otherwise, returns false.
|
||||
// Warns appropriately if the requested behavior of an extension is "warn".
|
||||
bool TParseVersions::checkExtensionsRequested(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc)
|
||||
|
|
|
|||
|
|
@ -1260,25 +1260,25 @@ storage_qualifier
|
|||
| SUBROUTINE {
|
||||
parseContext.spvRemoved($1.loc, "subroutine");
|
||||
parseContext.globalCheck($1.loc, "subroutine");
|
||||
parseContext.unimplemented($1.loc, "subroutine");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqUniform;
|
||||
}
|
||||
| SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN {
|
||||
parseContext.spvRemoved($1.loc, "subroutine");
|
||||
parseContext.globalCheck($1.loc, "subroutine");
|
||||
parseContext.unimplemented($1.loc, "subroutine");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqUniform;
|
||||
// TODO: 4.0 semantics: subroutines
|
||||
// 1) make sure each identifier is a type declared earlier with SUBROUTINE
|
||||
// 2) save all of the identifiers for future comparison with the declared function
|
||||
}
|
||||
;
|
||||
|
||||
type_name_list
|
||||
: TYPE_NAME {
|
||||
// TODO: 4.0 functionality: subroutine type to list
|
||||
: IDENTIFIER {
|
||||
// TODO
|
||||
}
|
||||
| type_name_list COMMA TYPE_NAME {
|
||||
| type_name_list COMMA IDENTIFIER {
|
||||
// TODO: 4.0 semantics: subroutines
|
||||
// 1) make sure each identifier is a type declared earlier with SUBROUTINE
|
||||
// 2) save all of the identifiers for future comparison with the declared function
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -822,7 +822,7 @@ static const yytype_uint16 yyrline[] =
|
|||
1066, 1078, 1084, 1087, 1094, 1098, 1102, 1110, 1119, 1122,
|
||||
1133, 1136, 1139, 1143, 1147, 1151, 1158, 1162, 1174, 1188,
|
||||
1193, 1199, 1205, 1212, 1218, 1223, 1228, 1233, 1240, 1244,
|
||||
1248, 1252, 1256, 1260, 1266, 1278, 1281, 1286, 1290, 1299,
|
||||
1248, 1252, 1256, 1260, 1266, 1275, 1278, 1286, 1290, 1299,
|
||||
1304, 1312, 1316, 1326, 1330, 1334, 1339, 1346, 1350, 1355,
|
||||
1360, 1365, 1369, 1374, 1379, 1384, 1390, 1396, 1402, 1410,
|
||||
1418, 1426, 1431, 1436, 1441, 1446, 1451, 1456, 1462, 1468,
|
||||
|
|
@ -1027,7 +1027,7 @@ static const yytype_int16 yypact[] =
|
|||
-512, -512, -512, -512, -512, -512, -153, -512, -210, -220,
|
||||
-152, -189, 4119, -160, -512, -128, -512, -512, -512, -512,
|
||||
3079, -512, -512, -512, -122, -512, -512, 564, -512, -512,
|
||||
-72, -46, -105, -512, 6148, -216, -512, -512, -102, -512,
|
||||
-71, -46, -105, -512, 6148, -216, -512, -512, -102, -512,
|
||||
4119, -512, -512, -512, 4119, -68, -66, -512, -225, -187,
|
||||
-512, -512, -512, 4606, -98, -512, -512, -512, -179, -512,
|
||||
-104, -172, -512, -512, 4119, -101, -512, -186, 846, -512,
|
||||
|
|
@ -1035,8 +1035,8 @@ static const yytype_int16 yypact[] =
|
|||
-512, -151, -512, -512, -512, -512, -512, -512, -512, -512,
|
||||
-512, 5648, 5648, 5648, -512, -512, -512, -512, -512, -512,
|
||||
-512, -209, -512, -512, -512, -94, -170, 5898, -92, -512,
|
||||
5648, -139, -133, -109, -223, -103, -111, -108, -106, -71,
|
||||
-74, -218, -86, -512, 5134, -512, -52, 5648, -512, -46,
|
||||
5648, -139, -133, -109, -223, -103, -111, -108, -106, -72,
|
||||
-73, -218, -86, -512, 5134, -512, -51, 5648, -512, -46,
|
||||
4119, 4119, -50, 3342, -512, -512, -512, -90, -89, -512,
|
||||
-78, -76, -85, 5398, -70, 5648, -80, -69, -64, -512,
|
||||
-512, -184, -512, -512, -150, -512, -220, -67, -512, -512,
|
||||
|
|
@ -1052,14 +1052,14 @@ static const yytype_int16 yypact[] =
|
|||
-512, -512, -512, 5648, 5648, -512, -512, -512, -512, 4870,
|
||||
-512, -226, -512, 3860, -512, -512, -60, -62, -512, -512,
|
||||
-512, -512, -512, -139, -139, -133, -133, -109, -109, -109,
|
||||
-109, -223, -223, -103, -111, -108, -106, -71, -74, 5648,
|
||||
-109, -223, -223, -103, -111, -108, -106, -72, -73, 5648,
|
||||
-512, -512, -138, -98, -50, -512, -33, 2256, -168, -512,
|
||||
-167, -512, 2798, 1410, -512, -512, -512, -512, 4342, -512,
|
||||
-512, -121, -512, -512, -56, -512, -512, 2798, -58, -512,
|
||||
-62, -32, 4119, -49, -51, -512, -512, 5648, 5648, -512,
|
||||
-57, -45, 177, -55, 1974, -512, -47, -44, 1692, -512,
|
||||
-62, -32, 4119, -52, -53, -512, -512, 5648, 5648, -512,
|
||||
-57, -47, 177, -48, 1974, -512, -45, -49, 1692, -512,
|
||||
-512, -165, 5648, 1692, -58, -512, -512, 1410, 4870, -512,
|
||||
-512, -512, -48, -62, -512, -512, 1410, -42, -512, -512,
|
||||
-512, -512, -44, -62, -512, -512, 1410, -43, -512, -512,
|
||||
-512
|
||||
};
|
||||
|
||||
|
|
@ -1132,15 +1132,15 @@ static const yytype_uint16 yydefact[] =
|
|||
static const yytype_int16 yypgoto[] =
|
||||
{
|
||||
-512, -512, -512, -512, -512, -512, -512, -512, -512, -512,
|
||||
-512, -512, -96, -512, -263, -262, -304, -264, -204, -199,
|
||||
-205, -197, -206, -196, -512, -252, -512, -282, -512, -296,
|
||||
-512, 3, -512, -512, -512, 6, -512, -512, -512, -29,
|
||||
-23, -26, -512, -512, -489, -512, -512, -512, -512, -118,
|
||||
-512, -221, -228, -512, -512, 0, -240, -512, 13, -512,
|
||||
-512, -512, -328, -330, -200, -271, -363, -512, -273, -364,
|
||||
-512, -512, -96, -512, -263, -262, -304, -264, -205, -200,
|
||||
-206, -197, -202, -196, -512, -252, -512, -282, -512, -296,
|
||||
-512, 3, -512, -512, -512, 6, -512, -512, -512, -34,
|
||||
-25, -27, -512, -512, -489, -512, -512, -512, -512, -110,
|
||||
-512, -221, -228, -512, -512, 0, -240, -512, 12, -512,
|
||||
-512, -512, -328, -330, -199, -272, -363, -512, -273, -364,
|
||||
-511, -308, -512, -512, -314, -309, -512, -512, -2, -441,
|
||||
-260, -512, -512, -279, -512, -512, -512, -512, -512, -512,
|
||||
-512, -512, -512, -512, -512, -512, -512, 12, -512, -512
|
||||
-512, -512, -512, -512, -512, -512, -512, 14, -512, -512
|
||||
};
|
||||
|
||||
/* YYDEFGOTO[NTERM-NUM]. */
|
||||
|
|
@ -1180,15 +1180,15 @@ static const yytype_int16 yytable[] =
|
|||
511, 464, 537, 437, 483, 484, 508, 485, 486, 467,
|
||||
510, 491, 492, 267, 273, 536, 283, 278, 284, 334,
|
||||
337, 387, 397, 402, 345, 341, 417, 319, 418, 419,
|
||||
421, 420, 424, 427, 433, 438, 439, 441, 270, 442,
|
||||
420, 421, 424, 427, 433, 438, 439, 441, 270, 442,
|
||||
443, 514, 515, 448, 474, 446, 449, 383, -29, 478,
|
||||
524, -24, 547, 503, 554, 568, 450, 500, 520, 538,
|
||||
464, -396, 467, 521, 358, 390, 391, 548, 552, 549,
|
||||
341, 553, 557, 493, 495, 497, 530, 569, 570, 494,
|
||||
558, 430, 255, 496, 403, 281, 498, 280, 282, 244,
|
||||
262, 530, 502, 523, 525, 555, 383, 233, 319, 564,
|
||||
217, 319, 551, 219, 275, 565, 279, 526, 539, 266,
|
||||
255, 0, 341, 0, 255, 550, 563, 0, 0, 0,
|
||||
464, -396, 467, 521, 548, 390, 391, 549, 552, 553,
|
||||
341, 358, 493, 495, 557, 558, 530, 570, 494, 497,
|
||||
281, 569, 255, 496, 403, 280, 498, 282, 244, 430,
|
||||
262, 530, 523, 502, 525, 555, 383, 233, 319, 564,
|
||||
217, 319, 551, 219, 275, 565, 279, 526, 539, 0,
|
||||
255, 266, 341, 0, 255, 550, 563, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 342, 0, 383, 0, 367, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
|
@ -1820,17 +1820,17 @@ static const yytype_int16 yycheck[] =
|
|||
262, 265, 343, 265, 262, 234, 235, 265, 281, 282,
|
||||
283, 270, 271, 272, 267, 257, 269, 240, 241, 262,
|
||||
263, 262, 263, 473, 407, 408, 442, 409, 410, 513,
|
||||
446, 415, 416, 225, 259, 518, 224, 259, 224, 257,
|
||||
446, 415, 416, 224, 259, 518, 224, 259, 224, 257,
|
||||
264, 224, 256, 255, 265, 386, 277, 263, 276, 275,
|
||||
244, 242, 258, 225, 224, 265, 265, 255, 224, 255,
|
||||
242, 244, 258, 224, 224, 265, 265, 255, 224, 255,
|
||||
265, 463, 464, 263, 224, 255, 255, 469, 255, 224,
|
||||
223, 256, 224, 433, 17, 558, 260, 258, 258, 255,
|
||||
262, 259, 566, 499, 259, 301, 302, 256, 265, 260,
|
||||
431, 256, 259, 417, 419, 421, 512, 265, 260, 418,
|
||||
264, 339, 222, 420, 320, 254, 422, 250, 254, 216,
|
||||
230, 527, 432, 504, 507, 543, 518, 237, 334, 553,
|
||||
237, 337, 538, 237, 244, 554, 248, 507, 527, 237,
|
||||
250, -1, 473, -1, 254, 537, 552, -1, -1, -1,
|
||||
262, 259, 566, 499, 256, 301, 302, 260, 265, 256,
|
||||
431, 259, 417, 419, 259, 264, 512, 260, 418, 421,
|
||||
254, 265, 222, 420, 320, 250, 422, 254, 216, 339,
|
||||
230, 527, 504, 432, 507, 543, 518, 237, 334, 553,
|
||||
237, 337, 538, 237, 244, 554, 248, 507, 527, -1,
|
||||
250, 237, 473, -1, 254, 537, 552, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, 274, -1, 558, -1, 278, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
|
|
@ -2475,7 +2475,7 @@ static const yytype_uint16 yystos[] =
|
|||
339, 340, 341, 343, 345, 346, 347, 384, 385, 386,
|
||||
255, 255, 224, 259, 346, 224, 265, 265, 387, 256,
|
||||
262, 327, 328, 329, 339, 343, 262, 265, 224, 224,
|
||||
265, 340, 343, 257, 344, 0, 385, 225, 342, 55,
|
||||
265, 340, 343, 257, 344, 0, 385, 224, 342, 55,
|
||||
224, 336, 337, 259, 349, 343, 265, 344, 259, 366,
|
||||
328, 327, 329, 224, 224, 255, 264, 344, 259, 262,
|
||||
265, 322, 224, 226, 227, 228, 229, 230, 231, 232,
|
||||
|
|
@ -2491,7 +2491,7 @@ static const yytype_uint16 yystos[] =
|
|||
300, 300, 317, 236, 237, 257, 261, 256, 256, 262,
|
||||
222, 315, 255, 300, 270, 271, 272, 267, 269, 234,
|
||||
235, 238, 239, 273, 274, 240, 241, 277, 276, 275,
|
||||
242, 244, 243, 278, 258, 258, 313, 225, 313, 318,
|
||||
242, 244, 243, 278, 258, 258, 313, 224, 313, 318,
|
||||
337, 350, 343, 224, 352, 353, 260, 351, 265, 265,
|
||||
378, 255, 255, 265, 265, 317, 255, 317, 263, 255,
|
||||
260, 360, 245, 246, 247, 248, 249, 250, 251, 252,
|
||||
|
|
@ -4944,8 +4944,8 @@ yyreduce:
|
|||
{
|
||||
parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine");
|
||||
parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine");
|
||||
parseContext.unimplemented((yyvsp[0].lex).loc, "subroutine");
|
||||
(yyval.interm.type).init((yyvsp[0].lex).loc);
|
||||
(yyval.interm.type).qualifier.storage = EvqUniform;
|
||||
}
|
||||
#line 4951 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
|
||||
break;
|
||||
|
|
@ -4955,26 +4955,26 @@ yyreduce:
|
|||
{
|
||||
parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine");
|
||||
parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine");
|
||||
parseContext.unimplemented((yyvsp[-3].lex).loc, "subroutine");
|
||||
(yyval.interm.type).init((yyvsp[-3].lex).loc);
|
||||
(yyval.interm.type).qualifier.storage = EvqUniform;
|
||||
// TODO: 4.0 semantics: subroutines
|
||||
// 1) make sure each identifier is a type declared earlier with SUBROUTINE
|
||||
// 2) save all of the identifiers for future comparison with the declared function
|
||||
}
|
||||
#line 4965 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
|
||||
#line 4962 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 165:
|
||||
#line 1278 "MachineIndependent/glslang.y" /* yacc.c:1646 */
|
||||
#line 1275 "MachineIndependent/glslang.y" /* yacc.c:1646 */
|
||||
{
|
||||
// TODO: 4.0 functionality: subroutine type to list
|
||||
// TODO
|
||||
}
|
||||
#line 4973 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
|
||||
#line 4970 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
|
||||
break;
|
||||
|
||||
case 166:
|
||||
#line 1281 "MachineIndependent/glslang.y" /* yacc.c:1646 */
|
||||
#line 1278 "MachineIndependent/glslang.y" /* yacc.c:1646 */
|
||||
{
|
||||
// TODO: 4.0 semantics: subroutines
|
||||
// 1) make sure each identifier is a type declared earlier with SUBROUTINE
|
||||
// 2) save all of the identifiers for future comparison with the declared function
|
||||
}
|
||||
#line 4980 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ public:
|
|||
virtual void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc);
|
||||
virtual void checkDeprecated(const TSourceLoc&, int queryProfiles, int depVersion, const char* featureDesc);
|
||||
virtual void requireNotRemoved(const TSourceLoc&, int queryProfiles, int removedVersion, const char* featureDesc);
|
||||
virtual void unimplemented(const TSourceLoc&, const char* featureDesc);
|
||||
virtual void requireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
|
||||
virtual void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
|
||||
virtual TExtensionBehavior getExtensionBehavior(const char*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue