Mesa (master): panfrost: fix attribute continuation decoding

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 27 12:52:32 UTC 2021


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

Author: Italo Nicola <italonicola at collabora.com>
Date:   Fri Dec 11 07:57:23 2020 +0000

panfrost: fix attribute continuation decoding

Because attribute continuations aren't considered whole attributes, we
need to increase the total number of attributes for each continuation
when decoding, otherwise we will end up missing a buffer for every
continuation we have.

Signed-off-by: Italo Nicola <italonicola at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066>

---

 src/panfrost/lib/decode.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/panfrost/lib/decode.c b/src/panfrost/lib/decode.c
index cc79dc8c7ac..703bf2cd80c 100644
--- a/src/panfrost/lib/decode.c
+++ b/src/panfrost/lib/decode.c
@@ -466,13 +466,13 @@ pandecode_attributes(const struct pandecode_mapped_memory *mem,
                 pan_unpack(cl + i * MALI_ATTRIBUTE_BUFFER_LENGTH, ATTRIBUTE_BUFFER, temp);
                 DUMP_UNPACKED(ATTRIBUTE_BUFFER, temp, "%s:\n", prefix);
 
-                if (temp.type != MALI_ATTRIBUTE_TYPE_1D_NPOT_DIVISOR)
-                        continue;
-
-                pan_unpack(cl + (i + 1) * MALI_ATTRIBUTE_BUFFER_LENGTH,
-                           ATTRIBUTE_BUFFER_CONTINUATION_NPOT, temp2);
-                pan_print(pandecode_dump_stream, ATTRIBUTE_BUFFER_CONTINUATION_NPOT,
-                          temp2, (pandecode_indent + 1) * 2);
+                if (temp.type == MALI_ATTRIBUTE_TYPE_1D_NPOT_DIVISOR) {
+                        pan_unpack(cl + (i + 1) * MALI_ATTRIBUTE_BUFFER_LENGTH,
+                                   ATTRIBUTE_BUFFER_CONTINUATION_NPOT, temp2);
+                        pan_print(pandecode_dump_stream, ATTRIBUTE_BUFFER_CONTINUATION_NPOT,
+                                  temp2, (pandecode_indent + 1) * 2);
+                        i++; count++;
+                }
         }
         pandecode_log("\n");
 }



More information about the mesa-commit mailing list