Module: Mesa
Branch: master
Commit: c15468d782b91b712032396185be578f13c777f3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c15468d782b91b712032396185be578f13c777f3

Author: Iago Toral Quiroga <[email protected]>
Date:   Thu Oct 22 10:37:15 2020 +0200

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7271>

---

 src/broadcom/cle/v3d_decoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/broadcom/cle/v3d_decoder.c b/src/broadcom/cle/v3d_decoder.c
index 23ee59fd0cf..5addf5143b1 100644
--- a/src/broadcom/cle/v3d_decoder.c
+++ b/src/broadcom/cle/v3d_decoder.c
@@ -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;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to