diff options
author | Iago Toral Quiroga <[email protected]> | 2017-09-13 08:59:18 +0200 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2017-09-14 11:23:26 +0200 |
commit | 4af156224ea8d5c21464f02aecc25f64de681170 (patch) | |
tree | 45e7bb447e35369f9fd66483c6954a45b7eb4a14 | |
parent | 412ab3f6fdd91019bc9ceecba80e10eb1d522f94 (diff) |
glsl: use 'declared_var' instead of 'var' after checking redeclarations
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 <[email protected]>
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 9ded2cbda7f..6dd0f1dfaad 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -5547,8 +5547,8 @@ ast_declarator_list::hir(exec_list *instructions, * "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"); } |