broadcom/cle: fix vec size dump when set to 0

There are two bits for the vector size of a vertex input, with the
value 0 meaning 4 components. The CLE decoder seems to try and dump
"4" instead of "0" is to be a bit more user friendly, but it had an
off-by-one error that would cause it to dump "2" instead.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7271>
This commit is contained in:
Iago Toral Quiroga 2020-10-22 10:37:15 +02:00
parent 53fc3eb4a2
commit c15468d782
1 changed files with 1 additions and 1 deletions

View File

@ -877,7 +877,7 @@ v3d_field_iterator_next(struct clif_dump *clif, struct v3d_field_iterator *iter)
if (iter->field->minus_one)
value++;
if (strcmp(iter->field->name, "Vec size") == 0 && value == 0)
value = 1 << (e - s);
value = 1 << (e - s + 1);
snprintf(iter->value, sizeof(iter->value), "%u", value);
enum_name = v3d_get_enum_name(&iter->field->inline_enum, value);
break;