glsl: shader buffer variables cannot have initializers
Section 4.3.7 "Buffer Variables" of the GLSL 4.30 spec: "Buffer variables cannot have initializers." v2: - Rewrite error message (Jordan) Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
fa0a86c057
commit
20b2907db7
|
@ -2995,6 +2995,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_shader_storage) {
|
||||
_mesa_glsl_error(& initializer_loc, state,
|
||||
"SSBO variables cannot have initializers");
|
||||
}
|
||||
|
||||
/* From section 4.1.7 of the GLSL 4.40 spec:
|
||||
*
|
||||
* "Opaque variables [...] are initialized only through the
|
||||
|
|
Loading…
Reference in New Issue