glsl: add extra pp tokens workaround and enable for CoR
The CTS now tests to make sure these are not allowed. However, previously
drivers (including Mesa) would allow them to exist and just issue a
warning. Some old applications such as Champions of Regnum seem to
depend on this.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/422
Fixes: 43047384c3
("glsl/glcpp: Promote "extra token at end of directive" from warning to error")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7361>
This commit is contained in:

committed by
Marge Bot

parent
ce0b72a13a
commit
a09717c4de
@@ -781,7 +781,10 @@ replacement_list:
|
||||
junk:
|
||||
/* empty */
|
||||
| pp_tokens {
|
||||
glcpp_error(&@1, parser, "extra tokens at end of directive");
|
||||
if (parser->gl_ctx->Const.AllowExtraPPTokens)
|
||||
glcpp_warning(&@1, parser, "extra tokens at end of directive");
|
||||
else
|
||||
glcpp_error(&@1, parser, "extra tokens at end of directive");
|
||||
}
|
||||
;
|
||||
|
||||
|
Reference in New Issue
Block a user