}
/* See also interface_block_layout_qualifier. */
- if (!$$.flags.i && state->ARB_uniform_buffer_object_enable) {
+ if (!$$.flags.i && state->has_uniform_buffer_objects()) {
if (strcmp($1, "std140") == 0) {
$$.flags.q.std140 = 1;
} else if (strcmp($1, "shared") == 0) {
{
$$ = $1;
/* Layout qualifiers for ARB_uniform_buffer_object. */
- if ($$.flags.q.uniform && !state->ARB_uniform_buffer_object_enable) {
+ if ($$.flags.q.uniform && !state->has_uniform_buffer_objects()) {
_mesa_glsl_error(& @1, state,
"#version 140 / GL_ARB_uniform_buffer_object "
"layout qualifier `%s' is used", $1);
block->declarations.push_degenerate_list_at_head(& $4->link);
if ($1.flags.q.uniform) {
- if (!state->ARB_uniform_buffer_object_enable) {
+ if (!state->has_uniform_buffer_objects()) {
_mesa_glsl_error(& @1, state,
"#version 140 / GL_ARB_uniform_buffer_object "
"required for defining uniform blocks");
return ARB_explicit_attrib_location_enable || is_version(330, 300);
}
+ bool has_uniform_buffer_objects() const
+ {
+ return ARB_uniform_buffer_object_enable || is_version(140, 300);
+ }
+
void process_version_directive(YYLTYPE *locp, int version,
const char *ident);