projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6718bb5
)
glsl: allow the #extension directive within code blocks for the dri option
author
Marek Olšák
<marek.olsak@amd.com>
Tue, 9 Apr 2019 22:15:34 +0000
(18:15 -0400)
committer
Marek Olšák
<marek.olsak@amd.com>
Fri, 12 Apr 2019 15:34:39 +0000
(11:34 -0400)
for Viewperf 13
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/glsl_parser.yy
patch
|
blob
|
history
diff --git
a/src/compiler/glsl/glsl_parser.yy
b/src/compiler/glsl/glsl_parser.yy
index 8d6c47fb6a3ac29516c9df9fe7fe084168e0683c..b91c24ebe9706ef53254371c5a779c8875695b2a 100644
(file)
--- a/
src/compiler/glsl/glsl_parser.yy
+++ b/
src/compiler/glsl/glsl_parser.yy
@@
-2538,6
+2538,15
@@
statement_list:
$$ = $1;
$$->link.insert_before(& $2->link);
}
+ | statement_list extension_statement
+ {
+ if (!state->allow_extension_directive_midshader) {
+ _mesa_glsl_error(& @1, state,
+ "#extension directive is not allowed "
+ "in the middle of a shader");
+ YYERROR;
+ }
+ }
;
expression_statement: