* declare an atomic type with a different precision or to specify the
* default precision for an atomic type to be lowp or mediump."
*/
- if (type->base_type == GLSL_TYPE_ATOMIC_UINT &&
- precision != ast_precision_high) {
+ if (type->is_atomic_uint() && precision != ast_precision_high) {
_mesa_glsl_error(loc, state,
"atomic_uint can only have highp precision qualifier");
}
validate_array_dimensions(decl_type, state, &loc);
}
- if (decl_type->base_type == GLSL_TYPE_ATOMIC_UINT) {
+ if (decl_type->is_atomic_uint()) {
/* Empty atomic counter declarations are allowed and useful
* to set the default offset qualifier.
*/
* qualifier, except for vertex shader inputs and fragment shader
* outputs."
*/
- if (in->type->base_type == GLSL_TYPE_ATOMIC_UINT ||
- is_gl_identifier(in->name) ||
+ if (in->type->is_atomic_uint() || is_gl_identifier(in->name) ||
!(in->data.explicit_location || use_implicit_location)) {
out->location = -1;
} else {
*/
unsigned atomic_size() const
{
- if (base_type == GLSL_TYPE_ATOMIC_UINT)
+ if (is_atomic_uint())
return ATOMIC_COUNTER_SIZE;
else if (is_array())
return length * fields.array->atomic_size();