glsl: Fix -Wshadow warning

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7552>
This commit is contained in:
Tony Wasserka 2020-11-06 13:31:39 +01:00 committed by Marge Bot
parent 902ac3d7c5
commit 4e87e7863f
1 changed files with 4 additions and 4 deletions

View File

@ -1057,11 +1057,11 @@ public:
return 0;
unsigned size = length;
const glsl_type *base_type = fields.array;
const glsl_type *array_base_type = fields.array;
while (base_type->is_array()) {
size = size * base_type->length;
base_type = base_type->fields.array;
while (array_base_type->is_array()) {
size = size * array_base_type->length;
array_base_type = array_base_type->fields.array;
}
return size;
}