From: Samuel Iglesias Gonsalvez <sigles...@igalia.com> Section 4.3.7 "Buffer Variables" of the GLSL 4.30 spec:
"Buffer variables cannot have initializers." Signed-off-by: Samuel Iglesias Gonsalvez <sigles...@igalia.com> --- src/glsl/ast_to_hir.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index fbe8c21..62ae1b6 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2996,6 +2996,15 @@ process_initializer(ir_variable *var, ast_declaration *decl, "cannot initialize uniforms"); } + /* Section 4.3.7 "Buffer Variables" of the GLSL 4.30 spec: + * + * "Buffer variables cannot have initializers." + */ + if (var->data.mode == ir_var_buffer) { + _mesa_glsl_error(& initializer_loc, state, + "cannot initialize shader buffer variables"); + } + /* From section 4.1.7 of the GLSL 4.40 spec: * * "Opaque variables [...] are initialized only through the -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev