mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
Reject uniform initializers in GLSL 1.10 mode
Now both glslparsertest/dataType3.frag and glslparsertest/dataType2.frag pass.
This commit is contained in:
parent
72fc47f0b0
commit
19360152f5
1 changed files with 15 additions and 0 deletions
|
|
@ -980,6 +980,21 @@ ast_declarator_list::hir(exec_list *instructions,
|
|||
|
||||
instructions->push_tail(var);
|
||||
|
||||
/* From page 24 (page 30 of the PDF) of the GLSL 1.10 spec:
|
||||
*
|
||||
* "All uniform variables are read-only and are initialized either
|
||||
* directly by an application via API commands, or indirectly by
|
||||
* OpenGL."
|
||||
*/
|
||||
if ((state->language_version <= 110)
|
||||
&& (var->mode == ir_var_uniform)
|
||||
&& (decl->initializer != NULL)) {
|
||||
YYLTYPE loc = decl->initializer->get_location();
|
||||
|
||||
_mesa_glsl_error(& loc, state, "uniform initializers forbidden in "
|
||||
"GLSL 1.10");
|
||||
}
|
||||
|
||||
/* FINISHME: Process the declaration initializer. */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue