Since the original 'var' might have been deleted from this point forward.
Bugzila: https://bugs.freedesktop.org/show_bug.cgi?id=102685
Fixes: 51bf007d2c27fba (glsl: Disallow unsized array of atomic_uint)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* "It is a compile-time error to declare an unsized array of
* atomic_uint"
*/
- if (var->type->is_unsized_array() &&
- var->type->without_array()->base_type == GLSL_TYPE_ATOMIC_UINT) {
+ if (declared_var->type->is_unsized_array() &&
+ declared_var->type->without_array()->base_type == GLSL_TYPE_ATOMIC_UINT) {
_mesa_glsl_error(& loc, state,
"Unsized array of atomic_uint is not allowed");
}