pan/decode: Fix tiler warning
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 26 May 2020 22:10:39 +0000 (18:10 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 26 May 2020 22:58:21 +0000 (22:58 +0000)
../src/panfrost/pandecode/decode.c:1176:60: warning: taking address of
packed member of â€˜struct mali_framebuffer’ may result in an unaligned
pointer value [-Waddress-of-packed-member]
 1176 |
      pandecode_midgard_tiler_descriptor(&fb->tiler, fb->width1 + 1,
fb->height1 + 1, is_fragment, true);

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5219>

src/panfrost/pandecode/decode.c

index 24ec19ee3240b30bcd36caa88de76766df8af794..d5e07a0940ce832bb62fc0f288152104374457e9 100644 (file)
@@ -1172,8 +1172,10 @@ pandecode_mfbd_bfr(uint64_t gpu_va, int job_no, bool is_fragment, bool is_comput
         if (!is_compute)
                 if (is_bifrost)
                         pandecode_bifrost_tiler_descriptor(fb);
-                else
-                        pandecode_midgard_tiler_descriptor(&fb->tiler, fb->width1 + 1, fb->height1 + 1, is_fragment, true);
+                else {
+                        const struct midgard_tiler_descriptor t = fb->tiler;
+                        pandecode_midgard_tiler_descriptor(&t, fb->width1 + 1, fb->height1 + 1, is_fragment, true);
+                }
         else
                 pandecode_msg("XXX: skipping compute MFBD, fixme\n");